Jump to content
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. Los Santos Drug Wars
      2. Updates
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Red Dead Online

      1. Blood Money
      2. Frontier Pursuits
      3. Find Lobbies & Outlaws
      4. Help & Support
    3. Crews

    1. Grand Theft Auto Series

      1. Bugs*
      2. St. Andrews Cathedral
    2. GTA VI

    3. GTA V

      1. Guides & Strategies
      2. Help & Support
    4. GTA IV

      1. The Lost and Damned
      2. The Ballad of Gay Tony
      3. Guides & Strategies
      4. Help & Support
    5. GTA San Andreas

      1. Classic GTA SA
      2. Guides & Strategies
      3. Help & Support
    6. GTA Vice City

      1. Classic GTA VC
      2. Guides & Strategies
      3. Help & Support
    7. GTA III

      1. Classic GTA III
      2. Guides & Strategies
      3. Help & Support
    8. Portable Games

      1. GTA Chinatown Wars
      2. GTA Vice City Stories
      3. GTA Liberty City Stories
    9. Top-Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    1. Red Dead Redemption 2

      1. PC
      2. Help & Support
    2. Red Dead Redemption

    1. GTA Mods

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Red Dead Mods

      1. Documentation
    3. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    4. Featured Mods

      1. Design Your Own Mission
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Rockstar Games

    2. Rockstar Collectors

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Movies & TV
      5. Music
      6. Sports
      7. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. Announcements

    2. Support

    3. Suggestions

Changing your player's character


daniHCF96
 Share

Recommended Posts

Hi, i just wanted to know what to do to changing the default GTA SA character or actor (CJ) to another special actor for example Ryder or Pulaski... I don't know if it's this line:

 

0053: $PLAYER_CHAR = create_player #NULL at 2488.562 -1666.865 12.8757

 

I already trying to change the #NULL to #TENPEN to make the character be tenpenny, but it doesen't work. Maybe i need to change another line too

Link to comment
Share on other sites

{$CLEO}

const

SPECIAL_ACTOR_MODEL_NAME = 'SWEET'

KEY = 34 // page down

end

 

0000: NOP

 

:replacePlayerToSpecialActor

wait 0

if

0AB0: key_pressed KEY // 0 zero

else_jump @replacePlayerToSpecialActor

023C: load_special_actor SPECIAL_ACTOR_MODEL_NAME as 1 // models 290-299

 

while 823D: not special_actor 1 loaded

wait 0

end

 

09C7: change_player $PLAYER_CHAR model_to #SPECIAL01

wait 500

 

:restorePlayerModel

wait 0

if

0AB0: key_pressed KEY

else_jump @restorePlayerModel

0296: unload_special_actor 1

09C7: change_player $PLAYER_CHAR model_to #NULL

wait 500

jump @replacePlayerToSpecialActor

Press (page down) to change player to special actor Sweet and to restore CJ's appearance accordingly. Edited by fastman92
Link to comment
Share on other sites

I don't think that's really what i'm looking for, i don't want to press a key and then change to Sweet, i want to start the game being sweet, without having the possibility of changing character

Link to comment
Share on other sites

I don't think that's really what i'm looking for, i don't want to press a key and then change to Sweet, i want to start the game being sweet, without having the possibility of changing character

Do it yourself.

 

Load actor, replace CJ to that actor...

End custom thread.

Edited by fastman92
Link to comment
Share on other sites

 

I don't think that's really what i'm looking for, i don't want to press a key and then change to Sweet, i want to start the game being sweet, without having the possibility of changing character

Do it yourself.

 

Load actor, replace CJ to that actor...

End custom thread.

 

 

I tried this:

 

 

var

$PLAYER_CHAR: Player

end // var

03A4: name_thread 'MAIN'

01F0: set_max_wanted_level_to 6

0111: toggle_wasted_busted_check 0

00C0: set_current_time_hours_to 8 minutes_to 0

04E4: unknown_refresh_game_renderer_at 2488.562 -1666.865

03CB: set_rendering_origin_at 2488.562 -1666.865 13.3757

0053: $PLAYER_CHAR = create_player #NULL at 2488.562 -1666.865 12.8757

023C: load_special_actor 'TENPEN' s 1

038B: load_requested_models

while 823D: NOT special_actor 1 loaded

0001: wait 0 ms

end

09C7: change_player $PLAYER_CHAR model_to #SPECIAL01

0001: wait 500 ms

 

 

But when starting the game, CJ spawns at Ganton, and with a really strange texture, deformed,

Link to comment
Share on other sites

I tried this:

 

 

var

$PLAYER_CHAR: Player

end // var

03A4: name_thread 'MAIN'

01F0: set_max_wanted_level_to 6

0111: toggle_wasted_busted_check 0

00C0: set_current_time_hours_to 8 minutes_to 0

04E4: unknown_refresh_game_renderer_at 2488.562 -1666.865

03CB: set_rendering_origin_at 2488.562 -1666.865 13.3757

0053: $PLAYER_CHAR = create_player #NULL at 2488.562 -1666.865 12.8757

023C: load_special_actor 'TENPEN' s 1

038B: load_requested_models

while 823D: NOT special_actor 1 loaded

0001: wait 0 ms

end

09C7: change_player $PLAYER_CHAR model_to #SPECIAL01

0001: wait 500 ms

 

 

But when starting the game, CJ spawns at Ganton, and with a really strange texture, deformed,

 

 

the script works for me as it should, there's missing something but it works, player appears as Tenpeny

(cleo wasn't installed, with cleo it crashed)

 

the whole script:

DEFINE OBJECTS 1DEFINE OBJECT SANNY BUILDER 3.09      DEFINE MISSIONS 0DEFINE EXTERNAL_SCRIPTS -1 // Use -1 in order not to compile AAA scriptDEFINE UNKNOWN_EMPTY_SEGMENT 0DEFINE UNKNOWN_THREADS_MEMORY 0//var $PLAYER_CHAR: Player    end // var03A4: name_thread 'MAIN'01F0: set_max_wanted_level_to 60111: toggle_wasted_busted_check 000C0: set_current_time_hours_to 8 minutes_to 004E4: unknown_refresh_game_renderer_at 2488.562 -1666.86503CB: set_rendering_origin_at 2488.562 -1666.865 13.3757   0053: $PLAYER_CHAR = create_player #NULL at 2488.562 -1666.865 12.8757023C: load_special_actor 'TENPEN' s 1038B: load_requested_modelswhile 823D: NOT special_actor 1 loaded      0001: wait 0 ms    end09C7: change_player $PLAYER_CHAR model_to #SPECIAL010001: wait 500 ms  016A: fade 1 time 0  004E: end_thread
Edited by ZAZ
Link to comment
Share on other sites

You may aswell release the model (or rather mark is as no longer needed afterwards) + 038B makes 023D check loop useless.

 

Random fact, as special actors' slots are often used in missions, using a custom code (CLEO required) to change actor's model may be the best idea:

 

http://www.gta-mods.pl/artykuly/57/zmiana-modelu-gracza

 

For the code, check Dla zaawansowanych section. This

 

:NAZWA_MODELU0662: NOP "nazwa_modelu"0000: NOP
should contain a name of the model you want to set CJ to - in your case, 0662: should hold "TENPEN".
Link to comment
Share on other sites

You may aswell release the model (or rather mark is as no longer needed afterwards) + 038B makes 023D check loop useless.

 

Random fact, as special actors' slots are often used in missions, using a custom code (CLEO required) to change actor's model may be the best idea:

 

http://www.gta-mods.pl/artykuly/57/zmiana-modelu-gracza

 

For the code, check Dla zaawansowanych section. This

:NAZWA_MODELU0662: NOP "nazwa_modelu"0000: NOP
should contain a name of the model you want to set CJ to - in your case, 0662: should hold "TENPEN".

 

 

Maaan i'm still having problems with this, the game continues crashing after the bar loads... I used google translator to translate the website, and used the custom code:

 

.......

.......

0053: $PLAYER_CHAR = create_player #NULL at 2485.22 -1672.941 13.73

07AF: $PLAYER_GROUP = player $PLAYER_CHAR group

 

:ChangePlayerModel

0A9F: [email protected] = current_thread_pointer

000A: [email protected] += 0x10

0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0

0062: [email protected] -= [email protected]

000A: [email protected] += 0x4

for [email protected] = 0 to 7

0A8E: [email protected] = [email protected] + [email protected]

0A8D: [email protected] = read_memory [email protected] size 1 virtual_protect 0

if and

0029: [email protected] >= 0x41

002B: 0x5A >= [email protected]

then

000A: [email protected] += 0x20

0A8C: write_memory [email protected] size 1 value [email protected] virtual_protect 0

end

end

0AA5: call 0x409D10 num_params 3 pop 3 26 [email protected] 0

038B: load_requested_models

if 0039: [email protected] == 0

then 008B: [email protected] = $PLAYER_ACTOR

else 008B: [email protected] = $SECOND_PLAYER_ACTOR

end

0A96: [email protected] = actor [email protected] struct

0A8E: [email protected] = [email protected] + 0x4D4

0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0

0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0

0A8E: [email protected] = [email protected] + 0x20

0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0

0AA6: call_method [email protected] struct [email protected] num_params 0 pop 0

0A8E: [email protected] = [email protected] + 0x22

0A8C: write_memory [email protected] size 2 value 0xFFFF virtual_protect 0

0A8E: [email protected] = [email protected] + 0x14

0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0

0AA6: call_method [email protected] struct [email protected] num_params 1 pop 0 [email protected]

0A8C: write_memory [email protected] size 4 value [email protected] virtual_protect 0

0AB2: ret 0

 

:NAZWA_MODELU

0662: NOP "265"

0000: NOP

 

:MAIN_002

0AB1: call_scm_func @ChangePlayerModel 2 change_player $PLAYER_CHAR model_to @NAZWA_MODELU

070D: rebuild_player $PLAYER_CHAR

062A: change_float_stat 21 to 200.0 //FAT

 

 

NAZWA MODELU is Load Model in polish, and in the website it said that you shouldn't use the .dff model name, only the ID. Officer Tenpenny's ID is 265, but it's strange to put it in a "NOP" ocode, i haven't got a clue on what to do about this

Link to comment
Share on other sites

You've done it wrong, it's a SCM function, not a code you put like that. You CALL it, like the example line showed.

 

Also, use model NAME as specified, not the ID. The article only states you shouldn't include ".dff" in the model name.

Link to comment
Share on other sites

  • 3 weeks later...

To spawn as tenpenny after the initial switch (like loading the game) just make a sphere that changes the player character to tenpenny at the spawn coords after a save or place a model switch line after the save disk coords.. Simple solution that worked for me rather than trying to f*ck with saves or memory. The only issue is that sometimes entering interiors can bug the model so just place spheres that change the model to tenpenny on the entrance and exit of every enterable building you plan to use..

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.