SHARE
TWEET

Untitled

a guest Feb 29th, 2020 69 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function main()
  2.     repeat
  3.         wait 0
  4.     until isSampAvailable()
  5.     sampRegisterChatCommand('test', test)
  6.     while true do
  7.         wait 0
  8.     end
  9. end
  10.  
  11. function test(id)
  12.     if id "" then
  13.         sampAddChatMessage("{00FF3C}Use: {FFCD0A}/test [Player ID].", -1)
  14.     else
  15.         local result = sampIsPlayerConnected(id)
  16.         if not result then
  17.             sampAddMessage("{D197EA}[LUA]: {97E1EA}Player is not connected!", -1)
  18.         else
  19.             local nick = sampGetPlayerNickname(id)
  20.             local result = sampIsPlayerNpc(id)
  21.             if resul then
  22.                 local NPC = 'Yes'
  23.             else
  24.                 local NPC = 'No'
  25.             end
  26.            
  27.             local result = sampIsPlayerPaused(id)
  28.             if result then
  29.                 local AFK = 'Yes'
  30.             else
  31.                 local AFK = 'No'
  32.             end
  33.            
  34.             sampAddChatMessage("{6084EE}[LUA]: {EEAB60}Nick: "..nick..", {FFFFFF}ID: "..id..", {FFFE00}NPC: "..NPC..", {00FF3C}AFK: "..afk.."{FFFFFF}.", -1)
  35.         end
  36.     end
  37. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top