CLEO Help [CLEO] Find Player script don't work

CLEO related
Status
Not open for further replies.

miwkk

Member
Joined
Jun 19, 2017
Messages
14
Reaction score
0
When I type /find [ID] if player is not in my stream, it show's marker on 0,0 coordinates, but when player is in my streaming it show him on the map.
 

shanker

Well-known member
Joined
Sep 18, 2016
Messages
291
Reaction score
17
Location
Romania
you could make a func that will tp you in most wanted places and make a for loop to see if there is any player with id / name you d like to find

you should use SetPlayerSyncPos but this is detectable if anyone is spectating you

// later edit

the first thing that went through my head

i did this shet at hour so sry for mistakes i didn't tested it


[shcode=cpp]
while true
    wait 0
    if
        15@ == 1 // 15@ is true when you type command
    then
        {would be enough 3 locations per city / 350m == stream zone}
        
        {that's the first one}
        0AB1: call_scm_func @SendOnFootDataSync pos x pos y pos z
        int 16@
        for 0@ = 0 to 999
            if
                SAMP.IsPlayerConnected(0@)
            then
                // get handle
                if
                    056D:   actor 1@ defined
                then
                    if
                        int 0@ == 16@ // 16@ = player id which you r looking for
                    then
                        00A0: store_actor 1@ position_to actor_handle_pos_x actor_handle_pos_y actor_handle_pos_z
                        chatmsg "player x is streamed: %0.1f %0.1f %0.1f" actor_handle_pos_x actor_handle_pos_y actor_handle_pos_z
                        15@ = 0 // if player has been found on the first/second etc location script will not search anymore
                    end
                end
            end
        end
        
        {the second one and so on}
        if
            15@ == 1 // we check if the player has been found in the past locations
        then
            // same shits as above
        end
    end
end

:find
// get cmd params
if
    0AD4: 33@ = scan_string 0@ format "%d" 16@
then
    15@ = 1
end
cmdret

:SendOnFootDataSync
:SendOnFootDataSync
3@ = SAMP.GetSAMPPlayerIDByActorHandle($PLAYER_ACTOR)
3@ = SAMP.GetPlayerStruct(3@)
3@ += 109
0AC8: 4@ = allocate_memory_size 68
0C10: memcpy destination 4@ source 3@ size 68
0C0D: struct 4@ offset 6 size 4 = 0@
0C0D: struct 4@ offset 10 size 4 = 1@
0C0D: struct 4@ offset 14 size 4 = 2@
0B3D: raknet 5@ = new_bit_stream
RakNet.Write(5@, 207, 0, 1)
RakNet.Write(5@, 4@, 5, 68)
0B8B: raknet send bit_stream 5@
0B3E: raknet delete_bit_stream 5@
0AC9: free_allocated_memory 4@
0AB2: ret 0[/shcode]
 
Status
Not open for further replies.
Top