Ulysses
General => Developers Corner => Topic started by: [SC] Paul on April 14, 2013, 01:22:20 PM
-
I want a command to open my donations page without players having to tab out I was using this
function donateCommand( pl, text, teamonly )
if (text == "!donate") then
pl:SendLua([[gui.OpenURL("http://myurl.com/donate")]]) -- Change ADDRESS to your chosen page.
for k, v in pairs(player.GetAll()) do v:ChatPrint( "Player " .. pl:Nick() .. " has donated to the server via !donate" )
end
end
end
hook.Add( "PlayerSay", "Chat", donateCommand )
All it done was display the text "Player Paul has donated to the server via !donate" does anyone know what i could do to fix this?
-
Here this should be working ( at least it does on my server.)
Also make sure you put it in lua/autorun
function donateCommand( pl, text, teamonly )
if (text == "!donate") then
pl:SendLua([[gui.OpenURL("http://bendersvilla.net")]]) -- Change ADDRESS to your chosen page.
for k, v in pairs(player.GetAll()) do v:ChatPrint( "" .. pl:Nick() .. " has gone to !donate." )
end
end
end
hook.Add( "PlayerSay", "ccdonate", donateCommand )
-
That worked thanks! :D