CLEO Help Fix Opcode cleo Crash

CLEO related
Status
Not open for further replies.

Souma

Member
Joined
May 17, 2014
Messages
9
Reaction score
0
Hello Hackers !  :me_gusta:

Im working for a big cleo hack , but this part crash when i use it ,its tp to player , i try fix it but nothing , can someone of The Pro in opcods fix this and find the wrong ?! Sampfuncs needed... :computer_guy:

_____________________________________________________________________________
thread  "tpto"

if
  8AF7: get_samp_base_to 30@
then
    0A93: end_custom_thread
end
repeat
    wait 400
until 0AFA: is_samp_structures_available
0B34: samp register_client_command "tpto" to_label @GOTO


while true
:LOL
wait 0
1@ == 9999

jump [member=179]lol[/member]

:GOTO
wait 0
0@ = samp.RegisterClientCommand()
0AD4: 4@ = scan_string 0@ format "%d" 1@ //IF and SET
if
not 0@ == 9999
jf @GOTOusage
10@ = SAMP.GetSAMPPlayerIDByActorHandle($PLAYER_ACTOR)
if
803B: not 1@ == 10@
jf @GOTObad
if
SAMP.IsPlayerConnected(1@)
jf @GOTObad
0B2F: samp get_streamed_out_player_pos 1@ to 2@ 3@ 4@
Actor.PutAt($PLAYER_ACTOR, 2@, 3@, 4@)
0B20: samp 8@ = actor_handle_from_samp_playerid 1@
0B36: samp 22@ = get_player_nickname 1@
if
056D:  actor 8@ defined
jf @GOTO2ndstage
04C4: store_coords_to 2@ 3@ 4@ from_actor 8@ with_offset 0.0 -1.0 -1.0
7@ = Actor.Angle(8@)
Actor.PutAt($PLAYER_ACTOR, 2@, 3@, 4@)
Actor.Angle($PLAYER_ACTOR) = 7@
0AF8: samp add_message_to_chat "[E4]Teleported to '%s' ID '%d'" color 0x33FF00 22@ 1@
Actor.RemoveReferences(8@)
jump [member=179]lol[/member]

:GOTO2ndstage
wait 0
0AF8: samp add_message_to_chat "[E4]Teleported to '%s' ID '%d'" color 0x33FF00 22@ 1@
Actor.RemoveReferences(8@)
jump [member=179]lol[/member]

:GOTObad
wait 0
0AF8: samp add_message_to_chat "[E4] the player is not connected" color 0xCC0000
jump [member=179]lol[/member]

:GOTOusage
wait 0
0AF8: samp add_message_to_chat "[E4]USAGE: /tpto <id>" color 0xCC0000

jump [member=179]lol[/member]
______________________________________________________________________________
 

monday

Expert
Joined
Jun 23, 2014
Messages
1,127
Solutions
1
Reaction score
158
Hi, i fixed few things including:
-"while" now has its "end"
-replaced "0@ = samp.RegisterClientCommand()" with "0B35: samp 0@ = get_last_command_params"
-replaced "jump [member=179]lol[/member]" with "samp.cmdRet", whenever you register a command to the label you should use samp.cmdRet at the end of it

Btw "0B2F: samp get_streamed_out_player_pos 1@ to 2@ 3@ 4@" works only on servers with player radar markers, on servers with markers turned off you'll probably TP to the middle of the map

Code:
{$CLEO .cs}
0000: NOP 

thread   "tpto"

if
  8AF7: get_samp_base_to 30@
then
    0A93: end_custom_thread
end
repeat
    wait 400
until 0AFA: is_samp_structures_available
0B34: samp register_client_command "tpto" to_label @GOTO


while true
wait 0
end

:GOTO
wait 0
0B35: samp 0@ = get_last_command_params
if 0AD4: 4@ = scan_string 0@ format "%d" 1@ //IF and SET
then
    if
    SAMP.IsPlayerConnected(1@)
    then
    0B2F: samp get_streamed_out_player_pos 1@ to 2@ 3@ 4@
    3@ -= 1.0
    4@ -= 1.0
    Actor.PutAt($PLAYER_ACTOR, 2@, 3@, 4@)
    0B20: samp 8@ = actor_handle_from_samp_playerid 1@
    0B36: samp 22@ = get_player_nickname 1@ 
        if
        056D:   actor 8@ defined
        then
        0172: 7@ = actor 8@ Z_angle
        0173: set_actor $PLAYER_ACTOR Z_angle_to 7@
        end    
    jump @GOTO2ndstage        
    else
    jump @GOTObad
    end
else
jump @GOTOusage    
end


:GOTO2ndstage
wait 0
0AF8: samp add_message_to_chat "[E4]Teleported to '%s' ID '%d'" color 0x33FF00 22@ 1@
Actor.RemoveReferences(8@)
samp.CmdRet()


:GOTObad
wait 0
0AF8: samp add_message_to_chat "[E4] the player is not connected" color 0xCC0000
samp.CmdRet()


:GOTOusage
wait 0
0AF8: samp add_message_to_chat "[E4]USAGE: /tpto <id>" color 0xCC0000
samp.CmdRet()
 
Status
Not open for further replies.
Top