Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function main()
- repeat
- wait 0
- until isSampAvailable()
- sampRegisterChatCommand('test', test)
- while true do
- wait 0
- end
- end
- function test(id)
- if id "" then
- sampAddChatMessage("{00FF3C}Use: {FFCD0A}/test [Player ID].", -1)
- else
- local result = sampIsPlayerConnected(id)
- if not result then
- sampAddMessage("{D197EA}[LUA]: {97E1EA}Player is not connected!", -1)
- else
- local nick = sampGetPlayerNickname(id)
- local result = sampIsPlayerNpc(id)
- if resul then
- local NPC = 'Yes'
- else
- local NPC = 'No'
- end
- local result = sampIsPlayerPaused(id)
- if result then
- local AFK = 'Yes'
- else
- local AFK = 'No'
- end
- sampAddChatMessage("{6084EE}[LUA]: {EEAB60}Nick: "..nick..", {FFFFFF}ID: "..id..", {FFFE00}NPC: "..NPC..", {00FF3C}AFK: "..afk.."{FFFFFF}.", -1)
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement