CLEO Help about this script

CLEO related
Status
Not open for further replies.

HowEnCokkien

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

0B43: samp register_client_command "lp" to_label @RECONNECT
0B43: samp register_client_command "info" to_label @INFO


/////////PACKET////////
:RECONNECT
wait 0
SAMP.Disconnect(0)
wait 500
SAMP.SetGameState(1) = 1
JUMP @SGCHECK
0B43: samp cmd_ret

:SGCHECK
wait 0
0B4F: samp 1@ = get_gamestate
IF
1@ == 3
THEN
wait 100
JUMP @POS
END

:POS
wait 0
IF
0ab0: 12
THEN
0B2E: 1@ = read_samp_memory 0x015970 size 2
0B2D: write samp_memory 0x015970 value 0xC390 size 2
JUMP @POSZ
END

:POSZ
wait 0
IF
0ab0: 13
THEN
0B2E: 1@ = read_samp_memory 0x015A90 size 2
0B2D: write samp_memory 0x015A90 value 0xC390 size 2
END

//////////////////INFO//////////
:INFO
wait 0
chatmsg "[{6495ED}LPRISON{F8F8FF}]{6495ED} /lp"
JUMP @INFO
0B43: samp cmd_ret
i made a script but it spamming incoming error in the chat. idk what did i wrong. can you look the script pls
 

bladero

Active member
Joined
Jan 3, 2017
Messages
73
Reaction score
0
After 0B43: always make one loop with WHILE TRUE or just simply with label and in it put wait 0
EDIT: Btw i dont mean after every 0B43: i meant to say that you make a loop after you register all commands you want .
Another Edit xD : I just noticed you were using 0b43 instead of 0b34 for commands.
 
Joined
Feb 18, 2005
Messages
2,965
Reaction score
273
Check if SAMP is fully loaded before calling samp opcodes.

[shcode=cpp]
repeat
  wait 100
until 0AFA:
[/shcode]

As said above, you need a dummy thread so the control flow won't reach your commannds callbacks.

[shcode=cpp]
while true
  wait 0
end
[/shcode]
 
Status
Not open for further replies.
Top