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