/command to activate.

Status
Not open for further replies.

Assolyte

New Member
Joined
Mar 15, 2017
Messages
3
Likes
0
Points
1
1
#1
Hey guys,

I found this cleo http://ugbase.eu/Thread-Checkpoint-Syncer-0-3-7 very usefull.
But the problem is I want to change the way it activates. Currently it activates if you press the key 'y', but I want it to activate when i type send a command '/abc' for example. I have been trying to edit the cleo to do this, but i am failing every time.

I hope you guys can help me.

Thanks in advance,

Assolyte
 
OP
OP
A

Assolyte

New Member
Joined
Mar 15, 2017
Messages
3
Likes
0
Points
1
1
#3
Hey! Thanks for your reply. I tried this out, but how do i make it so it doesnt toggle, but it activates the cheat only 1 time. So i can decide when i want to sync all the checkpoints.
 
OP
OP
A

Assolyte

New Member
Joined
Mar 15, 2017
Messages
3
Likes
0
Points
1
1
#4
I tried this, but now it only works 1 time. If i type the command a second time, nothing will happen.

Code:
{$CLEO}

thread "fak"
0B34: samp register_client_Command 'kaaskop' to_label @kk
[email protected] = false

:ct
wait 0
if
    [email protected] == true
then    
if     
    call @is_cp_active 0
then
    call @get_cp_pos 0 [email protected] [email protected] [email protected]
    if
        044B: $PLAYER_ACTOR
    then
        call @SendOnFootDataSync 3 [email protected] [email protected] [email protected]
    else        
        call @SendInCarDataSync 3 [email protected] [email protected] [email protected]
    end    
end
end
jump @ct
    

:is_cp_active
0AA2: [email protected] = loadlib "samp.dll"
0A8E: [email protected] = [email protected] + 0x21A10C
0A8D: [email protected] = readMem [email protected] sz 4 vp 0
[email protected] += 0x24
0A8D: [email protected] = readMem [email protected] sz 4 vp 0
IF [email protected] == TRUE
THEN 0485:  return_true
ELSE 059A:  return_false
END
0AA3: freelib [email protected]
0AB2: ret 0

:get_cp_pos
0AA2: [email protected] = loadlib "samp.dll"
0A8E: [email protected] = [email protected] + 0x21A10C
0A8D: [email protected] = readMem [email protected] sz 4 vp 0
[email protected] += 0xC
0A8D: [email protected] = readMem [email protected] sz 4 vp 0
[email protected] += 0x4
0A8D: [email protected] = readMem [email protected] sz 4 vp 0
[email protected] += 0x4
0A8D: [email protected] = readMem [email protected] sz 4 vp 0
0AA3: freelib [email protected]
0AB2: ret 3 [email protected] [email protected] [email protected]

:SendOnFootDataSync
0B2B: [email protected] = $PLAYER_ACTOR
0BBA: [email protected] [email protected]
alloc [email protected] 68
0C0D: [email protected] 6 4 = [email protected]
0C0D: [email protected] 10 4 = [email protected]
0C0D: [email protected] 14 4 = [email protected]
0BC0: [email protected]
free [email protected]
ret 0 

:SendInCarDataSync                 
[email protected] = SAMP.GetSAMPPlayerIDByActorHandle($PLAYER_ACTOR) 
[email protected] = SAMP.GetPlayerStruct([email protected]) 
[email protected] += 170
0AC8: [email protected] = allocate_memory_size 63 
0C10: memcpy destination [email protected] source [email protected] size 63 
0C0D: struct [email protected] offset 24 size 4 = [email protected] 
0C0D: struct [email protected] offset 28 size 4 = [email protected] 
0C0D: struct [email protected] offset 32 size 4 = [email protected] 
0B3D: raknet [email protected] = new_bit_stream 
RakNet.Write([email protected], 200, BS_TYPE_BYTE, 1) 
RakNet.Write([email protected], [email protected], BS_TYPE_ARRAY, 63) 
0B8B: raknet send bit_stream [email protected]                 
0B3E: raknet delete_bit_stream [email protected] 
0AC9: [email protected] 
0AB2: ret 0

:kk
wait 0
[email protected] = true
SAMP.CmdRet
goto @ct

 

Parazitas

Well-Known Member
Joined
Jan 2, 2017
Messages
699
Likes
5
Points
23
Location
Lithuania
Website
ugbase.eu
#5
Assolyte said:
I tried this, but now it only works 1 time. If i type the command a second time, nothing will happen.

Code:
{$CLEO}

thread "fak"
0B34: samp register_client_Command 'kaaskop' to_label @kk
[email protected] = false

:ct
wait 0
if
    [email protected] == true
then    
if     
    call @is_cp_active 0
then
    call @get_cp_pos 0 [email protected] [email protected] [email protected]
    if
        044B: $PLAYER_ACTOR
    then
        call @SendOnFootDataSync 3 [email protected] [email protected] [email protected]
    else        
        call @SendInCarDataSync 3 [email protected] [email protected] [email protected]
    end    
end
end
jump @ct
    

:is_cp_active
0AA2: [email protected] = loadlib "samp.dll"
0A8E: [email protected] = [email protected] + 0x21A10C
0A8D: [email protected] = readMem [email protected] sz 4 vp 0
[email protected] += 0x24
0A8D: [email protected] = readMem [email protected] sz 4 vp 0
IF [email protected] == TRUE
THEN 0485:  return_true
ELSE 059A:  return_false
END
0AA3: freelib [email protected]
0AB2: ret 0

:get_cp_pos
0AA2: [email protected] = loadlib "samp.dll"
0A8E: [email protected] = [email protected] + 0x21A10C
0A8D: [email protected] = readMem [email protected] sz 4 vp 0
[email protected] += 0xC
0A8D: [email protected] = readMem [email protected] sz 4 vp 0
[email protected] += 0x4
0A8D: [email protected] = readMem [email protected] sz 4 vp 0
[email protected] += 0x4
0A8D: [email protected] = readMem [email protected] sz 4 vp 0
0AA3: freelib [email protected]
0AB2: ret 3 [email protected] [email protected] [email protected]

:SendOnFootDataSync
0B2B: [email protected] = $PLAYER_ACTOR
0BBA: [email protected] [email protected]
alloc [email protected] 68
0C0D: [email protected] 6 4 = [email protected]
0C0D: [email protected] 10 4 = [email protected]
0C0D: [email protected] 14 4 = [email protected]
0BC0: [email protected]
free [email protected]
ret 0 

:SendInCarDataSync                 
[email protected] = SAMP.GetSAMPPlayerIDByActorHandle($PLAYER_ACTOR) 
[email protected] = SAMP.GetPlayerStruct([email protected]) 
[email protected] += 170
0AC8: [email protected] = allocate_memory_size 63 
0C10: memcpy destination [email protected] source [email protected] size 63 
0C0D: struct [email protected] offset 24 size 4 = [email protected] 
0C0D: struct [email protected] offset 28 size 4 = [email protected] 
0C0D: struct [email protected] offset 32 size 4 = [email protected] 
0B3D: raknet [email protected] = new_bit_stream 
RakNet.Write([email protected], 200, BS_TYPE_BYTE, 1) 
RakNet.Write([email protected], [email protected], BS_TYPE_ARRAY, 63) 
0B8B: raknet send bit_stream [email protected]                 
0B3E: raknet delete_bit_stream [email protected] 
0AC9: [email protected] 
0AB2: ret 0

:kk
wait 0
[email protected] = true
SAMP.CmdRet
goto @ct


 
Status
Not open for further replies.
Top