GerardWay Posted May 11, 2013 Share Posted May 11, 2013 Can someone tell me how to make a script that creates a message in big letters to everyone in the server, and make the message bold and green, when an admin types "/shout (message)" . Thans Link to comment
xXMADEXx Posted May 11, 2013 Share Posted May 11, 2013 Youll need to make it trigger to client event, so that everyone sees it, so: triggerClientEvent dxDrawText Link to comment
GerardWay Posted May 11, 2013 Author Share Posted May 11, 2013 Example please? Its late so I'm too tired to figure this out lol Link to comment
xXMADEXx Posted May 11, 2013 Share Posted May 11, 2013 -- Here is what it will basicly look like, but it needs a little work. Server: addCommandHandler("shout", function ( player, command, text1 ) -- You'll need to edit it, so you can do more then just one word. if ( text1 ) then triggerClientEvent(root, "onPlayerShout", root, text1 ) end end ) Client: text = "" function onPlayerShout ( text ) if ( text ) then text = text addEventHandler("onClientRender", root, dx ) else return end end addEvent("onPlayerShout", true) addEventHandler ( "onPlayerShout", root, onPlayerShout ) function dx ( ) local rx, ry = guiGetScreenSize() dxDrawText(text, 0, 0, rx, ry, tocolor( 255, 255, 255, 255 ), 3, "default", "center", "center") end 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