Ulysses Stuff > Releases
[ULX] [UPDATED/FIXED] Fake Promote/Demote ~ Troll your members into thinking they get promoted!
(1/1)
Tomzen:
DESCRIPTION:
Print in chat (adminlog) that you have promoted (or demoted) someone. Simple, yet funny.
SOURCE:
--- Code: ---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
--- End code ---
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
allofmywutsteam:
I read somewhere else in the forums here to try to format your release as an addon so it has uniqueness or some <censor>. Anyway, I'll probably just take the code and inject it into one of the existing modules, but if you had it as an addon it would be easier to track and whatnot. Not sure how the person worded it.
Tomzen:
Yeah don't worry dude, looking over, the coding is poor and barely works, so I'm recoding basically all my scripts and replacing them, including this one.
Navigation
[0] Message Index
Go to full version