Advertisement
Guest User

Untitled

a guest
Jul 20th, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.53 KB | None | 0 0
  1. function staffChat(thePlayer, command, message)
  2.     for player, value in ipairs(getElementsByType("player")) do
  3.         if (hasObjectPermissionTo(value, "command.kick")) then
  4.             if (message) then
  5.                 outputChatBox("Staff: "..getPlayerName(thePlayer)..": "..tostring(message).."", value, 255, 255, 0)
  6.             else
  7.                 outputChatBox("Enter a message...", thePlayer, 255, 255, 0)
  8.             end
  9.         else
  10.             outputChatBox("Sorry. you do not have the rights to use this feature.", thePlayer, 255, 0, 0)
  11.         end
  12.     end
  13. end
  14. addCommandHandler("staffchat", staffChat)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement