DESCRIPTION:
Print in chat (adminlog) that you have promoted (or demoted) someone. Simple, yet funny.
SOURCE:
function ulx.fpromote( calling_ply, target_ply, prank ) -- fpromote
ulx.fancyLogAdmin( calling_ply, "#A promoted #T to #s", target_ply, prank ) -- Fake Promote
ulx.fancyLogAdmin( calling_ply, true, "#A fake promoted #T", target_ply ) -- Tells admins
end
local fpromote = ulx.command( "Tom's Fun", "ulx fakepromote", ulx.fpromote, "!fpromote", true )
fpromote:addParam{ type=ULib.cmds.PlayersArg }
fpromote:addParam{ type=ULib.cmds.StringArg, hint="Group Name" }
fpromote:addParam{ type=ULib.cmds.BoolArg, invisible=true }
fpromote:defaultAccess( ULib.ACCESS_SUPERADMIN ) -- End
function ulx.fdemote( calling_ply, target_ply, drank ) -- fdemote
ulx.fancyLogAdmin( calling_ply, "#A demoted #T to #s", target_ply, drank ) -- Fake Demote
ulx.fancyLogAdmin( calling_ply, true, "#A fake demoted #T", target_ply ) -- Tells admins
end
local fdemote = ulx.command( "Tom's Fun", "ulx fakedemote", ulx.fdemote, "!fdemote", true )
fdemote:addParam{ type=ULib.cmds.PlayersArg }
fdemote:addParam{ type=ULib.cmds.StringArg, hint="Group Name" }
fdemote:addParam{ type=ULib.cmds.BoolArg, invisible=true }
fdemote:defaultAccess( ULib.ACCESS_SUPERADMIN ) -- End
USAGE: I recommend using console, or menu to run this command (located in Fun).
Menu: Tom's Fun > fpromote/fdemote > Player + GroupName BEST OPTION
Console: ulx fpromote/fdemote "<name>" "<groupname>" SECOND OPTION
Chat: !fpromote/!fdemote "<name>" "<groupname>" LAST OPTION
INSTALLATION:
Download == Extract the zip and the contents into /addons file (garrysmod/addons/), relaunch map, and its done.
Source == Copy the source code and paste it into a new .lua file in /sh file on ulx (garrysmod/addons/ulx/lua/ulx/modules/sh), relaunch map, and its done.
(UPDATED) Fixed poor coding