Hello, I'm very new at CLEO Scripting. I think I did something wrong, I tried to add a command for spawning gun.. Instead of spawning the gun, the command made my game freeze. I also tried to change command to Hotkey Activation and its working. I just wanna know how to do it properly with the custom command.. heres my code:
I know I did something wrong, I just can't figure it out myself.
Any help will be appreciated
Code:
{$CLEO .cs}
0000: NOP
0B34: samp register_client_command "gun" to_label @m4
31@ = 0
:MAIN
wait 0
if and
056D: actor $PLAYER_ACTOR defined
31@ == 1
jf @MAIN
31@ = 0
SAMP.CmdRet
jump @MAIN
:M4
wait 0
Model.Load(356)
if
Model.Available(356)
jf @M4
01B2: give_actor $PLAYER_ACTOR weapon 31 ammo 5
0AD1: show_formatted_text_highpriority "M4 Spawned!" time 2000
31@ = 1
SAMP.CmdRet
jump @MAIN
I know I did something wrong, I just can't figure it out myself.
Any help will be appreciated