pinigin

Untitled

Feb 15th, 2020
443
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. function sampGetPlayerIdByNickname(nick)
  2. local _, myid = sampGetPlayerIdByCharHandle(playerPed)
  3. if tostring(nick) == sampGetPlayerNickname(myid) then return myid end
  4. for i = 0, 1000 do if sampIsPlayerConnected(i) and sampGetPlayerNickname(i) == tostring(nick) then return i end end
  5. return -1
  6. end
Advertisement
Add Comment
Please, Sign In to add comment