CLEO Help Follow script

CLEO related
Status
Not open for further replies.

veysileth

Active member
Joined
Mar 23, 2017
Messages
85
Reaction score
6
Sup'

Im RP player and i have a little problem.

So im trying to modify follow "cheat" by Niko.

Code:
// This file was decompiled using SASCM.ini published by GTAG (http://gtag.gtagaming.com/opcode-database) on 14.6.2013
{$CLEO .cs}

//-------------MAIN---------------
0000: NOP 
0006: 4@ = 0 

:NONAME_9
8AFA:   not is_samp_available 
004D: jump_if_false @NONAME_30 
0001: wait 400 ms 
0002: jump @NONAME_9 

:NONAME_30
0001: wait 1000 ms 
0AF8: samp add_message_to_chat "{FF0048}[FOLLOW]: {FFFFFF}ÓŃĎĹŘÍÎ ÇŔĂĐÓĆĹÍ. ŔÂŇÎĐ: {FF0048}NIKO" color -1  
0B34: samp register_client_command "FOLLOW" to_label @NONAME_187 

:NONAME_120
0001: wait 0 ms 
00D6: if 
0039:   4@ == 1 
004D: jump_if_false @NONAME_180 
00A0: store_actor 3@ position_to 5@ 6@ 7@ 
000F: 6@ -= 0.0
000F: 7@ -= 1.0  
00A1: put_actor $PLAYER_ACTOR at 5@ 6@ 7@ 

:NONAME_180
0002: jump @NONAME_120 

:NONAME_187
0B35: samp 0@ = get_last_command_params 
00D6: if 
0AD4: 1@ = scan_string 0@ format "%D" 2@  
004D: jump_if_false @NONAME_368 
0B20: samp 3@ = actor_handle_by_samp_player_id 2@ 
00D6: if 
056D:   actor 3@ defined 
004D: jump_if_false @NONAME_350 
0B12: 4@ = 4@ XOR 1 
00D6: if 
0039:   4@ == 1 
004D: jump_if_false @NONAME_294 
0AF8: samp add_message_to_chat "{FF0048}1" color -1  
0002: jump @NONAME_348 

:NONAME_294
0AF8: samp add_message_to_chat "{FF0048}2" color -1  
00A0: store_actor 3@ position_to 5@ 6@ 7@ 
000B: 6@ += 0.5 
00A1: put_actor $PLAYER_ACTOR at 5@ 6@ 7@ 

:NONAME_348
0B43: samp cmd_ret 

:NONAME_350
0AF8: samp add_message_to_chat "{FF0048}3" color -1  
0B43: samp cmd_ret 

:NONAME_368
0AF8: samp add_message_to_chat "{FF0048}4" color -1  
0B43: samp cmd_ret 
Already modified the pos so script user is not underground

What i try to do:
1. I'm trying to do a script which will allow the script user to follow the pilot of the maverick on his right/left side. But this script is putting user on the XYZ so the script user is always on the north/south/east/west side.. Is there a way to store angle of a player? So i can always be on his right/left side?

2. I can't shoot or use animations when this follow is active. I wonder if it's even possible to do.

Helicopters with ramps on their sides suck with samp synchro.

01B4: set_player $PLAYER_CHAR can_move 1
04D7: set_actor $PLAYER_ACTOR locked 0
not working ofc
 

veysileth

Active member
Joined
Mar 23, 2017
Messages
85
Reaction score
6
Ok that's not gonna work.
Right now im trying to make a script which will teleport script user to chosen player only when distance between them is higher than 5 meters.
So when i fall from a rail i will teleport again.
My simpler version:
but still...


Code:
// This file was decompiled using SASCM.ini published by GTAG (http://gtag.gtagaming.com/opcode-database) on 14.6.2013
{$CLEO .cs}

//-------------MAIN---------------
0000: NOP 
0006: 4@ = 0 

:NONAME_9
8AFA:   not is_samp_available 
004D: jump_if_false @NONAME_30 
0001: wait 1000 ms 
0002: jump @NONAME_9 

:NONAME_30
0001: wait 1000 ms 
0B34: samp register_client_command "KEK" to_label @NONAME_178 
0B34: samp register_client_command "UNKEK" to_label @NONAME_227 

:NONAME_61
0001: wait 100 ms 
00D6: if 
0039:   4@ == 1 
004D: jump_if_false @NONAME_61 
0001: wait 500 ms 
00A0: store_actor 3@ position_to 5@ 6@ 7@ 
00A0: store_actor $PLAYER_ACTOR position_to 8@ 9@ 10@ 
050A: 12@ = distance_between_XYZ 5@ 6@ 7@ and_XYZ 8@ 9@ 10@
00D6: if 
0039: 12@ > 10
004D: jump_if_false @NONAME_61
00A1: put_actor $PLAYER_ACTOR at 5@ 6@ 7@
0002: jump @NONAME_61 

:NONAME_178
0B35: samp 0@ = get_last_command_params 
00D6: if 
0AD4: 1@ = scan_string 0@ format "%D" 2@  
004D: jump_if_false @NONAME_227 
0B20: samp 3@ = actor_handle_by_samp_player_id 2@ 
0006: 4@ = 1 
0B43: samp cmd_ret 

:NONAME_227
0006: 4@ = 0 
0B43: samp cmd_ret 


WTF is wrong with this:
050A: 12@ = distance_between_XYZ 5@ 6@ 7@ and_XYZ 8@ 9@ 10@
00D6: if
0039: 12@ > 10
 
Status
Not open for further replies.
Top