Can somebody please link me to the addon where people only have to say "!join" in your server to join the steam group? i've been looking all over for it i can't seem to find it anywhere
GroupR, has the command etc. but also supports join rewards. [url]http://fcpn.ch/dfit9[/url]
If you don't want the rewards then:[lua]
local url = "http://google.com"
hook.Add("PlayerSay", "GroupJoin". function(p, t)
if t:lower() ~= "!join" then return end
p:SendLua('gui.OpenURL("'..url..'")')
end)[/lua]
[QUOTE=Jarva;45837394]GroupR, has the command etc. but also supports join rewards. [url]http://fcpn.ch/dfit9[/url]
If you don't want the rewards then:[lua]
local url = "http://google.com"
hook.Add("PlayerSay", "GroupJoin". function(p, t)
if t:lower() ~= "!join" then return end
p:SendLua('gui.OpenURL("'..url..'")')
end)[/lua][/QUOTE]
So where do i put that script?
[code]lua/autorun/server[/code]
[B]Edit:[/B]
Oops, I'm tired :v: I've updated it.
[QUOTE=Jarva;45837421][code]lua/server/autorun[/code][/QUOTE]
lua/autorun/server is the only one i can find, unless i have to go into the lua in addons?
[editline]29th August 2014[/editline]
Okay so i made a new file in lua/autorun/server and put the script in, restarted server and it doesn't work
[editline]29th August 2014[/editline]
Okay so i made a new file in lua/autorun/server and put the script in, restarted server and it doesn't work
[QUOTE=Kristian3;45837455]pls spoonfeed me i am not lua[/QUOTE]
How about you actually learn some lua before you come here?
It should just work as long as the file is included...I could be wrong though
Ew. Why waste resources on SendLua? Do this all clientside.
[code]
local url = "http://www.google.com";
local cmd = "!url";
hook.Add("OnPlayerChat", "DetectURL", function(p, text)
if (p == LocalPlayer() && string.lower(text) == cmd) then
gui.OpenURL(url);
end
end)
[/code]
*cough* lua/autorun/client *cough*
Sorry, you need to Log In to post a reply to this thread.