Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- registerVariable('cops', 'smth',
- function()
- pd_skin = {267, 265, 266, 280, 281, 282, 283, 284, 288}
- pd_ids = {}
- for player_id = 0, 1000 do
- if sampIsPlayerConnected(player_id) then
- local is_exist, char_handle sampGetCharHandleBySampPlayerId(player_id)
- if is_exist then
- for i = 1, #pd_skin do
- if getCharModel(char_handle) == pd_skin[i] then
- local my_x, my_y, my_z = getCharCoordinates(PLAYER_PED)
- local char_x, char_y, char_z = getCharCoordinates(char_handle)
- if getDistanceBetweenCoords3d(my_x, my_y, my_z, char_x, char_y, char_z) <= 10 then
- table.insert(pd_ids, player_id);
- end
- end
- end
- end
- end
- end
- str = ''
- if #pd_ids ~= 0 then
- for i = 1, #pd_ids do str = str .. ', ' ..pd_ids[i] end
- end
- return str
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement