Ulysses
General => Developers Corner => Topic started by: JeromyHan on January 11, 2016, 07:14:47 PM
-
Hello I'm making a demote command so admins can demote player from their job. The console command for it is "rp_citizen playername"
This is the code I made:
function ulx.demote( calling_ply, terget_ply )
game.ConsoleCommand( "rp_citizen ", target_ply)
ulx.fancyLogAdmin( calling_ply, true, "#A Demoted #T", target_ply )
end
local demote = ulx.command( "Custom", "ulx demote", ulx.demote, "!demote", true )
demote:addParam{ type=ULib.cmds.PlayersArg }
demote:defaultAccess( ULib.ACCESS_ADMIN )
demote:help( "Demotes the target from his job" )
Thanks for the help
-
http://forums.ulyssesmod.net/index.php/topic,8718.0.html
Though more than welcome to create your own, I always recommend learning from what's already been done.
Found that searching from our front page for "rp_citizen"
-
http://forums.ulyssesmod.net/index.php/topic,8718.0.html
Though more than welcome to create your own, I always recommend learning from what's already been done.
Found that searching from our front page for "rp_citizen"
I have tried this on the server but the command does not work. It says that it demoted me but didn't actualy demote me
-
I have tried this on the server but the command does not work. It says that it demoted me but didn't actualy demote me
I'm so stupid I did not see there was a fix for it just copied the code. Thank you very much for your help!