i need to make a command to where when you type /donate or !donate it opens my donation page which is [URL="http://metrogaming.hostoi.com/donate"]metrogaming.hostoi.com/donate[/URL]
any help?
thanks,
Metro :quagmire:
[code]-- Run clientside
hook.Add( "OnPlayerChat", "DonationPage", function( ply, text )
if ( text == "/donate" or text == "!donate" ) then
gui.OpenURL( "http://metrogaming.hostoi.com/donate" )
end
end )[/code]
ty so much!
[editline]18th August 2014[/editline]
so this goes in lua/autorun/client or lua/autorun/server or lua/autorun
Read the comment at the top of the code.
alright thanks
[editline]18th August 2014[/editline]
so in a lua file this should work?
if ( SERVER ) then
hook.Add( "OnPlayerChat", "DonationPage", function( ply, text )
if ( text == "/donate" or text == "!donate" ) then
gui.OpenURL( "http://metrogaming.hostoi.com/donate" )
end
end )
[editline]18th August 2014[/editline]
or can i remove the if server then?
Read the comment again. Paste my code EXACTLY.
alright
[QUOTE=code_gs;45734348]Read the comment again. Paste my code EXACTLY.[/QUOTE]
how do you find the power to help all those kind of guys
Sorry, you need to Log In to post a reply to this thread.