Ulysses
Ulysses Stuff => General Chat & Help and Support => Topic started by: jamysaurus on August 15, 2013, 08:03:50 AM
-
A server i play in has just added GCompute for ingame lua editing so the owner himself has an easier job to code, and the coders.
But the problem is, everyone can use it right now--how would he go about blocking it only for some ranks?
-
He is a coder and yet needs to know how to restrict a command to admin only? :D
The easiest way would be to have him open the file for the addon that has the command in it and add this to the top of the function.
if not ply:IsAdmin() then return end
^in this example I assume the function passes the player calling the function as ply. If not, change as appropriate.
-
And just to be clear, MrPresident's way wouldn't even require ULib or uLX.
Would work on any server where a player had 'admin' group access.
-
And just to be clear, MrPresident's way wouldn't even require ULib or uLX.
Would work on any server where a player had 'admin' group access.
and what else is other than ulx, evolve :p ?
-
and what else is other than ulx, evolve :p ?
100% Vanilla Console.
Something which I wish more people learned before ever installing an admin mod.
:)