ZeyadGTX Posted June 8, 2014 Share Posted June 8, 2014 Hey i use This Resources , which allow me to Send Message to all players i need just help in . Like i /shout Hello ineed to outPutChatBox Hello and i need getPlayerName like if some one called Carmen Shouted it seems like that Carmen : Hello this shout belongs to SolidSnake 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) local textItem = textCreateTextItem( ""..message, 0.5, 0.5, 2, 205, 0, 0, 255, 3, "center", "center" ) textDisplayAddText ( textDisplay, textItem ) textDisplayAddObserver ( textDisplay, players ) setTimer ( textDestroyTextItem, 5000, 1, textItem ) setTimer ( textDestroyDisplay, 5000, 1, textDisplay ) end else outputChatBox("You cannot use this command!",player,255,12,15) end end addCommandHandler("shout", shout) Link to comment
Karuzo Posted June 8, 2014 Share Posted June 8, 2014 Replace every "player" with "players". Link to comment
Interpol Posted June 8, 2014 Share Posted June 8, 2014 Hello, I have a small issue with the function outputChatBox. Following the example of a wiki i done like that: outputChatBox ("#FF0000Hello # 00FF00World", getRootElement (), 255, 255, 255, true) And the output should be Hello World , but I get the "#FF0000Hello #00FF00World" . Trying more options outputChatBox ("Red #FFFFFF: White", 255, 0, 0) I got Red #FFFFFF: White . How should I do, to get red White ? Link to comment
ZeyadGTX Posted June 8, 2014 Author Share Posted June 8, 2014 outputChatBox ("Red #FFFFFF: White", 255, 0, 0,true) Link to comment
ZeyadGTX Posted June 8, 2014 Author Share Posted June 8, 2014 outputChatBox ("Red #FFFFFF: White", 255, 0, 0,true) look try that outputChatBox ("#FF0000Hello #FFFFFFWold",255,0,0,true) Link to comment
-.Paradox.- Posted June 8, 2014 Share Posted June 8, 2014 (edited) Code Removed by Nikolai96 You must cancel the Admin panel 'shout' command as well, or you can chance the code command handler to 'shoutall'. Edited June 8, 2014 by Guest Link to comment
ZeyadGTX Posted June 8, 2014 Author Share Posted June 8, 2014 Thank you Steve you are Awesome Link to comment
ZeyadGTX Posted June 8, 2014 Author Share Posted June 8, 2014 But i have another problem Link to comment
ZeyadGTX Posted June 8, 2014 Author Share Posted June 8, 2014 its fixed now THanks For Help Bro Link to comment
-.Paradox.- Posted June 8, 2014 Share Posted June 8, 2014 You're welcome, And i'm not your bro. Do for me a favor & stop copying Grafuroam, be original. Link to comment
ZeyadGTX Posted June 8, 2014 Author Share Posted June 8, 2014 well iam starting to do that but i need another things more 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