Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function main()
- repeat wait(0) until isSampAvailable()
- wait(2000)
- sampAddChatMessage('{FF00D6} NEWID by Bernardooo! {00F4FF}SCRIPT HAS LOADED!! USE //id',-1 )
- sampRegisterChatCommand('//newid', newfuncs)
- wait(-1)
- end
- function newfuncs(id)
- if id == "" then
- sampAddChatMessage('{FF00D6}[NEWID]:{00DD00} Используй //id [PlayerId]', -1)
- else
- result = sampIsPlayerConnected(id)
- if not result then
- sampAddChatMessage('{FF00D6}[NEWID]:{00DD00}Игрок не в сети или неверно указан ID.', -1)
- else
- local nick = sampGetPlayerNickname(id)
- local result = sampIsPlayerNpc(id)
- if result then
- npc = 'Да'
- else
- npc = 'Нет'
- end
- result_afk = sampIsPlayerPaused(id)
- if result then
- afk = 'В AFK'
- else
- npc = 'Нет'
- end
- if afk==nil then
- afk='В игре.'
- end
- local ping = sampGetPlayerPing(id)
- sampAddChatMessage('{CEC0CC}[{FF00D6}NEWID{CEC0CC}]{00DD00}NICK: {D9D4D9}'..nick..' {00DD00}'..afk..' {00DD00}PING:{D9D4D9}'..ping, -1)
- end
- 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 end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement