[CLEO] Find Player script don't work

Status
Not open for further replies.
Joined
Jun 19, 2017
Messages
14
Likes
0
Points
1
#1
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
221
Likes
0
Points
16
Location
Romania
#3
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
        [email protected] == 1 // [email protected] 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 [email protected]
        for [email protected] = 0 to 999
            if
                SAMP.IsPlayerConnected([email protected])
            then
                // get handle
                if
                    056D:   actor [email protected] defined
                then
                    if
                        int [email protected] == [email protected] // [email protected] = player id which you r looking for
                    then
                        00A0: store_actor [email protected] 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
                        [email protected] = 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
            [email protected] == 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: [email protected] = scan_string [email protected] format "%d" [email protected]
then
    [email protected] = 1
end
cmdret

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