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

How to spawn car in front player actor


TLFdjobaw
 Share

Recommended Posts

Hi guys... I going to spawn a car.. and i need the opcode..

what opcode should i use to spawn a car in front player????

please tell me with the coordinates... please

Link to comment
Share on other sites

Press and hold fire to spawn a car:

 

{$CLEO}0000:while true wait 0                    repeat   wait 250   until 0256:   player $PLAYER_CHAR defined           0247: request_model #HUNTER           038B: load_requested_models       repeat       wait 0       until  0248:   model #HUNTER available            while true           wait 1000               04C4: create_coordinate [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR offset 0.0 7.0 0.0               if                   00E1:   key_pressed 0 17               then                   00A5: [email protected] = create_car #HUNTER at [email protected] [email protected] [email protected]                   0249: release_model #HUNTER                   01C3: remove_references_to_car [email protected] // Like turning a car into any random car                   if                        8256:   not   player $PLAYER_CHAR defined                   then           break                      end               end                endend

 

If you don't understand the high level code then compile and decompile.

Edited by JACK JONES
Link to comment
Share on other sites

{$CLEO}0000:while true   wait 0   if       0256:   player $PLAYER_CHAR defined   then       if            0AB0:  key_pressed 0x31 // 1       then           0AA5: call 0x0043A0B6 num_params 1 pop 1 #COPCARLA  //  Calls the function 0x0043A0B6 in gta_sa.exe to spawn a car model            wait 250       end   endend

 

Link to comment
Share on other sites

If you care about CLEO3 and don't care about exe version, use Otis method...

Else If you care about exe versions, use Jack Jones method, that use original opcodes

Else If you don't care about CLEO3, use the CLEO4 op

 

0ADD: spawn_vehicle_by_cheating #RHINO

 

Else You shouldn't spawn the car

 

Link to comment
Share on other sites

i use CLEO 4.. and when i use this

 

00A5: [email protected] = create_car #RCCAM from_actor $PLAYER_ACTOR with_offset 0.0 5.5 0.3 

 

 

when i compile it.. it turn to this

 

[email protected] = Car.Create(#RCCAM, $PLAYER_ACTOR, 0.0, 5.5)

 

 

and it make the script wont spawn the rccam..

why??

Link to comment
Share on other sites

 

i use CLEO 4.. and when i use this

 

00A5: [email protected] = create_car #RCCAM from_actor $PLAYER_ACTOR with_offset 0.0 5.5 0.3

 

when i compile it.. it turn to this

 

[email protected] = Car.Create(#RCCAM, $PLAYER_ACTOR, 0.0, 5.5)

 

Of course it turn into this. Why THE FU*K are you trying to alter the opcode? Jeeeesus!!!

00A5 creates a car at some coordinates no matter what text you write in it. Just use some of the codes above.

Link to comment
Share on other sites

 

i use CLEO 4.. and when i use this

 

00A5: [email protected] = create_car #RCCAM from_actor $PLAYER_ACTOR with_offset 0.0 5.5 0.3 

 

 

when i compile it.. it turn to this

 

[email protected] = Car.Create(#RCCAM, $PLAYER_ACTOR, 0.0, 5.5)

 

 

and it make the script wont spawn the rccam..

why??

you mean recompiling

 

Option: different view of the decompiled code

 

Choose TOOLS, then options

in option menu GENERAL you can find the feature to switch between 2 ways for decompiling

 

either decompile by writing opcodes

or decompiling without opcodes

 

user posted image

 

 

1. Writing Opcodes

All entries are shown with their opcodes

The opcodes are the real programm codes of the script functions

and by showing them is like to see the name of the command

Script with opcodes:

 

:CARSL_643900D6: if 00E1:   player 0 pressed_key 16 004D: jump_if_false @CARSL_6535 010B: [email protected] = player $PLAYER_CHAR money 00D6: if 002D:   [email protected] >= [email protected] // (int) 004D: jump_if_false @CARSL_6512 0012: [email protected] *= -1 0109: player $PLAYER_CHAR money += [email protected]  0002: jump @CARSL_6700

 

 

2. Without Opcodes

The script is more slim, maybe more clear (but not for me)

especially 004D: jump_if_false will be now jf

But not all opcodes are disappeared. Many codes must be used furthermore by applying their opcodes.

Script without opcodes:

 

:CARSL_6439if 00E1:   player 0 pressed_key 16 jf @CARSL_6535 [email protected] = Player.Money($PLAYER_CHAR)if 002D:   [email protected] >= [email protected] // (int) jf @CARSL_6512 [email protected] *= -1 Player.Money($PLAYER_CHAR) += [email protected] @CARSL_6700

 

 

By compiling it doesnt matter if you use codes with opcodes or without opcodes

You can merge everything and sanny compile it as well,

provided that the code is correct and codelines which includes opcodes by decompiling without opcodes

must be used furthermore by using opcodes

 

 

A special feature by decompiling without opcodes is to translate opcode based commands into

Classes[ and Keywords

For a couple of codes can be used CLASSES

Read more about classes in Sannybuilder-HELP theme: Coding >> Classes

 

This code by decompiling with writing opcodes

00AB: put_car [email protected] at -1577.942 52.6333 40.0

 

will by shown by decompiling with without opcodes in this kind:

 

Car.PutAt([email protected], -1577.942, 52.6333, 40.0)

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.