Here is the script im using in lua/autorun/server/donate.lua,When you type !donate nothing happens
[CODE]function DonateMOTD( ply, text, _ )
if ( string.sub( string.lower( text ), 1, 7 ) == "!donate" ) then
local url = "\"http://www.hydrogengaming.co.uk/viewtopic.php?f=10&t=40""
ply:ConCommand( "ulx motd " .. url )
return false
end
end
hook.Add( "PlayerSay", "DonateMOTD", DonateMOTD )
[/CODE]
Try replacing
[lua]
function DonateMOTD( ply, text, _ )
[/lua]
with
[lua]
function chatCommand( ply, text, public )
[/lua]
local url = "http://www.hydrogengaming.co.uk/viewtopic.php?f=10&t=40"
[QUOTE=Persious;41539759]local url = "http://www.hydrogengaming.co.uk/viewtopic.php?f=10&t=40"[/QUOTE]
Ouch, didn't see that one
[QUOTE=Persious;41539759]local url = "http://www.hydrogengaming.co.uk/viewtopic.php?f=10&t=40"[/QUOTE]
Still not working
[CODE]function DonateMOTD( ply, text, _ )
if ( string.sub( string.lower( text ), 1, 7 ) == "!donate" ) then
local url = "http://www.hydrogengaming.co.uk/viewtopic.php?f=10&t=40"
ply:ConCommand( "ulx motd " .. url )
return false
end
end
hook.Add( "PlayerSay", "DonateMOTD", DonateMOTD )[CODE/]
ply:SendLua([[gui.OpenURL("http://www.hydrogengaming.co.uk/viewtopic.php?f=10&t=40")]})
Only the steam browser allows secure connections.
Yea agree with above, You're trying to open a url, ulx motd have no args and it just shows motd, there's no special arg to show a page, i'm sure you're trying to open a website on client, ulx motd is different.
Im trying to do the same, what will the whole code look like? I'm kinda a newbie, sorry.
Thanks.
[QUOTE=nicwillu;41685727]Im trying to do the same, what will the whole code look like? I'm kinda a newbie, sorry.
Thanks.[/QUOTE]
See [url=http://facepunch.com/showthread.php?t=1295459&p=41682745&viewfull=1#post41682745]this post[/url].
Sorry, you need to Log In to post a reply to this thread.