Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local CATEGORY_NAME = "Essentials"
- function ulx.secretspec( calling_ply, target_ply, should_unsspec )
- if should_unsspec then
- target_ply:SetTeam(2)
- if calling_ply == target_ply then
- ulx.fancyLogAdmin(calling_ply, true, "#A left secretspec")
- elseif calling_ply != target_ply then
- ulx.fancyLogAdmin(calling_ply, true, "#A made #T leave secretspec", target_ply)
- end
- else
- if IsValid(target_ply) then
- target_ply:SetTeam(TEAM_UNASSIGNED)
- target_ply:KillSilent()
- if calling_ply == target_ply then
- ulx.fancyLogAdmin(calling_ply, true, "#A entered secretSpec")
- else
- ulx.fancyLogAdmin(calling_ply, true, "#A made #T enter secretSpec", target_ply)
- end
- elseif !IsValid(target_ply) then
- ULib.tsayError("Not a valid target!")
- end
- end
- end
- local secretspec = ulx.command(CATEGORY_NAME, "ulx secretspec", ulx.secretspec, "!secretspec", false)
- secretspec:addParam({type = ULib.cmds.PlayerArg})
- secretspec:addParam{ type=ULib.cmds.BoolArg, invisible=true }
- secretspec:defaultAccess(ULib.ACCESS_ADMIN)
- secretspec:help("Are we rushing in, are we going all sneaky beaky like?")
- secretspec:setOpposite("ulx unsspec", {_, _, true}, "!unsspec")
- //Works for gamemodes like Murder
- //Made by Zero
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement