ULX

Author Topic: [ULX] [UPDATED/FIXED] Fake Promote/Demote ~ Troll your members into thinking they get promoted!  (Read 5566 times)

0 Members and 1 Guest are viewing this topic.

Offline Tomzen

  • Full Member
  • ***
  • Posts: 115
  • Karma: -1
  • A new lua adventurer
    • Thirdage Gaming
DESCRIPTION:
Print in chat (adminlog) that you have promoted (or demoted) someone. Simple, yet funny.

SOURCE:
Code: [Select]
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
« Last Edit: May 17, 2015, 01:46:47 AM by Tomzen »
Finished:
Impersonate
<==> FakePromote/Demote <==> RandomMap <==> ForceMic <==> Search <==> PlayMenu <==
WIP:
ServerMode <==

Offline allofmywutsteam

  • Full Member
  • ***
  • Posts: 136
  • Karma: 3
  • MNWO Owner
    • MNWO Discord
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.
« Last Edit: May 10, 2015, 08:26:08 PM by JamminR »
"Then Jesus said to his disciples, 'Whoever wants to be my disciple must deny themselves and take up their cross and follow me.'" - Matthew 16:24



MNWO: Steam | Discord | Website | Join Server

Offline Tomzen

  • Full Member
  • ***
  • Posts: 115
  • Karma: -1
  • A new lua adventurer
    • Thirdage Gaming
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.
Finished:
Impersonate
<==> FakePromote/Demote <==> RandomMap <==> ForceMic <==> Search <==> PlayMenu <==
WIP:
ServerMode <==