General > Developers Corner

How do I add !apply command?

<< < (2/2)

Bytewave:
I found one problem with his code:
He calls for the value of apply_url, but he never created the convar in the first place, nor did he set a default value.

Cobalt:
You're using my code, and in my code i created a convar which is in a separate file. You need to remove the convar and concatenation part and just enter the url you want to use.

Neku:

--- Code: ---function ulx.apply( calling_ply )

calling_ply:SendLua([[gui.OpenURL( "http://www.google.com/" )]])

end

local apply = ulx.command( "Custom", "ulx apply", ulx.apply, "!apply" )
apply:defaultAccess( ULib.ACCESS_ALL )
apply:help( "Apply to staff team." )
--- End code ---

That should work.

If not, sorry, I don't know Lua.

Risteh:
Thanks, Ven. It works. And thank you Cobolt for the initial code!

Navigation

[0] Message Index

[*] Previous page

Go to full version