Hello! I need help making a custom command for my DarpRP server.
I can't get the Console command to run it says invaild args, the command is ment to be rp_citizen {name}. But inserting target_ply doesnt work ? D:
local CATERGORY_NAME = "DarkRP Commands"
function ulx.forcedemote( calling_ply, target_ply )
if target_ply:Alive() then
RunConsoleCommand("rp_citizen", target_ply )
target_ply:ChatPrint("You have been demoted by "..calling_ply:Nick().."!")
ulx.fancyLogAdmin( calling_ply, true, "#A demoted #T", target_ply )
end
end
local forcedemote = ulx.command( CATERGORY_NAME, "ulx forcedemote", ulx.forcedemote, "!fdemote", true )
forcedemote:addParam{ type=ULib.cmds.PlayerArg }
forcedemote:defaultAccess( ULib.ACCESS_ADMIN )
forcedemote:help( "Force Demoted A Player" )