IMG

 
IMG
IMG   IMG
  Welcome to GTAForums! Be sure to check out the Grand Theft Auto V Forum.

You are not registered! (If you are, click here to login) Registering is fast, free and easy and allows you to instantly reply to any topic on GTAForums.
Why wait? Click here to register your own unique username and become part of the ever-growing community!


( Log In | Register | Revalidate Validation E-mail )
Quick Log-In:
  IMG
       
>
Forum Rules GTA Modification Forums

Please post mod releases in the Mod Showroom

GTAGarage.com
free mod hosting from GTANet, simply login with your GTAForums account details

GTAModding.com
GTANet's modding wiki

GTA Modding Chatroom
provided by irc.gtanet.com (Don't have an IRC client? Click here)


  Reply to this topicStart new topicStart Poll

 How to spawn car in front player actor

 Please tell me
 
TLFdjobaw  
Posted: Sunday, Sep 9 2012, 07:37
Quote Post


Un-skilled Collisions Modders
Group Icon
Group: Members
Joined: Jan 20, 2012

in.gif

XXXXX



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
Users WebsitePM
  Top
 

 
JACK JONES  
Posted: Sunday, Sep 9 2012, 08:13
Quote Post


Booom!!!
Group Icon
Group: Members
Joined: Dec 6, 2011

sr.gif

XXXXX



Press and hold fire to spawn a car:
CODE
{$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 1@ 2@ 3@ from_actor $PLAYER_ACTOR offset 0.0 7.0 0.0
               if
                   00E1:   key_pressed 0 17
               then
                   00A5: 0@ = create_car #HUNTER at 1@ 2@ 3@
                   0249: release_model #HUNTER
                   01C3: remove_references_to_car 0@ // Like turning a car into any random car
                   if
                        8256:   not   player $PLAYER_CHAR defined
                   then
           break  
                   end
               end    
           end
end

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

This post has been edited by JACK JONES on Sunday, Sep 9 2012, 08:58
PM
  Top
 

 
HeresOtis  
Posted: Sunday, Sep 9 2012, 16:13
Quote Post


Mark Chump
Group Icon
Group: Members
Joined: Apr 29, 2011

XXXXX



CODE
{$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
   end
end
PM
  Top
 

 
Link2012  
Posted: Sunday, Sep 9 2012, 17:00
Quote Post


Wut?
Group Icon
Group: Members
Joined: Jan 30, 2011

ba.gif

XXXXX



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
CODE
0ADD: spawn_vehicle_by_cheating #RHINO

Else You shouldn't spawn the car
PMMSN
  Top
 

 
TLFdjobaw  
Posted: Friday, Sep 14 2012, 08:25
Quote Post


Un-skilled Collisions Modders
Group Icon
Group: Members
Joined: Jan 20, 2012

in.gif

XXXXX



i use CLEO 4.. and when i use this
CODE
00A5: 0@ = create_car #RCCAM from_actor $PLAYER_ACTOR with_offset 0.0 5.5 0.3


when i compile it.. it turn to this
CODE
0@ = Car.Create(#RCCAM, $PLAYER_ACTOR, 0.0, 5.5)


and it make the script wont spawn the rccam..
why??
Users WebsitePM
  Top
 

 
JACK JONES  
Posted: Friday, Sep 14 2012, 09:19
Quote Post


Booom!!!
Group Icon
Group: Members
Joined: Dec 6, 2011

sr.gif

XXXXX



QUOTE
i use CLEO 4.. and when i use this
CODE
00A5: 0@ = create_car #RCCAM from_actor $PLAYER_ACTOR with_offset 0.0 5.5 0.3

when i compile it.. it turn to this
CODE
0@ = 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.
PM
  Top
 

 
ZAZ  
Posted: Friday, Sep 14 2012, 11:34
Quote Post


Kernlochbohrer
Group Icon
Group: Members
Joined: Jan 10, 2005

eu.gif

Member Award




QUOTE (TLFdjobaw @ Friday, Sep 14 2012, 09:25)
i use CLEO 4.. and when i use this
CODE
00A5: 0@ = create_car #RCCAM from_actor $PLAYER_ACTOR with_offset 0.0 5.5 0.3


when i compile it.. it turn to this
CODE
0@ = 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:
CODE
:CARSL_6439
00D6: if
00E1:   player 0 pressed_key 16
004D: jump_if_false @CARSL_6535
010B: 5@ = player $PLAYER_CHAR money
00D6: if
002D:   5@ >= 14@ // (int)
004D: jump_if_false @CARSL_6512
0012: 14@ *= -1
0109: player $PLAYER_CHAR money += 14@  
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:
CODE
:CARSL_6439
if
00E1:   player 0 pressed_key 16
jf @CARSL_6535
5@ = Player.Money($PLAYER_CHAR)
if
002D:   5@ >= 14@ // (int)
jf @CARSL_6512
14@ *= -1
Player.Money($PLAYER_CHAR) += 14@
jump @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 22@ at -1577.942 52.6333 40.0

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

Car.PutAt(22@, -1577.942, 52.6333, 40.0)
Users WebsitePM
  Top
 

 
TLFdjobaw  
Posted: Saturday, Sep 15 2012, 02:44
Quote Post


Un-skilled Collisions Modders
Group Icon
Group: Members
Joined: Jan 20, 2012

in.gif

XXXXX



okay thx ZAZ icon14.gif
Users WebsitePM
  Top
 

 

0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)

0 Members:

Topic Options Reply to this topicStart new topicStart Poll
Search topic for posted by (exact match)



 
IMG IMG