Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2018
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. registerVariable('cops', 'smth',
  2. function()
  3. pd_skin = {267, 265, 266, 280, 281, 282, 283, 284, 288}
  4. pd_ids = {}
  5. for player_id = 0, 1000 do
  6. if sampIsPlayerConnected(player_id) then
  7. local is_exist, char_handle sampGetCharHandleBySampPlayerId(player_id)
  8. if is_exist then
  9. for i = 1, #pd_skin do
  10. if getCharModel(char_handle) == pd_skin[i] then
  11. local my_x, my_y, my_z = getCharCoordinates(PLAYER_PED)
  12. local char_x, char_y, char_z = getCharCoordinates(char_handle)
  13. if getDistanceBetweenCoords3d(my_x, my_y, my_z, char_x, char_y, char_z) <= 10 then
  14. table.insert(pd_ids, player_id);
  15. end
  16. end
  17. end
  18. end
  19. end
  20. end
  21. str = ''
  22. if #pd_ids ~= 0 then
  23. for i = 1, #pd_ids do str = str .. ', ' ..pd_ids[i] end
  24. end
  25. return str
  26. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement