ULX Website Commands

Hi there guys!

So I followed the multiple instructions on how to create a ulx command that takes people to certain websites depending on the command, yet whenever anyone types in a command it takes them all to the same website!

This is the code template I’m using;


// Donate
function ulx.donate(ply)
local donate = ulx.command( CATEGORY_NAME, "ulx donate", ulx.group, "!donate" )
donate:defaultAccess( ULib.ACCESS_ALL )
donate:help( "Donate and get some Fucks to spend in the Pointshop, or get yourself some superpowers! All donations go right back into the server." )

So its taking everyone in the game to the same website when only one person type !donate in?

use this:
local function donateCommand( pl, text, teamonly )
if (text == “!donate”) then
pl:SendLua([[gui.OpenURL(“http://www.monarchygaming.site.nfoservers.com/donate”)]]) – Change ADDRESS to your chosen page.
for k, v in pairs(player.GetAll()) do v:ChatPrint( “Player " … pl:Nick() … " has viewed the donation options with !donate” )


hook.Add( “PlayerSay”, “Chat”, donateCommand)

Call calling_ply instead of ply

Changing function argument names doesn’t matter as long as he’s Indexing them right.

Bluebull, that works perfectly! Thanks! Just editting it to make it not announce that someone is looking at the donations.

Thank you!