ice_brasil Posted May 9, 2013 Share Posted May 9, 2013 My script does not work, I want to when a player by typing / teles appear on your screen in the center The message example: /arena . What did this wrong help me! My lua: function shout(player, cmd, ...) local accountname = getAccountName(getPlayerAccount(player)) if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "Admin" )) then for id, players in ipairs(getElementsByType("player")) do local message = table.concat({...}," ") local textDisplay = textCreateDisplay () local nombre = getPlayerName(player) myTextItem = textCreateTextItem ( "/drop /drop2 /drop3", 0.5, 0.5 ) textDisplayAddText ( textDisplay, textItem ) textDisplayAddObserver ( textDisplay, players ) setTimer ( textDestroyTextItem, 2500, 1, textItem ) setTimer ( textDestroyDisplay, 2500, 1, textDisplay ) end else outputChatBox("",player,255,255,255) end end addCommandHandler("teles", shout) Link to comment
iPrestege Posted May 9, 2013 Share Posted May 9, 2013 Try this : function shout(player, cmd, msg) local accountname = getAccountName(getPlayerAccount(player)) if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "Admin" )) then for id, players in ipairs(getElementsByType("player")) do local message = tostring(msg) local textDisplay = textCreateDisplay () local nombre = getPlayerName(player) textItem = textCreateTextItem ( message, 0.5, 0.5 ) textDisplayAddText ( textDisplay, textItem ) textDisplayAddObserver ( textDisplay, players ) setTimer ( textDestroyTextItem, 2500, 1, textItem ) setTimer ( textDestroyDisplay, 2500, 1, textDisplay ) end else outputChatBox("",player,255,255,255) end end addCommandHandler("teles", shout) Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now