I want to know how you can send information between CLEINTSIDE and SERVERSIDE as I want to try to use a clientside hook for an addon.
The clientside hooks are:
OnPlayerChat
PlayerStartVoice
Not sure, but would it be able to substitute OnPlayerChat with PlayerSay?
Use the net library. You can send net messages from server to client and vise versa.
[URL="http://wiki.garrysmod.com/page/Net_Library_Usage"]Net Library.[/URL] As it looks like you're doing a chat command, you could do this serverside.
[lua]
hook.Add("PlayerSay", "StartCMD", function(ply, text, public)
if string.sub(text, 1, 4) == "!cmd" then
//Do Stuff here
end
end)
[/lua]
Make sure that the number four is how many letters long your command is.
[QUOTE=crazyscouter;41947051]Use the net library. You can send net messages from server to client and vise versa.
[URL="http://wiki.garrysmod.com/page/Net_Library_Usage"]Net Library.[/URL] As it looks like you're doing a chat command, you could do this serverside.
[lua]
hook.Add("PlayerSay", "StartCMD", function(ply, text, public)
if string.sub(text, 1, 4) == "!cmd" then
//Do Stuff here
end
end)
[/lua]
Make sure that the number four is how many letters long your command is.[/QUOTE]
Actually, I wanted to try to recreate [url=http://coderhire.com/scripts/view/262] this[/url] script.
Just buy the script dont try to rip off people who work really hard to create stuff -.-
[QUOTE=lilplayer1220;41947603]Just buy the script dont try to rip off people who work really hard to create stuff -.-[/QUOTE]
Because every 13 year old playing garrysmod has a paypal account with $5 to spend on a simple script.
[QUOTE=Puzzle;41947683]Because every 13 year old playing garrysmod has a paypal account with $5 to spend on a simple script.[/QUOTE]
I'm sorry, but I am not a thirteen year old.
As for lilplayer, I want to recreate the script for personal use only.
Sorry, you need to Log In to post a reply to this thread.