CLEO Help Whats wrong with this script?

CLEO related
Status
Not open for further replies.

HowEnCokkien

Well-known member
Joined
Jul 9, 2017
Messages
307
Reaction score
10
Code:
{$CLEO .cs}


///////////////MAIN//////////////
0000:NOP
thread 'tgun'
if
0@ = SAMP.Base()
jf @TGUN_28
0A93: end_custom_thread

:TGUN_28
wait 250
SAMP.Available
jf @TGUN_28
chatmsg "Test Gun Loaded!"
0B34: samp register_client_command "tgun" to_label @TGUN_184

:TGUN_173
wait 0
goto @TGUN_173

:TGUN_184
Model.Load(362)
0B34: load_requested_models
Actor.GiveWeaponAndAmmo($PLAYER_ACTOR, Minigun, 9999)
wait 100
Model.Destroy(362)
 

bladero

Active member
Joined
Jan 3, 2017
Messages
73
Reaction score
0
Theres problem in line 25 - 0B34: load_requested_models. It looks like this opcode requires 2 params. U can just left click on opcode in your script and it will tell u in the bottom left corner how many params. it is expecting.
 

Husnain

Well-known member
Joined
May 20, 2016
Messages
228
Reaction score
9
Location
Mars
The game will crash obviously because you didn't even Available the model and you're spawning it directly, LOL! No, that's wrong. First Load the Model then Available the Model and then spawn it. Will work 100%.
 

HowEnCokkien

Well-known member
Joined
Jul 9, 2017
Messages
307
Reaction score
10
Husnain said:
The game will crash obviously because you didn't even Available the model and you're spawning it directly, LOL! No, that's wrong. First Load the Model then Available the Model and then spawn it. Will work 100%.

omg man just omg, i getting paramater errors on compile. not ingame errors lol. you dont read the post
 

_=Gigant=_

Well-known member
Joined
Mar 21, 2017
Messages
353
Reaction score
16
HowEnCokkien said:
Husnain said:
The game will crash obviously because you didn't even Available the model and you're spawning it directly, LOL! No, that's wrong. First Load the Model then Available the Model and then spawn it. Will work 100%.

omg man just omg, i getting paramater errors on compile. not ingame errors lol. you dont read the post

Code:
{$CLEO .cs}


///////////////MAIN//////////////
0000:NOP
thread 'tgun'
0@ = SAMP.Base()
jf @TGUN_28
0A93: end_custom_thread

:TGUN_28
wait 250
SAMP.Available
jf @TGUN_28
chatmsg "Test Gun Loaded!"
0B34: samp register_client_command "tgun" to_label @TGUN_184

:TGUN_173
wait 0
goto @TGUN_173

:TGUN_184
Model.Load(362)
038B: load_requested_models
Actor.GiveWeaponAndAmmo($PLAYER_ACTOR, Minigun, 9999)
wait 100
Model.Destroy (362)
 

HowEnCokkien

Well-known member
Joined
Jul 9, 2017
Messages
307
Reaction score
10
_=Gigant=_ said:
HowEnCokkien said:
Husnain said:
The game will crash obviously because you didn't even Available the model and you're spawning it directly, LOL! No, that's wrong. First Load the Model then Available the Model and then spawn it. Will work 100%.

omg man just omg, i getting paramater errors on compile. not ingame errors lol. you dont read the post

Code:
{$CLEO .cs}


///////////////MAIN//////////////
0000:NOP
thread 'tgun'
0@ = SAMP.Base()
jf @TGUN_28
0A93: end_custom_thread

:TGUN_28
wait 250
SAMP.Available
jf @TGUN_28
chatmsg "Test Gun Loaded!"
0B34: samp register_client_command "tgun" to_label @TGUN_184

:TGUN_173
wait 0
goto @TGUN_173

:TGUN_184
Model.Load(362)
038B: load_requested_models
Actor.GiveWeaponAndAmmo($PLAYER_ACTOR, Minigun, 9999)
wait 100
Model.Destroy (362)

ty
 
Status
Not open for further replies.
Top