• Chat Command
    2 replies, posted
i am kinda new to developing and i cant figure this out i am trying to make a darkrp chat command that when said it will print in chat for all players to see for Example the /advert command or the /ooc command i am trying to make a chat command like that were it will print in chat because i cant figure it out and i need some help making the code
[QUOTE=PhantomSniz19;50743216]i am kinda new to developing and i cant figure this out i am trying to make a darkrp chat command that when said it will print in chat for all players to see for Example the /advert command or the /ooc command i am trying to make a chat command like that were it will print in chat because i cant figure it out and i need some help making the code[/QUOTE] Firstly, if you know nothing don't come here, you need atleast some expierence... just go to [url]https://wiki.garrysmod.com/page/GM/PlayerSay[/url] And it really isn't hard to read over something... [CODE]hook.Add( "OnPlayerChat", "Adverts", function( ply, text, team ) if ( string.sub( text, 1, 4 ) == "/ooc" ) then return "[OOC] " .. string.sub( text, 5 ) end end )[/CODE]
i know how to code i just didnt know where to look on garrys mod wiki to find it
Sorry, you need to Log In to post a reply to this thread.