Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function sampGetPlayerIdByNickname(nick)
- local _, myid = sampGetPlayerIdByCharHandle(playerPed)
- if tostring(nick) == sampGetPlayerNickname(myid) then return myid end
- for i = 0, 1000 do if sampIsPlayerConnected(i) and sampGetPlayerNickname(i) == tostring(nick) then return i end end
- return -1
- end
Advertisement
Add Comment
Please, Sign In to add comment