• Print

Author Topic: Demote Command  (Read 8291 times)

0 Members and 1 Guest are viewing this topic.

Offline Rockit14

  • Newbie
  • *
  • Posts: 1
  • Karma: 0
Demote Command
« on: July 21, 2015, 10:34:21 am »
I think their should be a command which is used for DarkRP. You simply type !demote (Name) and then it will put them back to your default group (Citizen). This would be SOOO helpful on my server.

Offline MrPresident

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 2727
  • Karma: 430
    • |G4P| Gman4President
Re: Demote Command
« Reply #1 on: July 21, 2015, 10:54:00 am »
So create this or have someone create this for you.
We do not cater to specific gamemodes inside of the official ULX/ULib releases.

I'm moving this to Off-Topic. Maybe someone will see it and post some help.

Offline Tomzen

  • Full Member
  • ***
  • Posts: 115
  • Karma: -1
  • A new lua adventurer
    • Thirdage Gaming
Re: Demote Command
« Reply #2 on: July 25, 2015, 02:42:12 am »
A bit late, but here you go: /index.php/topic,8818.0.html < Post with download/instructions and usage.

SOURCE:
Code: Lua
  1. -- Config Section
  2. CATEGORY_NAME = "DarkRP" -- the category it appears in
  3. JOB_NAME = "Citizen" -- default job name
  4. CMD_NAME = "citizen" -- cmd to run (e.g ulx citizen, !citizen) Don't add the exclamation mark or "ulx"
  5. HELP_LINE = "Demote a player of choice!" -- default help message
  6. -- Config END
  7.  
  8. -- Dont edit below this line
  9. function ulx.forcedemote( calling_ply, target_ply )
  10.         game.ConsoleCommand( "rp_citizen " .. target_ply:Nick() .. "\n" ) -- Sends the command to console to run
  11.     ulx.fancyLogAdmin( calling_ply, true, "#A forced #T's job to " .. JOB_NAME, target_ply )
  12.     ULib.csay( target_ply, "Your job was forced to " .. JOB_NAME .. " by an admin." )
  13. end
  14.  
  15. local forcedemote = ulx.command( CATEGORY_NAME, "ulx " .. CMD_NAME, ulx.forcedemote, "!" .. CMD_NAME, true )
  16. forcedemote:addParam{ type=ULib.cmds.PlayerArg }
  17. forcedemote:defaultAccess( ULib.ACCESS_ADMIN )
  18. forcedemote:help( HELP_LINE ) -- End
Finished:
Impersonate
<==> FakePromote/Demote <==> RandomMap <==> ForceMic <==> Search <==> PlayMenu <==
WIP:
ServerMode <==

  • Print