Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rtv_required = 0.5
- rtv_timeout = -1
- votekick_required = 0.7
- spam_max = 5
- spam_timeout = 60
- script_check = 0
- cur_players = 0
- rtv_initiated = 0
- votekick_allowed = true
- admin_table = {}
- users_table = {}
- mute_table = {}
- suspend_table = {}
- players = {}
- players2 = {}
- bos_table = {}
- boslog_table = {}
- access_table = {}
- rtv_table = {}
- votekick_table = {}
- votekicktimeout_table = {}
- spam_table = {}
- spamtimeout_table = {}
- ghost_table = {}
- time_passed = 0 -- Initialize time_passed to 0 seconds
- mode = {}
- objspawntype = {}
- objspawntag = {}
- vehicle_drone_table = {}
- -- create subtables
- for i=0,15 do
- vehicle_drone_table[i] = {}
- end
- Object_table = {}
- id = 0
- message_table = {}
- Chat = 0
- timer_started = 0
- message_delay = 3
- objects = {}
- -- Bipeds
- objects[1] = {"cyborg", "bipd", "characters\\cyborg_mp\\cyborg_mp"}
- -- Equipment
- objects[2] = {"camo", "eqip", "powerups\\active camouflage"}
- objects[3] = {"health", "eqip", "powerups\\health pack"}
- objects[4] = {"overshield", "eqip", "powerups\\over shield"}
- objects[5] = {"fnade", "eqip", "weapons\\frag grenade\\frag grenade"}
- objects[6] = {"pnade", "eqip", "weapons\\plasma grenade\\plasma grenade"}
- -- Vehicles
- objects[7] = {"shee", "vehi", "vehicles\\banshee\\banshee_mp"}
- objects[8] = {"turret", "vehi", "vehicles\\c gun turret\\c gun turret_mp"}
- objects[9] = {"ghost", "vehi", "vehicles\\ghost\\ghost_mp"}
- objects[10] = {"rhog", "vehi", "vehicles\\rwarthog\\rwarthog"}
- objects[11] = {"tank", "vehi", "vehicles\\scorpion\\scorpion_mp"}
- objects[12] = {"hog", "vehi", "vehicles\\warthog\\mp_warthog"}
- -- Weapons
- objects[13] = {"rifle", "weap", "weapons\\assault rifle\\assault rifle"}
- objects[14] = {"ball", "weap", "weapons\\ball\\ball"}
- objects[15] = {"flag", "weap", "weapons\\flag\\flag"}
- objects[16] = {"flamethrower", "weap", "weapons\\flamethrower\\flamethrower"}
- objects[17] = {"needler", "weap", "weapons\\needler\\mp_needler"}
- objects[18] = {"pistol", "weap", "weapons\\pistol\\pistol"}
- objects[19] = {"ppistol", "weap", "weapons\\plasma pistol\\plasma pistol"}
- objects[20] = {"prifle", "weap", "weapons\\plasma rifle\\plasma rifle"}
- objects[21] = {"frg", "weap", "weapons\\plasma_cannon\\plasma_cannon"}
- objects[22] = {"rocket", "weap", "weapons\\rocket launcher\\rocket launcher"}
- objects[23] = {"shotgun", "weap", "weapons\\shotgun\\shotgun"}
- objects[24] = {"sniper", "weap", "weapons\\sniper rifle\\sniper rifle"}
- -- Projectiles
- objects[25] = {"sheebolt", "proj", "vehicles\\banshee\\banshee bolt"}
- objects[26] = {"sheerod", "proj", "vehicles\\banshee\\mp_banshee fuel rod"}
- objects[27] = {"turretbolt", "proj", "vehicles\\c gun turret\\mp gun turret"}
- objects[28] = {"ghostbolt", "proj", "vehicles\\ghost\\ghost bolt"}
- objects[29] = {"tankshot", "proj", "vehicles\\scorpion\\bullet"}
- objects[30] = {"tankshell", "proj", "vehicles\\scorpion\\tank shell"}
- objects[31] = {"hogshot", "proj", "vehicles\\warthog\\bullet"}
- objects[32] = {"rifleshot", "proj", "weapons\\assault rifle\\bullet"}
- objects[33] = {"flame", "proj", "weapons\\flamethrower\\flame"}
- objects[34] = {"fnadeproj", "proj", "weapons\\frag grenade\\frag grenade"}
- objects[35] = {"needlershot", "proj", "weapons\\needler\\mp_needle"}
- objects[36] = {"pistolshot", "proj", "weapons\\pistol\\bullet"}
- objects[37] = {"pnadeproj", "proj", "weapons\\plasma grenade\\plasma grenade"}
- objects[38] = {"ppistolbolt", "proj", "weapons\\plasma pistol\\bolt"}
- objects[39] = {"priflebolt", "proj", "weapons\\plasma rifle\\bolt"}
- objects[40] = {"priflecbolt", "proj", "weapons\\plasma rifle\\charged bolt"}
- objects[41] = {"rocketproj", "proj", "weapons\\rocket launcher\\rocket"}
- objects[42] = {"shottyshot", "proj", "weapons\\shotgun\\pellet"}
- objects[43] = {"snipershot", "proj", "weapons\\sniper rifle\\sniper bullet"}
- commands_table = {
- "/a",
- "/afk",
- "/ammo",
- "/b",
- "/deathless",
- "/e",
- "/eject",
- "/enter",
- "/getloc",
- "/godmode",
- "/hax",
- "/heal",
- "/help",
- "/hitler",
- "/infammo",
- "/give",
- "/gethash",
- "/ghost",
- "/invis",
- "/info",
- "/j",
- "/k",
- "/kill",
- "/lo3",
- "/m",
- "/mc",
- "/mnext",
- "/mute",
- "/noweapons",
- "/pass",
- "/pl",
- "/reset",
- "/resp",
- "/revoke",
- "/say",
- "/setassists",
- "/setdeaths",
- "/setfrags",
- "/setkills",
- "/setmode",
- "/setname",
- "/setresp",
- "/setplasmas",
- "/spd",
- "/spawn",
- "/st",
- "/suspend",
- "/td",
- "/test",
- "/timelimit",
- "/tp",
- "/ts",
- "/unghost",
- "/ungod",
- "/unhax",
- "/uninvis",
- "/unmute",
- "/unsuspend",
- }
- function GetRequiredVersion()
- return 10057
- end
- function OnScriptLoad(process)
- if script_check == 0 then
- spamtimer = registertimer(970, "SpamTimer")
- maintimer = registertimer(10, "MainTimer")
- for i = 0,15 do
- cleanupdrones(i)
- end
- profilepath = getprofilepath()
- for i=0,15 do
- if gethash(i) ~= nil then
- cur_players = cur_players + 1
- end
- end
- local file = io.open(string.format("%s\\admin.txt", profilepath), "r")
- if (file ~= nil) then
- for line in file:lines() do
- local words = {}
- for word in line:gmatch("[^%,]+") do
- table.insert(words, word)
- end
- admin_table[words[2]] = words[3]
- end
- file:close()
- end
- local file = io.open(string.format("%s\\access.ini", profilepath), "r")
- if (file ~= nil) then
- local i = 0
- for line in file:lines() do
- for word in line:gmatch("[^%[%-%d%]]+") do
- word = word:gsub("data=", "")
- if word == "" then
- access_table[i] = -1
- else
- access_table[i] = word
- end
- i = i + 1
- end
- end
- file:close()
- end
- local file = io.open(string.format("%s\\files\\rtv.txt", profilepath), "r")
- if (file ~= nil) then
- rtv_initiated = tonumber(file:read("*line"))
- file:close()
- end
- if rtv_initiated < 0 then
- local file = io.open(string.format("%s\\files\\rtv.txt", profilepath), "w+")
- if (file ~= nil) then
- file:write(rtv_initiated + 1)
- file:close()
- end
- end
- local file = io.open("defaults.txt")
- if (file ~= nil) then
- dofile("defaults.txt")
- else
- hprintf("Defaults.txt not found.")
- end
- local file = io.open(string.format("%s\\bos.txt", profilepath), "r")
- if (file ~= nil) then
- for line in file:lines() do
- local words = {}
- for word in line:gmatch("[^%,]+") do
- table.insert(words, word)
- end
- local size = table.getn(words)
- local name = ""
- local hash = words[size]
- for i=1,(size - 1) do
- name = name .. " " .. words[i]
- end
- name = name:gsub(" ", "", 1)
- table.insert(boslog_table, name .. "," .. hash)
- end
- file:close()
- end
- table.sort(boslog_table)
- end
- script_check = 1
- end
- function OnScriptUnload()
- local file = io.open(profilepath .. "//files//bos.txt", "w+")
- if (file ~= nil) then
- for k,v in pairs(boslog_table) do
- if v ~= nil then
- file:write(v .. "\n")
- end
- end
- file:close()
- end
- for i = 0,15 do
- cleanupdrones(i)
- end
- end
- function OnNewGame(map)
- registertimer(1000, "TimelimitTimer")
- end
- function OnGameEnd(mode)
- if mode == 1 then
- if maintimer ~= nil then
- removetimer(maintimer)
- end
- if spamtimer ~= nil then
- removetimer(spamtimer)
- end
- if rtvtimer ~= nil then
- removetimer(rtvtimer)
- end
- if votekicktimer ~= nil then
- removetimer(votekicktimer)
- end
- rtv_initiated = -1
- votekick_allowed = false
- elseif mode == 3 then
- local file = io.open(profilepath .. "//files//bos.txt", "w+")
- if (file ~= nil) then
- for k,v in pairs(boslog_table) do
- if v ~= nil then
- file:write(v .. "\n")
- end
- end
- file:close()
- end
- end
- end
- function OnServerChat(player, chattype, message)
- local AllowChat = 1
- local count = gettokencount(message, " ")
- --local word = string.lower(gettoken(message, " ", 0))
- --local word2 = string.lower(gettoken(message, " ", 1))
- local t = {}
- local name = getname(player)
- local hash = gethash(player)
- local access = nil
- if string.lower(string.sub(message, 1, 3)) == "bot" and count == 1 then
- registertimer(0, "delayMsg", "PROOF OR GTFO")
- end
- if string.lower(string.sub(message, 1, 3)) == "rtv" then
- if count == 1 then
- if rtv_initiated >= 0 then
- local rtv_count = 0
- local rtv_number = round(cur_players * rtv_required)
- for i=0,15 do
- local hash2 = gethash(i)
- if hash2 ~= nil then
- if rtv_table[hash2] == 1 then
- rtv_count = rtv_count + 1
- end
- end
- end
- if rtv_count == 0 then
- rtv_initiated = 1
- rtv_table[hash] = 1
- rtv_count = rtv_count + 1
- say(name .. " has initiated rtv!")
- say("Type \"rtv\" to join the vote!")
- rtvtimer = registertimer(60000, "rtvTimer")
- else
- if rtv_table[hash] == 1 then
- privatesay(player, "You have already voted for rtv!")
- elseif rtv_table[hash] == nil then
- rtv_table[hash] = 1
- rtv_count = rtv_count + 1
- say(name .. " has voted for rtv!")
- say(rtv_count .. " of " .. rtv_number .. " votes required for rtv!")
- end
- end
- local file = io.open(profilepath .. "//files//rtv.txt", "w+")
- if (file ~= nil) then
- file:write(rtv_timeout)
- file:close()
- end
- if rtv_count >= rtv_number then
- removetimer(rtvtimer)
- rtv_initiated = rtv_timeout
- say("Initiating mapvote!")
- svcmd("sv_map_next")
- end
- else
- privatesay(player, "You cannot initiate rtv at this time!")
- end
- AllowChat = 0
- end
- elseif string.lower(string.sub(message, 1, 8)) == "votekick" then
- if count == 2 then
- if votekick_allowed == true and votekicktimeout_table[hash] == nil then
- if word2 == "1" or word2 == "2" or word2 == "3" or word2 == "4" or word2 == "5" or word2 == "6" or word2 == "7" or word2 == "8" or word2 == "9" or word2 == "10" or word2 == "11" or word2 == "12" or word2 == "13" or word2 == "14" or word2 == "15" or word2 == "16" then
- local votekick_count = 0
- local votekick_number = round(cur_players * votekick_required)
- local player2 = rresolveplayer(word2)
- local name2 = getname(player2)
- local hash2 = gethash(player2)
- local admin = nil
- for i=0,15 do
- local hash2 = gethash(i)
- if hash2 ~= nil then
- if votekick_table[hash2] == 1 then
- votekick_count = votekick_count + 1
- end
- end
- end
- if hash2 ~= nil then
- for k,v in pairs(admin_table) do
- if k == hash2 then
- admin = 1
- break
- end
- end
- if admin == nil then
- if player ~= player2 then
- votekick_allowed = player2
- votekick_table[hash] = 1
- votekick_count = votekick_count + 1
- say(name .. " has initiated a votekick on " .. name2 .. "!")
- say("Type \"kick\" to join the vote!")
- votekicktimer = registertimer(60000, 0, "votekickTimer")
- votekicktimeout_table[hash] = 1
- else
- privatesay(player, "Invalid player!")
- end
- else
- privatesay(player, "Admins cannot be votekicked!")
- end
- else
- privatesay(player, "Invalid player!")
- end
- if votekick_count >= votekick_number then
- for k,v in pairs(votekick_table) do
- votekick_table[k] = nil
- end
- removetimer(votekicktimer)
- votekick_allowed = true
- say("Kicking " .. name2 .. "!")
- svcmd("sv_ban " .. word2 .. " 5m")
- end
- else
- privatesay(player, "Invalid player!")
- end
- else
- privatesay(player, "You cannot initiate a votekick at this time!")
- end
- AllowChat = 0
- end
- elseif string.sub(message, 1, 4) == "kick" then
- if count == 1 then
- if votekick_allowed ~= true and votekick_allowed ~= false then
- local votekick_count = 0
- local votekick_number = round(cur_players * votekick_required)
- local name2 = getname(votekick_allowed)
- local sv_player = resolveplayer(votekick_allowed)
- for i=0,15 do
- local hash2 = gethash(i)
- if hash2 ~= nil then
- if votekick_table[hash2] == 1 then
- votekick_count = votekick_count + 1
- end
- end
- end
- if player ~= votekick_allowed then
- if votekick_table[hash] == 1 then
- privatesay(player, "You have already voted!")
- elseif votekick_table[hash] == nil then
- votekick_table[hash] = 1
- votekick_count = votekick_count + 1
- say(name .. " has voted to kick " .. name2 .. "!")
- say(votekick_count .. " of " .. votekick_number .. " votes required to kick!")
- end
- else
- privatesay(player, "You are not allowed to vote!")
- end
- if votekick_count >= votekick_number then
- for k,v in pairs(votekick_table) do
- votekick_table[k] = nil
- end
- removetimer(votekicktimer)
- votekick_allowed = true
- say("Kicking " .. name2 .. "!")
- svcmd("sv_ban " .. sv_player .. " 5m")
- end
- else
- privatesay(player, "A votekick has not been initiated!")
- end
- AllowChat = 0
- end
- end
- for k,v in pairs(admin_table) do
- if k == hash then
- access = tonumber(v)
- break
- end
- end
- for i=1,count do
- local word = gettoken(message, " ", i - 1)
- word = string.lower(word)
- table.insert(t, word)
- end
- --[[local backslash = false
- local forwardslash = false
- if string.find(t[1], "\\") ~= nil then
- backslash = true
- t[1] = t[1]:gsub("\\", "", 1)
- elseif string.find(t[1], "/") ~= nil then
- forwardslash = true
- t[1] = t[1]:gsub("/", "", 1)
- end
- local cmd_found = false
- local cmd_type = false
- for i = 1,#access_table[access] do
- local access_cmd = access_table[access][i]
- if string.find(access_cmd, "sv_") ~= nil then
- access_cmd = access_cmd:gsub("sv_", "", 1)
- end
- if t[1] == access_cmd then
- cmd_found = true
- end
- if backslash == true then
- if access_table[access][i] == "bkslash" then
- cmd_type = true
- end
- elseif forwardslash == true then
- if access_table[access][i] == "fwslash" then
- cmd_type = true
- end
- end
- if cmd_found == true and cmd_type == true then
- break
- end
- end
- if cmd_found == false then
- privatesay(player, "You are not authorized to use this command.")
- elseif cmd_type == false then
- if backslash == true then
- privatesay(player, "You are not authorized to use \\ commands.")
- return 0
- elseif forwardslash == true then
- privatesay(player, "You are not authorized to use / commands.")
- return 1
- end
- end--]]
- if access ~= nil then
- if string.sub(t[1], 1, 1) == "/" then
- AllowChat = 1
- elseif string.sub(t[1], 1, 1) == "\\" then
- AllowChat = 0
- end
- t[1] = t[1]:gsub("\\", "/")
- local found1 = string.find(t[1], "/")
- local found2 = string.find(t[1], "/", 2)
- local found3 = string.find(t[1], "/info", -5)
- local valid_command = nil
- local permission = nil
- if found1 ~= nil and found2 == nil and found3 == nil then
- for k,v in pairs(commands_table) do
- if t[1] == v then
- valid_command = 1
- break
- end
- end
- if valid_command == nil then
- registertimer(0, "delayMsg", "Invalid Command", message, player)
- else
- local command_list = access_table[access]
- local command = t[1]:gsub("/", "sv_")
- if command_list == -1 then
- permission = 1
- else
- local found = string.find(command_list, command)
- if found ~= nil then
- permission = 1
- end
- end
- if t[1] == "/a" then
- if permission == 1 then
- if count == 4 then
- if validplayer(t[2]) ~= false then
- for i = 1,#players do
- svcmd("sv_admin_add " .. resolveplayer(players[i]) .. " " .. t[3] .. " " .. t[4])
- registertimer(0, "delayMsg", getname(players[i]) .. " is now an admin at level " .. t[4], "/", player)
- registertimer(0, "delayMsg", "You are now an admin!", "\\", players[i])
- end
- else
- registertimer(0, "delayMsg", "Invalid Player", message, player)
- end
- else
- registertimer(0, "delayMsg", "Invalid Syntax: /a [player] [nickname] [level]")
- end
- else
- if string.sub(t[1], 1, 1) == "/" then
- registertimer(0, "delayMsg", "Only admins can execute this command.", message, player)
- end
- end
- elseif t[1] == "/afk" then
- if count == 1 then
- registertimer(0, "delayMsg", svcmd("sv_afk " .. resolveplayer(player)), message, player)
- elseif count == 2 then
- registertimer(0, "delayMsg", svcmd("sv_afk " .. t[2]), message, player)
- else
- registertimer(0, "delayMsg", "Invalid Syntax: /afk {person}", message, player)
- end
- elseif t[1] == "/gethash" then
- if count == 2 then
- registertimer(0, "delayMsg", svcmd("sv_gethash " .. t[2]), message, player)
- else
- registertimer(0, "delayMsg", "Invalid Syntax: /gethash [player]", message, player)
- end
- elseif t[1] == "/help" then
- if t[2] == "a" then
- registertimer(0, "delayMsg", "Syntax: /a [player] [nickname] [level]", message, player)
- registertimer(0, "delayMsg", "Adds a player to the admin list.", message, player)
- elseif t[2] == "ammo" then
- registertimer(0, "delayMsg", "Syntax: /ammo [player] [ammo]", message, player)
- registertimer(0, "delayMsg", "Sets the player's primary weapon's ammo. Use * for all players.", message, player)
- elseif t[2] == "b" then
- registertimer(0, "delayMsg", "Syntax: /b [player] {time}", message, player)
- registertimer(0, "delayMsg", "Bans a player indefinitely, or for the time specified.", message, player)
- elseif t[2] == "c" then
- registertimer(0, "delayMsg", "Syntax: /c [victim] [controller]", message, player)
- registertimer(0, "delayMsg", "Forces the victim to move in any direction the controller is moving.", message, player)
- elseif t[2] == "deathless" then
- registertimer(0, "delayMsg", "Syntax: /deathless [boolean]", message, player)
- registertimer(0, "delayMsg", "Will set the game so no one can die. 0 for off, 1 for on.", message, player)
- registertimer(0, "delayMsg", "Using 'heal' will override this, however", message, player)
- elseif t[2] == "e" then
- registertimer(0, "delayMsg", "Syntax: /e [Command]", message, player)
- registertimer(0, "delayMsg", "This will execute any command that you would normally put in the console.", message, player)
- registertimer(0, "delayMsg", "This is also used more commonly to tell if the script is working.", message, player)
- registertimer(0, "delayMsg", "Or if a player has admin.", message, player)
- elseif t[2] == "eject" then
- registertimer(0, "delayMsg", "Syntax: /eject [player]", message, player)
- registertimer(0, "delayMsg", "Ejects a player. Use * for all players.", message, player)
- elseif t[2] == "enter" then
- registertimer(0, "delayMsg", "Syntax: /enter [player] [seat]", message, player)
- registertimer(0, "delayMsg", "Will cause you to enter the player's vehicle, and the seat specified.", message, player)
- elseif t[2] == "getloc" then
- registertimer(0, "delayMsg", "Syntax: /getloc [player]", message, player)
- registertimer(0, "delayMsg", "Will display the location of the player specified.", message, player)
- elseif t[2] == "godmode" then
- registertimer(0, "delayMsg", "Syntax: /godmode [player]")
- registertimer(0, "delayMsg", "Will make this person unkillable. Backtaps, however, will still kill them.", message, player)
- elseif t[2] == "hax" then
- registertimer(0, "delayMsg", "Syntax: /hax", message, player)
- registertimer(0, "delayMsg", "I made this command because I was bored.", message, player)
- elseif t[2] == "heal" then
- registertimer(0, "delayMsg", "Syntax: /heal [player]", message, player)
- registertimer(0, "delayMsg", "Will heal the specified player.", message, player)
- elseif t[2] == "help" then
- registertimer(0, "delayMsg", "Syntax: /help [Command]", message, player)
- registertimer(0, "delayMsg", "Will provide details on any specified command.", message, player)
- registertimer(0, "delayMsg", "Do not include / or \ for the [Command]", message, player)
- elseif t[2] == "hitler" then
- registertimer(0, "delayMsg", "Syntax: /hitler", message, player)
- registertimer(0, "delayMsg", "Will lethaly inject everyone.", message, player)
- elseif t[2] == "infammo" then
- registertimer(0, "delayMsg", "Syntax: /infammo [boolean]", message, player)
- registertimer(0, "delayMsg", "Will set the game so everyone has infinite ammo. 0 for off, 1 for on", message, player)
- elseif t[2] == "give" then
- registertimer(0, "delayMsg", "Syntax: /give [weapon] {player}", message, player)
- registertimer(0, "delayMsg", "Will give yourself, or the person specified, a weapon.", message, player)
- registertimer(0, "delayMsg", "You can hold up to 4 weapons. If you are holding 4 weapons,", message, player)
- registertimer(0, "delayMsg", "you cannot pickup the flag, or the oddball.", message, player)
- elseif t[2] == "gethash" then
- registertimer(0, "delayMsg", "Syntax: /gethash [player]", message, player)
- registertimer(0, "delayMsg", "This will get the hash of the player specified.", message, player)
- elseif t[2] == "invis" then
- registertimer(0, "delayMsg", "Syntax: /invis [player] {time}", message, player)
- registertimer(0, "delayMsg", "This will camouflage the person specified for the amount of time specified.", message, player)
- elseif t[2] == "j" then
- registertimer(0, "delayMsg", "Syntax: /j [player] [x] [y] [z]", message, player)
- registertimer(0, "delayMsg", "Moves the specified player by coords specified.", message, player)
- elseif t[2] == "k" then
- registertimer(0, "delayMsg", "Syntax: /k [player]", message, player)
- registertimer(0, "delayMsg", "Will kick the player specified.", message, player)
- elseif t[2] == "kill" then
- registertimer(0, "delayMsg", "Syntax: /kill [player]", message, player)
- registertimer(0, "delayMsg", "Will kill the player specified.", message, player)
- elseif t[2] == "lo3" then
- registertimer(0, "delayMsg", "Syntax: /lo3", message, player)
- registertimer(0, "delayMsg", "Will lo3 the game.", message, player)
- elseif t[2] == "m" then
- registertimer(0, "delayMsg", "Syntax: /m [map] [gametype] {script} {script2} . . .", message, player)
- registertimer(0, "delayMsg", "Will load the map specified. No need to specify chatcommands script.", message, player)
- elseif t[2] == "mc" then
- registertimer(0, "delayMsg", "Syntax: /mc", message, player)
- registertimer(0, "delayMsg", "Starts the mapcycle.", message, player)
- elseif t[2] == "mnext" then
- registertimer(0, "delayMsg", "Syntax: /mnext", message, player)
- registertimer(0, "delayMsg", "Loads the next map in the mapcycle.", message, player)
- elseif t[2] == "mute" then
- registertimer(0, "delayMsg", "Syntax: /mute [player] {time}", message, player)
- registertimer(0, "delayMsg", "Mutes the player. Admins cannot be muted.", message, player)
- elseif t[2] == "pass" then
- registertimer(0, "delayMsg", "Syntax: /pass [password]", message, player)
- registertimer(0, "delayMsg", "Sets the server password.", message, player)
- elseif t[2] == "reset" then
- registertimer(0, "delayMsg", "Syntax: /reset", message, player)
- registertimer(0, "delayMsg", "Resets the map.", message, player)
- elseif t[2] == "resp" then
- registertimer(0, "delayMsg", "Syntax: /resp [player] [time]", message, player)
- registertimer(0, "delayMsg", "Sets respawn time of player. Only works if player is dead.", message, player)
- elseif t[2] == "say" then
- registertimer(0, "delayMsg", "Syntax: /say [message]", message, player)
- registertimer(0, "delayMsg", "Will say something as the server. No quotes needed.", message, player)
- elseif t[2] == "sc" then
- registertimer(0, "delayMsg", "Syntax: /sc [player] [nickname]", message, player)
- registertimer(0, "delayMsg", "Will set the player's nickname. Used instead of player IDs", message, player)
- elseif t[2] == "setassists" then
- registertimer(0, "delayMsg", "Syntax: /setassists [player] [# of assists]", message, player)
- registertimer(0, "delayMsg", "Will set the assists of the player specified.", message, player)
- elseif t[2] == "setdeaths" then
- registertimer(0, "delayMsg", "Syntax: /setdeaths [player] [# of deaths]", message, player)
- registertimer(0, "delayMsg", "Will set the deaths of the player specified.", message, player)
- elseif t[2] == "setfrags" then
- registertimer(0, "delayMsg", "Syntax: /setfrags [player] [# of frags]", message, player)
- registertimer(0, "delayMsg", "Will set the # of frag grenades of the player specified.", message, player)
- elseif t[2] == "setkills" then
- registertimer(0, "delayMsg", "Syntax: /setkills [player] [# of kills]", message, player)
- registertimer(0, "delayMsg", "Will set the kills of the player specified.", message, player)
- elseif t[2] == "setname" then
- registertimer(0, "delayMsg", "Syntax: /setname [player] [name]", message, player)
- registertimer(0, "delayMsg", "Sets the name of the player specified.", message, player)
- registertimer(0, "delayMsg", "You will only notice a difference on rejoin.", message, player)
- elseif t[2] == "setresp" then
- registertimer(0, "delayMsg", "Syntax: /setresp [time]", message, player)
- registertimer(0, "delayMsg", "Sets the universal respawn time of all maps/gametypes.", message, player)
- elseif t[2] == "setplasmas" then
- registertimer(0, "delayMsg", "Syntax: /setplasmas [player] [# of plasma grenades]", message, player)
- registertimer(0, "delayMsg", "Will set the plasma grenades of the player specified.", message, player)
- elseif t[2] == "spd" then
- registertimer(0, "delayMsg", "Syntax: /spd [player] [speed]", message, player)
- registertimer(0, "delayMsg", "Will set the speed of the player specified.", message, player)
- elseif t[2] == "spawn" then
- registertimer(0, "delayMsg", "Syntax: /spawn [object] {player} {ammount} {resptime} {recycle}", message, player)
- registertimer(0, "delayMsg", "Will spawn a object over a player if specified.", message, player)
- elseif t[2] == "st" then
- registertimer(0, "delayMsg", "Syntax: /st [location]", message, player)
- registertimer(0, "delayMsg", "Will set a teleport location to wherever you're standing.", message, player)
- elseif t[2] == "suspend" then
- registertimer(0, "delayMsg", "Syntax: /suspend [player] {time}", message, player)
- registertimer(0, "delayMsg", "Will suspend the player for the time specified.", message, player)
- elseif t[2] == "t" then
- registertimer(0, "delayMsg", "Syntax: /t [player] [location]", message, player)
- registertimer(0, "delayMsg", "Will teleport the player specified to the location specified.", message, player)
- elseif t[2] == "td" then
- registertimer(0, "delayMsg", "Syntax: /td [location]", message, player)
- registertimer(0, "delayMsg", "Will delete the teleport location specified.", message, player)
- elseif t[2] == "test" then
- registertimer(0, "delayMsg", "Syntax: /test [player]", message, player)
- registertimer(0, "delayMsg", "I used this to randomly see the returns of some addresses and offsets.", message, player)
- elseif t[2] == "tp" then
- registertimer(0, "delayMsg", "Syntax: /tp [player] [t_player]", message, player)
- registertimer(0, "delayMsg", "Will teleport player to t_player", message, player)
- elseif t[2] == "ts" then
- registertimer(0, "delayMsg", "Syntax: /ts [player] {team}", message, player)
- registertimer(0, "delayMsg", "Will switch the players team. Teams are 0 and 1", message, player)
- elseif t[2] == "unhax" then
- registertimer(0, "delayMsg", "Syntax: /unhax", message, player)
- registertimer(0, "delayMsg", "Unhax's you. I was bored, what can i say?", message, player)
- elseif t[2] == "unmute" then
- registertimer(0, "delayMsg", "Syntax: /unmute [player]", message, player)
- registertimer(0, "delayMsg", "Unmutes the player specified.", message, player)
- elseif t[2] == "unsuspend" then
- registertimer(0, "delayMsg", "Syntax: /unsuspend [player]", message, player)
- registertimer(0, "delayMsg", "Unsuspends the player specified.", message, player)
- elseif t[2] == "credits" then
- registertimer(0, "delayMsg", "Created by [DWM]Wizard or =RDA=Wizard", message, player)
- registertimer(0, "delayMsg", "Base script created by Smiley", message, player)
- else
- registertimer(0, "delayMsg", "Invalid Command! Use /list for list of commands!", message, player)
- end
- elseif t[1] == "/ammo" then
- if permission == 1 then
- if count == 3 then
- if validplayer(t[2]) ~= false then
- for i = 1,#players do
- local m_player = getplayer(players[i])
- local m_ObjId = readdword(m_player, 0x34)
- local m_Object = getobject(m_ObjId)
- if m_player ~= nil and m_Object ~= nil then
- for i = 0, 3 do
- local m_weaponId = readdword(m_Object, 0x2F8 + (i*4))
- if m_weaponId ~= -1 then
- local m_weapon = getobject(m_weaponId)
- writeword(m_weapon, 0x2B8, t[3]) -- loaded clip to specified ammount
- updateammo(m_weaponId) -- force it to sync
- registertimer(0, "delayMsg", getname(players[i]) "'s ammo was set to " .. t[3], message, player)
- end
- end
- end
- end
- else
- registertimer(0, "delayMsg", "Invalid Player", message, player)
- end
- else
- registertimer(0, "delayMsg", "Invalid Syntax: /ammo [player] [ammo]", message, player)
- end
- else
- registertimer(0, "delayMsg", "You cannot execute this command.", message, player)
- end
- elseif t[1] == "/b" then
- if permission == 1 then
- if count == 2 then
- if validplayer(t[2]) ~= false then
- for i = 1,#players do
- svcmd("sv_ban " .. resolveplayer(players[i]))
- registertimer(0, "delayMsg", getname(players[i]) .. " has been banned from the server!", message, player)
- end
- else
- registertimer(0, "delayMsg", "Invalid Player", message, player)
- end
- elseif count == 3 then
- if validplayer(t[2]) ~= false then
- for i = 1,#players do
- svcmd("sv_ban " .. resolveplayer(players[i]) .. " " .. t[3])
- registertimer(0, "delayMsg", getname(players[i]) .. " has been banned for " .. t[3] .. " time!", message, player)
- end
- else
- registertimer(0, "delayMsg", "Invalid Player", message, player)
- end
- else
- registertimer(0, "delayMsg", "Invalid Syntax: /b [player] {time}", message, player)
- end
- else
- registertimer(0, "delayMsg", "You cannot execute this command.", message, player)
- end
- elseif t[1] == "/deathless" then
- if permission == 1 then
- if count == 1 then
- registertimer(0, "delayMsg", svcmd("sv_deathless"), message, player)
- elseif count == 2 then
- registertimer(0, "delayMsg", svcmd("sv_deathless " .. t[2]), message, player)
- else
- registertimer(0, "delayMsg", "Invalid Syntax: /deathless {boolean}", message, player)
- end
- else
- registertimer(0, "delayMsg", "You cannot execute this command.", message, player)
- end
- elseif t[1] == "/setmode" then
- if permission == 1 then
- if count == 3 then
- registertimer(0, "delayMsg", svcmd("sv_setmode " .. t[2] .. " " .. t[3]), message, player)
- elseif count == 4 then
- registertimer(0, "delayMsg", svcmd("sv_setmode " .. t[2] .. " " .. t[3] .. " " .. t[4]), message, player)
- else
- registertimer(0, "delayMsg", "Invalid Syntax: /setmode [player] [mode] {object}", message, player)
- end
- else
- registertimer(0, "delayMsg", "You cannot execute this command.", message, player)
- end
- elseif t[1] == "/e" then
- if permission == 1 then
- registertimer(0, "delayMsg", "Executed " .. string.sub(message, 4), message, player)
- svcmd(string.sub(message, 4))
- else
- registertimer(0, "delayMsg", "You cannot execute this command.", message, player)
- end
- elseif t[1] == "/eject" then
- if permission == 1 then
- if count == 2 then
- registertimer(0, "delayMsg", svcmd("sv_eject " .. t[2]), message, player)
- else
- registertimer(0, "delayMsg", "Invalid Syntax: /eject [player]", message, player)
- end
- else
- registertimer(0, "delayMsg", "You cannot execute this command.", message, player)
- end
- elseif t[1] == "/getloc" then
- if permission == 1 then
- if count == 2 then
- registertimer(0, "delayMsg", svcmd("sv_getloc " .. t[2]), message, player)
- else
- registertimer(0, "delayMsg", "Invalid Syntax: /getloc [player]", message, player)
- end
- else
- registertimer(0, "delayMsg", "You cannot execute this command.", message, player)
- end
- elseif t[1] == "/ghost" then
- if permission == 1 then
- if count == 1 then
- registertimer(0, "delayMsg", svcmd("sv_ghost " .. resolveplayer(player)), message, player)
- elseif count == 2 then
- registertimer(0, "delayMsg", svcmd("sv_ghost " .. t[2]), message, player)
- else
- registertimer(0, "delayMsg", "Invalid Syntax: /ghost {player}", message, player)
- end
- else
- registertimer(0, "delayMsg", "You cannot execute this command.", message, player)
- end
- elseif t[1] == "/unghost" then
- if permission == 1 then
- if count == 1 then
- registertimer(0, "delayMsg", svcmd("sv_unghost " .. resolveplayer(player)), message, player)
- elseif count == 2 then
- registertimer(0, "delayMsg", svcmd("sv_unghost " .. t[2]), message, player)
- else
- registertimer(0, "delayMsg", "Invalid Syntax: /unghost {player}", message, player)
- end
- else
- registertimer(0, "delayMsg", "You cannot execute this command.", message, player)
- end
- elseif t[1] == "/godmode" then
- if permission == 1 then
- if count == 2 then
- registertimer(0, "delayMsg", svcmd("sv_setgod " .. t[2]), message, player)
- else
- registertimer(0, "delayMsg", "Invalid Syntax: /godmode [player]", message, player)
- end
- else
- registertimer(0, "delayMsg", "You cannot execute this command.", message, player)
- end
- elseif t[1] == "/hax" then
- if permission == 1 then
- if count == 1 then
- registertimer(0, "delayMsg", svcmd("cheat_hax " .. resolveplayer(player)), message, player)
- else
- registertimer(0, "delayMsg", "Invalid Syntax: /hax", message, player)
- end
- else
- registertimer(0, "delayMsg", "You cannot execute this command.", message, player)
- end
- elseif t[1] == "/heal" then
- if permission == 1 then
- if count == 2 then
- registertimer(0, "delayMsg", svcmd("sv_heal " .. t[2]), message, player)
- else
- registertimer(0, "delayMsg", "Invalid Syntax: /heal [player]", message, player)
- end
- else
- registertimer(0, "delayMsg", "You cannot execute this command.", message, player)
- end
- elseif t[1] == "/ungod" then
- if permission == 1 then
- if count == 2 then
- registertimer(0, "delayMsg", svcmd("sv_ungod " .. t[2]), message, player)
- else
- registertimer(0, "delayMsg", "Invalid Syntax: /ungod [player]", message, player)
- end
- else
- registertimer(0, "delayMsg", "You cannot execute this command.", message, player)
- end
- elseif t[1] == "/hitler" then
- if permission == 1 then
- if count == 1 then
- registertimer(0, "delayMsg", svcmd("sv_hitler"), message, player)
- else
- registertimer(0, "delayMsg", "Invalid Syntax: /hitler", message, player)
- end
- else
- registertimer(0, "delayMsg", "You cannot execute this command.", message, player)
- end
- elseif t[1] == "/infammo" then
- if permission == 1 then
- if count == 1 then
- registertimer(0, "delayMsg", svcmd("sv_infinite_ammo"), message, player)
- elseif count == 2 then
- registertimer(0, "delayMsg", svcmd("sv_infinite_ammo " .. t[2]), message, player)
- else
- registertimer(0, "delayMsg", "Invalid Syntax: /infammo {boolean}", message, player)
- end
- else
- registertimer(0, "delayMsg", "You cannot execute this command.", message, player)
- end
- elseif t[1] == "/invis" then
- if permission == 1 then
- if count == 2 then
- registertimer(0, "delayMsg", svcmd("sv_invis " .. t[2]), message, player)
- elseif count == 3 then
- registertimer(0, "delayMsg", svcmd("sv_invis " .. t[2] .. " " .. t[3]), message, player)
- else
- registertimer(0, "delayMsg", "Invalid Syntax: /invis [player] {time}", message, player)
- end
- else
- registertimer(0, "delayMsg", "You cannot execute this command.", message, player)
- end
- elseif t[1] == "/j" then
- if permission == 1 then
- if count == 5 then
- registertimer(0, "delayMsg", svcmd("sv_move " .. t[2] .. " " .. t[3] .. " " .. t[4] .. " " .. t[5]), message, player)
- else
- registertimer(0, "delayMsg", "Invalid Syntax: /j [player] [x] [y] [z]", message, player)
- end
- else
- registertimer(0, "delayMsg", "You cannot execute this command.", message, player)
- end
- elseif t[1] == "/k" then
- if permission == 1 then
- if count == 2 then
- if validplayer(t[2]) ~= false then
- for i = 1, #players do
- svcmd("sv_kick " .. resolveplayer(players[i]))
- registertimer(0, "delayMsg", getname(players[i]) .. " has been kicked from the server!", message, player)
- end
- else
- registertimer(0, "delayMsg", "Invalid Player", message, player)
- end
- else
- registertimer(0, "delayMsg", "Invalid Syntax: /k [player] {time}", message, player)
- end
- else
- registertimer(0, "delayMsg", "You cannot execute this command.", message, player)
- end
- elseif t[1] == "/kill" then
- if permission == 1 then
- if count == 2 then
- if validplayer(t[2]) ~= false then
- for i = 1, #players do
- if getobject(getplayerobjectid(players[i])) ~= nil then
- kill(players[i])
- registertimer(0, "delayMsg", getname(players[i]) .. " has been killed!", message, player)
- else
- registertimer(0, "delayMsg", "Error! " .. getname(players[i]) .. " is dead!", message, player)
- end
- end
- else
- registertimer(0, "delayMsg", "Invalid Player", message, player)
- end
- else
- registertimer(0, "delayMsg", "Invalid Syntax: /kill [player]", message, player)
- end
- else
- registertimer(0, "delayMsg", "You cannot execute this command.", message, player)
- end
- elseif t[1] == "/lo3" then
- if permission == 1 then
- if count == 1 then
- registertimer(0, "delayMsg", svcmd("sv_scrim"), message, player)
- else
- registertimer(0, "delayMsg", "Invalid Syntax: /lo3", message, player)
- end
- else
- registertimer(0, "delayMsg", "You cannot execute this command.", message, player)
- end
- elseif t[1] == "/m" then
- if permission == 1 then
- if string.find(string.lower(message), "chatcommands") == nil then
- registertimer(0, "delayMsg", svcmd("sv_map " .. string.sub(message, 4) .. " ChatCommands"), message, player)
- else
- registertimer(0, "delayMsg", svcmd("sv_map " .. string.sub(message, 4)), message, player)
- end
- else
- registertimer(0, "delayMsg", "You cannot execute this command.", message, player)
- end
- elseif t[1] == "/mc" then
- if permission == 1 then
- if count == 1 then
- registertimer(0, "delayMsg", svcmd("sv_mapcycle_begin"), message, player)
- else
- registertimer(0, "delayMsg", "Invalid Syntax: /mc", message, player)
- end
- else
- registertimer(0, "delayMsg", "You cannot execute this command.", message, player)
- end
- elseif t[1] == "/mnext" then
- if permission == 1 then
- if count == 1 then
- registertimer(0, "delayMsg", svcmd("sv_map_next"), message, player)
- else
- registertimer(0, "delayMsg", "Invalid Syntax: /mnext", message, player)
- end
- else
- registertimer(0, "delayMsg", "You cannot execute this command.", message, player)
- end
- elseif t[1] == "/mute" then
- if permission == 1 then
- if count == 2 then
- registertimer(0, "delayMsg", svcmd("sv_mute " .. t[2]), message, player)
- else
- registertimer(0, "delayMsg", "Invalid Syntax: /mute [player]", message, player)
- end
- else
- registertimer(0, "delayMsg", "You cannot execute this command.", message, player)
- end
- elseif t[1] == "/noweapons" then
- if permission == 1 then
- if count == 2 then
- registertimer(0, "delayMsg", svcmd("sv_noweapons " .. t[2]), message, player)
- else
- registertimer(0, "delayMsg", "Invalid Syntax: /noweapons [boolean]", message, player)
- end
- else
- registertimer(0, "delayMsg", "You cannot execute this command.", message, player)
- end
- elseif t[1] == "/pass" then
- if permission == 1 then
- if count == 2 then
- if t[2] == "off" or t[2] == '""' then
- registertimer(0, "delayMsg", "Password has been taken off.", message, player)
- svcmd('sv_password ""')
- else
- svcmd("sv_password " .. t[2])
- registertimer(0, "delayMsg", "Password set to '" .. t[2] .. "'", message, player)
- end
- else
- registertimer(0, "delayMsg", "Invalid Syntax: /pass [password]", message, player)
- end
- else
- registertimer(0, "delayMsg", "You cannot execute this command.", message, player)
- end
- elseif t[1] == "/pl" then
- if permission == 1 then
- if count == 1 then
- for c = 0,15 do
- if getplayer(c) ~= nil then
- privatesay(player, "(" .. c + 1 .. ") " .. getname(c))
- end
- end
- else
- privatesay(player, "Invalid Syntax: \pl", message, player)
- end
- else
- privatesay(player, "You cannot execute this command.")
- end
- elseif t[1] == "/reset" then
- if permission == 1 then
- if count == 1 then
- registertimer(0, "delayMsg", svcmd("sv_map_reset"), message, player)
- else
- registertimer(0, "delayMsg", "Invalid Syntax: /reset", message, player)
- end
- else
- registertimer(0, "delayMsg", "You cannot execute this command.", message, player)
- end
- elseif t[1] == "/revoke" then
- if permission == 1 then
- if count == 2 then
- registertimer(0, "delayMsg", svcmd("sv_admin_del " .. t[2]), message, player)
- else
- registertimer(0, "delayMsg", "Invalid Syntax: /revoke [player]", message, player)
- end
- else
- registertimer(0, "delayMsg", "Only swath can revoke admins.", message, player)
- end
- elseif t[1] == "/banlist" then
- if permission == 1 then
- if count == 1 then
- registertimer(0, "delayMsg", svcmd("sv_banlist"), message, player)
- else
- registertimer(0, "delayMsg", "Invalid Syntax: /banlist", message, player)
- end
- else
- registertimer(0, "delayMsg", "You cannot execute this command.", message, player)
- end
- elseif t[1] == "/resp" then
- if permission == 1 then
- if count == 3 then
- registertimer(0, "delayMsg", svcmd("sv_resp " .. t[2] .. " " .. t[3]), message, player)
- else
- registertimer(0, "delayMsg", "Invalid Syntax /resp [player] [respawn time]", message, player)
- end
- else
- registertimer(0, "delayMsg", "You cannot execute this command.", message, player)
- end
- elseif t[1] == "/say" then
- if permission == 1 then
- if count == 1 then
- else
- registertimer(0, "delayMsg", string.sub(message, 6), message, player)
- end
- else
- registertimer(0, "delayMsg", "You cannot execute this command.", message, player)
- end
- elseif t[1] == "/enter" then
- if permission == 1 then
- if count == 2 then
- local vehid = nil
- if t[2] == "wraith" then
- vehid = Spawn(message, "Wraith", "vehi", "vehicles\\wraith\\wraith", player)
- elseif t[2] == "lifepod" then
- vehid = Spawn(message, "Lifepod", "vehi", "vehicles\\lifepod\\lifepod", player)
- elseif t[2] == "longsword" then
- vehid = Spawn(message, "Longsword", "vehi", "vehicles\\fighterbomber\\fighterbomber", player)
- elseif t[2] == "dropship" then
- vehid = Spawn(message, "Covenant Dropship", "vehi", "vehicles\\c_dropship\\c_dropship", player)
- elseif t[2] == "cryotube" then
- vehid = Spawn(message, "Cryotube", "vehi", "levels\\a10\\devices\\cryotube\\cryotube", player)
- elseif t[2] == "peli" or t[2] == "pelican" then
- vehid = Spawn(message, "Pelican", "vehi", "vehicles\\pelican\\pelican", player)
- elseif t[2] == "ghost" then
- vehid = Spawn(message, "Ghost", "vehi", "vehicles\\ghost\\ghost_mp", player)
- elseif t[2] == "hog" then
- vehid = Spawn(message, "Warthog", "vehi", "vehicles\\warthog\\mp_warthog", player)
- elseif t[2] == "rhog" then
- vehid = Spawn(message, "Rocket Warthog", "vehi", "vehicles\\rwarthog\\rwarthog", player)
- elseif t[2] == "shee" or t[2] == "banshee" then
- vehid = Spawn(message, "Banshee", "vehi", "vehicles\\banshee\\banshee_mp", player)
- elseif t[2] == "tank" or t[2] == "scorpion" then
- vehid = Spawn(message, "Tank", "vehi", "vehicles\\scorpion\\scorpion_mp", player)
- elseif t[2] == "turret" or t[2] == "shade" then
- vehid = Spawn(message, "Gun Turret", "vehi", "vehicles\\c gun turret\\c gun turret_mp", player)
- else
- registertimer(0, "delayMsg", "Invalid Vehicle!", message, player)
- end
- if vehid ~= nil then
- local m_player = getplayer(player)
- local m_playerObjId = getplayerobjectid(player)
- if m_playerObjId ~= 0xffffffff then
- entervehicle(player, vehid, 0)
- table.insert(vehicle_drone_table[player], vehid)
- else
- registertimer(0, "delayMsg", "You cannot enter a vehicle while dead!", message, player)
- end
- end
- else
- registertimer(0, "delayMsg", "Invalid Syntax: /enter [vehicle]", message, player)
- end
- else
- registertimer(0, "delayMsg", "You cannot execute this command.", message, player)
- end
- elseif t[1] == "/setassists" then
- if permission == 1 then
- if count == 3 then
- registertimer(0, "delayMsg", svcmd("sv_setassists " .. t[2] .. " " .. t[3]), message, player)
- else
- registertimer(0, "delayMsg", "Invalid Syntax: /setassists [player] [assists]", message, player)
- end
- else
- registertimer(0, "delayMsg", "You cannot execute this command.", message, player)
- end
- elseif t[1] == "/setdeaths" then
- if permission == 1 then
- if count == 3 then
- registertimer(0, "delayMsg", svcmd("sv_setdeaths " .. t[2] .. " " .. t[3]), message, player)
- else
- registertimer(0, "delayMsg", "Invalid Syntax: /setdeaths [player] [deaths]", message, player)
- end
- else
- registertimer(0, "delayMsg", "You cannot execute this command.", message, player)
- end
- elseif t[1] == "/setfrags" then
- if permission == 1 then
- if count == 3 then
- registertimer(0, "delayMsg", svcmd("sv_setfrags " .. t[2] .. " " .. t[3]), message, player)
- else
- registertimer(0, "delayMsg", "Invalid Syntax: /setfrags [player] [amount]", message, player)
- end
- else
- registertimer(0, "delayMsg", "You cannot execute this command.", message, player)
- end
- elseif t[1] == "/setkills" then
- if permission == 1 then
- if count == 3 then
- registertimer(0, "delayMsg", svcmd("sv_setkills " .. t[2] .. " " .. t[3]), message, player)
- else
- registertimer(0, "delayMsg", "Invalid Syntax: /setkills [player] [kills]", message, player)
- end
- else
- registertimer(0, "delayMsg", "You cannot execute this command.", message, player)
- end
- elseif t[1] == "/setresp" then
- if permission == 1 then
- if count == 2 then
- registertimer(0, "delayMsg", svcmd("sv_respawn_time " .. t[2]), message, player)
- else
- registertimer(0, "delayMsg", "Invalid Syntax: /setresp [seconds]", message, player)
- end
- else
- registertimer(0, "delayMsg", "You cannot execute this command.", message, player)
- end
- elseif t[1] == "/setplasmas" then
- if permission == 1 then
- if count == 3 then
- registertimer(0, "delayMsg", svcmd("sv_setplasmas " .. t[2]), message, player)
- else
- registertimer(0, "delayMsg", "Invalid Syntax: /setplasmas [player] [amount]", message, player)
- end
- else
- registertimer(0, "delayMsg", "You cannot execute this command.", message, player)
- end
- elseif t[1] == "/spd" then
- if permission == 1 then
- if count == 3 then
- if validplayer(t[2]) ~= false then
- if tonumber(t[3]) ~= nil then
- for i = 1,#players do
- if getobject(getplayerobjectid(players[i])) ~= nil then
- setspeed(players[i], t[3])
- registertimer(0, "delayMsg", getname(players[i]) .. "'s speed was set to " .. t[3], message, player)
- else
- registertimer(0, "delayMsg", "Error! " .. getname(players[i]) .. " is dead!", message, player)
- end
- end
- else
- registertimer(0, "delayMsg", t[3] .. " is not a valid number.", message, player)
- end
- else
- registertimer(0, "delayMsg", "Invalid Player", message, player)
- end
- else
- registertimer(0, "delayMsg", "Invalid Syntax: /spd [player] [speed]", message, player)
- end
- else
- registertimer(0, "delayMsg", "You cannot execute this command.", message, player)
- end
- elseif t[1] == "/spawn" then
- if permission == 1 then
- --Objects with 'bipd' tag
- if t[2] == "cyborg" or t[2] == "bot" or t[2] == "mastercheif" or t[2] == "biped" or t[2] == "bipd" then
- Spawn(message, "Cyborg", "bipd", "characters\\cyborg_mp\\cyborg_mp", player, false)
- elseif t[2] == "captain" or t[2] == "keyes" then
- Spawn(message, "Captain Keyes", "bipd", "characters\\captain\\captain", false)
- elseif t[2] == "cortana" then
- Spawn(message, "Cortana", "bipd", "characters\\cortana\\cortana", false)
- elseif t[2] == "cortana2" then
- Spawn(message, "Cortana2", "bipd", "characters\\cortana\\halo_enhanced\\halo_enhanced", false)
- elseif t[2] == "crewman" then
- Spawn(message, "Crewman", "bipd", "characters\\crewman\\crewman", false)
- elseif t[2] == "elite" then
- Spawn(message, "elite", "bipd", "characters\\elite\\elite", false)
- elseif t[2] == "elite2" then
- Spawn(message, "Elite Special", "bipd", "characters\\elite\\elite special", false)
- elseif t[2] == "engineer" then
- Spawn(message, "Engineer", "bipd", "characters\\engineer\\engineer", false)
- elseif t[2] == "flood" then
- Spawn(message, "Flood Captain", "bipd", "characters\\flood_captain\\flood_captain", false)
- elseif t[2] == "flood2" then
- Spawn(message, "Flood Infection", "bipd", "characters\\flood_infection\\flood_infection", false)
- elseif t[2] == "flood3" then
- Spawn(message, "Flood Carrier", "bipd", "characters\\floodcarrier\\floodcarrier", false)
- elseif t[2] == "floodelite" then
- Spawn(message, "FloodCombat Elite", "bipd", "characters\\floodcombat elite\\floodcombat elite", false)
- elseif t[2] == "floodhuman" then
- Spawn(message, "FloodCombat Human", "bipd", "characters\\floodcombat_human\\floodcombat_human", false)
- elseif t[2] == "pedobear" or t[2] == "grunt" then
- Spawn(message, "Pedobear", "bipd", "characters\\grunt\\grunt", false)
- elseif t[2] == "hunter" then
- Spawn(message, "Hunter", "bipd", "characters\\hunter\\hunter", false)
- elseif t[2] == "marine" then
- Spawn(message, "Marine", "bipd", "characters\\marine\\marine", false)
- elseif t[2] == "marinesuicide" or t[2] == "marine2" then
- Spawn(message, "Marine Suicidal", "bipd", "characters\\marine_suicidal\\marine_suicidal", false)
- elseif t[2] == "monitor" then
- Spawn(message, "Monitor", "bipd", "characters\\monitor\\monitor", false)
- elseif t[2] == "sentinel" then
- Spawn(message, "Sentinel", "bipd", "characters\\sentinel\\sentinel", false)
- elseif t[2] == "johnson" then
- Spawn(message, "Sgt. Johnson", "bipd", "characters\\johnson\\johnson", false)
- --Objects with 'eqip' tags
- elseif t[2] == "camo" or t[2] == "camouflage" then
- Spawn(message, "Camouflage", "eqip", "powerups\\active camouflage", player, false)
- elseif t[2] == "dblspd" then
- Spawn(message, "Double Speed", "eqip", "powerups\\double speed", player, false)
- elseif t[2] == "fullspec" then
- Spawn(message, "Full-Spectrum Vision", "eqip", "powerups\\full-spectrum vision", player, false)
- elseif t[2] == "fnade" or t[2] == "nades" then
- Spawn(message, "Frag Grenade", "eqip", "weapons\\frag grenade\\frag grenade", player, false)
- elseif t[2] == "pnade" then
- Spawn(message, "Plasma Grenade", "eqip", "weapons\\plasma grenade\\plasma grenade", player, false)
- elseif t[2] == "overshield" or t[2] == "os" then
- Spawn(message, "Overshield", "eqip", "powerups\\over shield", player, false)
- elseif t[2] == "rifleammo" then
- Spawn(message, "Assault Rifle Ammo", "eqip", "powerups\\assault rifle ammo\\assault rifle ammo", player, false)
- elseif t[2] == "healthpack" then
- Spawn(message, "Health Pack", "eqip", "powerups\\health pack", player, false)
- elseif t[2] == "needlerammo" then
- Spawn(message, "Needler Ammo", "eqip", "powerups\\needler ammo\\needler ammo", player, false)
- elseif t[2] == "pistolammo" then
- Spawn(message, "Pistol Ammo", "eqip", "powerups\\pistol ammo\\pistol ammo", player, false)
- elseif t[2] == "rocketammo" then
- Spawn(message, "Rocket Ammo", "eqip", "powerups\\rocket launcher ammo\\rocket launcher ammo", player, false)
- elseif t[2] == "shottyammo" then
- Spawn(message, "Shotgun Ammo", "eqip", "powerups\\shotgun ammo\\shotgun ammo", player, false)
- elseif t[2] == "sniperammo" then
- Spawn(message, "Sniper Ammo", "eqip", "powerups\\sniper rifle ammo\\sniper rifle ammo", player, false)
- elseif t[2] == "flameammo" then
- Spawn(message, "Flamethrower Ammo", "eqip", "powerups\\flamethrower ammo\\flamethrower ammo", player, false)
- --Objects with 'weap' tag
- elseif t[2] == "energysword" or t[2] == "esword" then
- Spawn(message, "Energy Sword", "weap", "weapons\\energy sword\\energy sword", false)
- elseif t[2] == "ball" or t[2] == "oddball" then
- Spawn(message, "Oddball", "weap", "weapons\\ball\\ball", player, false)
- elseif t[2] == "flag" then
- Spawn(message, "Flag", "weap", "weapons\\flag\\flag", player, false)
- elseif t[2] == "frg" or t[2] == "fuelrod" or t[2] == "rod" or t[2] == "plasmacannon" then
- Spawn(message, "Fuel Rod", "weap", "weapons\\plasma_cannon\\plasma_cannon", player, false)
- elseif t[2] == "ggun" or t[2] == "gravitygun" then
- Spawn(message, "Gravity Gun", "weap", "weapons\\gravity rifle\\gravity rifle", player, false)
- elseif t[2] == "needler" then
- Spawn(message, "Needler", "weap", "weapons\\needler\\mp_needler", player, false)
- elseif t[2] == "pistol" then
- Spawn(message, "Pistol", "weap", "weapons\\pistol\\pistol", player, false)
- elseif t[2] == "ppistol" or t[2] == "plasmapistol" then
- Spawn(message, "Plasma Pistol", "weap", "weapons\\plasma pistol\\plasma pistol", player, false)
- elseif t[2] == "prifle" or t[2] == "plasmarifle" then
- Spawn(message, "Plasma Rifle", "weap", "weapons\\plasma rifle\\plasma rifle", player, false)
- elseif t[2] == "rifle" or t[2] == "arifle" or t[2] == "assaultrifle" then
- Spawn(message, "Assault Rifle", "weap", "weapons\\assault rifle\\assault rifle", player, false)
- elseif t[2] == "rocket" or t[2] == "rocketlauncher" or t[2] == "rox" then
- Spawn(message, "Rocket Launcher", "weap", "weapons\\rocket launcher\\rocket launcher", player, false)
- elseif t[2] == "shotty" or t[2] == "shotgun" then
- Spawn(message, "Shotgun", "weap", "weapons\\shotgun\\shotgun", player, false)
- elseif t[2] == "sniper" then
- Spawn(message, "Sniper Rifle", "weap", "weapons\\sniper rifle\\sniper rifle", player, false)
- --Objects with 'vehi' tag
- elseif t[2] == "wraith" then
- Spawn(message, "Wraith", "vehi", "vehicles\\wraith\\wraith", player, false)
- elseif t[2] == "peli" or t[2] == "pelican" then
- Spawn(message, "Pelican", "vehi", "vehicles\\pelican\\pelican", player, false)
- elseif t[2] == "ghost" then
- Spawn(message, "Ghost", "vehi", "vehicles\\ghost\\ghost_mp", player, false)
- elseif t[2] == "hog" or t[2] == "warthog" then
- Spawn(message, "Warthog", "vehi", "vehicles\\warthog\\mp_warthog", player, false)
- elseif t[2] == "rhog" or t[2] == "rocketwarthog" then
- Spawn(message, "Rocket Warthog", "vehi", "vehicles\\rwarthog\\rwarthog", player, false)
- elseif t[2] == "shee" or t[2] == "banshee" then
- Spawn(message, "Banshee", "vehi", "vehicles\\banshee\\banshee_mp", player, false)
- elseif t[2] == "tank" or t[2] == "scorpion" then
- Spawn(message, "Tank", "vehi", "vehicles\\scorpion\\scorpion_mp", player, false)
- elseif t[2] == "turret" or t[2] == "shade" then
- Spawn(message, "Gun Turret", "vehi", "vehicles\\c gun turret\\c gun turret_mp", player, false)
- else
- registertimer(0, "delayMsg", "Invalid Object!", message, player)
- end
- else
- registertimer(0, "delayMsg", "You cannot execute this command.", message, player)
- end
- elseif t[1] == "/give" then
- if permission == 1 then
- if t[2] == "energysword" or t[2] == "esword" or t[2] == "sword" then
- Spawn(message, "Energy Sword", "weap", "weapons\\energy sword\\energy sword", player, true)
- elseif t[2] == "ball" or t[2] == "oddball" then
- Spawn(message, "Oddball", "weap", "weapons\\ball\\ball", player, true)
- elseif t[2] == "flag" then
- Spawn(message, "Flag", "weap", "weapons\\flag\\flag", player, true)
- elseif t[2] == "frg" or t[2] == "fuelrod" or t[2] == "rod" or t[2] == "plasmacannon" then
- Spawn(message, "Fuel Rod", "weap", "weapons\\plasma_cannon\\plasma_cannon", player, true)
- elseif t[2] == "ggun" or t[2] == "gravitygun" then
- Spawn(message, "Gravity Gun", "weap", "weapons\\gravity rifle\\gravity rifle", player, true)
- elseif t[2] == "needler" then
- Spawn(message, "Needler", "weap", "weapons\\needler\\mp_needler", player, true)
- elseif t[2] == "pistol" then
- Spawn(message, "Pistol", "weap", "weapons\\pistol\\pistol", player, true)
- elseif t[2] == "ppistol" or t[2] == "plasmapistol" then
- Spawn(message, "Plasma Pistol", "weap", "weapons\\plasma pistol\\plasma pistol", player, true)
- elseif t[2] == "flamethrower" or t[2] == "flame" then
- Spawn(message, "Flamethrower", "weap", "weapons\\flamethrower\\flamethrower", player, true)
- elseif t[2] == "prifle" or t[2] == "plasmarifle" then
- Spawn(message, "Plasma Rifle", "weap", "weapons\\plasma rifle\\plasma rifle", player, true)
- elseif t[2] == "rifle" or t[2] == "arifle" or t[2] == "assaultrifle" then
- Spawn(message, "Assault Rifle", "weap", "weapons\\assault rifle\\assault rifle", player, true)
- elseif t[2] == "rocket" or t[2] == "rocketlauncher" or t[2] == "rox" then
- Spawn(message, "Rocket Launcher", "weap", "weapons\\rocket launcher\\rocket launcher", player, true)
- elseif t[2] == "shotty" or t[2] == "shotgun" then
- Spawn(message, "Shotgun", "weap", "weapons\\shotgun\\shotgun", player, true)
- elseif t[2] == "sniper" then
- Spawn(message, "Sniper Rifle", "weap", "weapons\\sniper rifle\\sniper rifle", player, true)
- else
- registertimer(0, "delayMsg", "Invalid Object!", message, player)
- end
- else
- registertimer(0, "delayMsg", "You cannot execute this command.", message, player)
- end
- elseif t[1] == "/st" then
- if permission == 1 then
- if count == 2 then
- registertimer(0, "delayMsg", svcmd("sv_teleport_add " .. resolveplayer(player) .. " " .. t[2]), message, player)
- elseif count == 3 then
- registertimer(0, "delayMsg", svcmd("sv_teleport_add " .. t[2] .. " " .. t[3]), message, player)
- else
- registertimer(0, "delayMsg", "Invalid Syntax: /st [place]", message, player)
- end
- else
- registertimer(0, "delayMsg", "You cannot execute this command.", message, player)
- end
- elseif t[1] == "/suspend" then
- if permission == 1 then
- if count == 2 then
- registertimer(0, "delayMsg", svcmd("sv_suspend " .. t[2]), message, player)
- elseif count == 3 then
- registertimer(0, "delayMsg", svcmd("sv_suspend " .. t[2] .. " " .. t[3]), message, player)
- else
- registertimer(0, "delayMsg", "Invalid Syntax: /suspend [player] {time}", message, player)
- end
- else
- registertimer(0, "delayMsg", "You cannot execute this command.", message, player)
- end
- elseif t[1] == "/t" then
- if permission == 1 then
- if count == 3 then
- registertimer(0, "delayMsg", svcmd("sv_teleport " .. t[2] .. " " .. t[3]), message, player)
- elseif count == 5 then
- registertimer(0, "delayMsg", svcmd("sv_teleport " .. t[2] .. " " .. t[3] .. " " .. t[4] .. " " .. t[5]), message, player)
- else
- registertimer(0, "delayMsg", "Invalid Syntax: /t [player] [place]", message, player)
- end
- else
- registertimer(0, "delayMsg", "You cannot execute this command.", message, player)
- end
- elseif t[1] == "/td" then
- if permission == 1 then
- if count == 2 then
- registertimer(0, "delayMsg", svcmd("sv_teleport_del " .. t[2]), message, player)
- else
- registertimer(0, "delayMsg", "Invalid Syntax: /td [location]", message, player)
- end
- else
- registertimer(0, "delayMsg", "You cannot execute this command.", message, player)
- end
- elseif t[1] == "/tp" then
- if permission == 1 then
- if count == 3 then
- registertimer(0, "delayMsg", svcmd("sv_teleport_pl " .. t[2] .. " " .. t[3]), message, player)
- else
- registertimer(0, "delayMsg", "Invalid Syntax: /tp [player] [player]", message, player)
- registertimer(0, "delayMsg", "If you are unsure of a command, do /help on it", message, player)
- end
- else
- registertimer(0, "delayMsg", "You cannot execute this command.", message, player)
- end
- elseif t[1] == "/ts" then
- if permission == 1 then
- if count == 2 then
- registertimer(0, "delayMsg", svcmd("sv_changeteam " .. t[2]), message, player)
- else
- registertimer(0, "delayMsg", "Invalid Syntax: /ts [player]", message, player)
- end
- else
- registertimer(0, "delayMsg", "You cannot execute this command.", message, player)
- end
- elseif t[1] == "/test" then
- if permission == 1 then
- if count == 2 then
- registertimer(0, "delayMsg", svcmd("sv_test " .. t[2]), message, player)
- end
- end
- elseif t[1] == "/timelimit" then
- if permission == 1 then
- if count == 2 then
- settimelimit(t[2])
- registertimer(0, "delayMsg", "Timelimit set to " .. t[2] .. " minutes!", message, player)
- else
- registertimer(0, "delayMsg", "Invalid Syntax: /timelimit [time]", message, player)
- end
- else
- registertimer(0, "delayMsg", "You cannot execute this command.", message, player)
- end
- elseif t[1] == "/unhax" then
- if permission == 1 then
- if count == 1 then
- registertimer(0, "delayMsg", svcmd("cheat_unhax " .. resolveplayer(player)), message, player)
- elseif count == 2 then
- registertimer(0, "delayMsg", svcmd("cheat_unhax " .. t[2]), message, player)
- else
- registertimer(0, "delayMsg", "Invalid Syntax: /unhax {player}", message, player)
- end
- else
- registertimer(0, "delayMsg", "You cannot execute this command", message, player)
- end
- elseif t[1] == "/unmute" then
- if permission == 1 then
- if count == 2 then
- registertimer(0, "delayMsg", svcmd("sv_unmute " .. t[2]), message, player)
- else
- registertimer(0, "delayMsg", "Invalid Syntax: /unmute [player]", message, player)
- end
- else
- registertimer(0, "delayMsg", "You cannot execute this command.", message, player)
- end
- elseif t[1] == "/uninvis" then
- if permission == 1 then
- if count == 2 then
- registertimer(0, "delayMsg", svcmd("sv_uninvis " .. t[2]), message, player)
- else
- registertimer(0, "delayMsg", "Invalid Syntax: /uninvis [player]", message, player)
- end
- else
- registertimer(0, "delayMsg", "You cannot execute this command.", message, player)
- end
- elseif t[1] == "/unsuspend" then
- if permission == 1 then
- if count == 2 then
- registertimer(0, "delayMsg", svcmd("sv_unsuspend " .. t[2]), message, player)
- else
- registertimer(0, "delayMsg", "Invalid Syntax: /unsuspend [player]", message, player)
- end
- else
- registertimer(0, "delayMsg", "You cannot execute this command.", message, player)
- end
- elseif t[1] == "/banlist" then
- if permission == 1 then
- if count == 1 then
- registertimer(0, "delayMsg", svcmd("sv_banlist"), message, player)
- else
- registertimer(0, "delayMsg", "Invalid Syntax: /banlist", message, player)
- end
- else
- registertimer(0, "delayMsg", "You cannot execute this command.", message, player)
- end
- end
- end
- end
- elseif string.sub(message, 1, 1) == "/" or string.sub(message, 1, 1) == "\\" then
- registertimer(0, "delayMsg", "You cannot execute this command.", message, player)
- end
- if t[1] == "/info" or t[1] == "\\info" then
- local player_number = resolveplayer(player)
- local m_player = getplayer(player)
- local hash = gethash(player)
- local display = 1
- if access ~= nil then
- if count == 2 then
- player_number = t[2]
- m_player = getplayer(rresolveplayer(player_number))
- hash = gethash(rresolveplayer(player_number))
- if hash == 0 then
- registertimer(0, "delayMsg", "Invalid Player", message, player)
- display = 0
- end
- elseif count > 2 then
- registertimer(0, "delayMsg", "Invalid Syntax: /info", message, player)
- registertimer(0, "delayMsg", "Invalid Syntax: /info [player]", message, player)
- display = 0
- end
- end
- if display == 1 then
- local m_playerObjId = readdword(m_player, 0x34)
- local m_object = getobject(m_playerObjId)
- local player_name = readstring(m_player, 0x4, 0x14)
- local player_team = readdword(m_player, 0x20)
- local player_respawn_time = readdword(m_player, 0x2C)
- local player_invis_time = readword(m_player, 0x68)
- local player_speed = readfloat(m_player, 0x6C)
- local player_objective_mode = readbyte(m_player, 0x74)
- local player_objective_mode2 = readbyte(m_player, 0x7A)
- local player_killstreak = readword(m_player, 0x96)
- local player_kills = readword(m_player, 0x9C)
- local player_assists = readword(m_player, 0xA4)
- local player_betrays = readword(m_player, 0xAC)
- local player_deaths = readword(m_player, 0xAE)
- local player_suicides = readword(m_player, 0xB0)
- local player_ping = readword(m_player, 0xDC)
- local player_x_coord = readfloat(m_player, 0xF8)
- local player_y_coord = readfloat(m_player, 0xFC)
- local player_z_coord = readfloat(m_player, 0x100)
- local obj_max_health = readfloat(m_object, 0xD8)
- local obj_max_shields = readfloat(m_object, 0xDC)
- local obj_health = readfloat(m_object, 0xE0)
- local obj_shields = readfloat(m_object, 0xE4)
- local obj_flashlight_mode = readbyte(m_object, 0x206)
- local obj_crouch = readbyte(m_object, 0x2A0)
- local obj_weap_type = readbyte(m_object, 0x2F2)
- local obj_nade_type = readbyte(m_object, 0x31C)
- local obj_primary_nades = readbyte(m_object, 0x31E)
- local obj_secondary_nades = readbyte(m_object, 0x31F)
- local obj_flashlight_level = readfloat(m_object, 0x344)
- local obj_invis_scale = readfloat(m_object, 0x37C)
- local obj_airborne = readbyte(m_object, 0x4CC)
- local obj_primary_weap_id = readdword(m_object, 0x2F8)
- local obj_secondary_weap_id = readdword(m_object, 0x2FC)
- local primary_weap = getobject(obj_primary_weap_id)
- local secondary_weap = getobject(obj_secondary_weap_id)
- local m_vehicle = getobject(readdword(m_object, 0x11C))
- if obj_crouch == 1 or obj_crouch == 5 or obj_crouch == 6 or obj_crouch == 13 or obj_crouch == 17 then
- primary_weap = getobject(readdword(m_vehicle, 0x2F8))
- end
- local primary_weap_heat = readfloat(primary_weap, 0x23C)
- local primary_weap_age = readfloat(primary_weap, 0x240)
- local primary_weap_ammo = readword(primary_weap, 0x2B6)
- local primary_weap_clip = readword(primary_weap, 0x2B8)
- local secondary_weap_heat = readfloat(secondary_weap, 0x23C)
- local secondary_weap_age = readfloat(secondary_weap, 0x240)
- local secondary_weap_ammo = readword(secondary_weap, 0x2B6)
- local secondary_weap_clip = readword(secondary_weap, 0x2B8)
- local teamsize = getteamsize(player_team)
- if player_team == 0 then
- player_team = "Red"
- elseif player_team == 1 then
- player_team = "Blue"
- end
- if player_objective_mode == 0x22 and player_objective_mode2 == 0x71 then
- player_objective_mode = "Hill"
- elseif player_objective_mode == 0x23 and player_objective_mode2 == 0x71 then
- player_objective_mode = "Juggernaut"
- elseif player_objective_mode == 0x23 and player_objective_mode2 == 0x72 then
- player_objective_mode = "It"
- elseif player_objectivemode == 0x29 and player_objective_mode2 == 0x70 then
- player_objective_mode = "Ball"
- else
- player_objective_mode = "None"
- end
- if obj_weap_type == 2 and player_objective_mode == "None" then
- player_objective_mode = "Flag"
- end
- player_respawn_time = round(player_respawn_time / 30)
- player_invis_time = round(player_invis_time / 30)
- player_betrays = player_betrays - player_suicides
- player_x_coord = round(player_x_coord)
- player_y_coord = round(player_y_coord)
- player_z_coord = round(player_z_coord)
- obj_invis_scale = round(obj_invis_scale * 100)
- if obj_invis_scale == 0 then
- obj_invis_scale = "No"
- else
- obj_invis_scale = obj_invis_scale .. "%"
- end
- local invis_info = "Invis: " .. obj_invis_scale
- if obj_invis_scale ~= "No" then
- invis_info = "Invis: " .. obj_invis_scale .. " (" .. player_invis_time .. " secs)"
- end
- if obj_flashlight_mode == 8 then
- obj_flashlight_mode = "On"
- else
- obj_flashlight_mode = "Off"
- end
- obj_flashlight_level = round(obj_flashlight_level * 100)
- if primary_weap_age == 0 then
- if primary_weap_ammo ~= 0 or primary_weap_clip ~= 0 then
- writefloat(primary_weap, 0x240, 1)
- primary_weap_age = 1
- end
- end
- if secondary_weap_age == 0 then
- if secondary_weap_ammo ~= 0 or secondary_weap_clip ~= 0 then
- writefloat(secondary_weap, 0x240, 1)
- secondary_weap_age = 1
- end
- end
- if obj_weap_type == 1 then
- primary_weap_heat = readfloat(secondary_weap, 0x23C)
- primary_weap_age = readfloat(secondary_weap, 0x240)
- primary_weap_ammo = readword(secondary_weap, 0x2B6)
- primary_weap_clip = readword(secondary_weap, 0x2B8)
- secondary_weap_heat = readfloat(primary_weap, 0x23C)
- secondary_weap_age = readfloat(primary_weap, 0x240)
- secondary_weap_ammo = readword(primary_weap, 0x2B6)
- secondary_weap_clip = readword(primary_weap, 0x2B8)
- end
- primary_weap_heat = round(primary_weap_heat * 100)
- primary_weap_age = round((1 - primary_weap_age) * 100)
- secondary_weap_heat = round(secondary_weap_heat * 100)
- secondary_weap_age = round((1 - secondary_weap_age) * 100)
- local primary_weap_info = "Primary: Empty"
- local secondary_weap_info = "Secondary: Empty"
- if obj_health ~= 0 then
- if obj_crouch == 1 or obj_crouch == 5 or obj_crouch == 6 or obj_crouch == 13 or obj_crouch == 17 then
- if primary_weap_age == 100 and primary_weap_ammo == 0 and primary_weap_clip == 0 then
- primary_weap_info = "Primary: Infinite"
- else
- primary_weap_info = "Primary Ammo: " .. primary_weap_clip .. " / " .. primary_weap_ammo
- end
- else
- if primary_weap ~= nil then
- if primary_weap_age == 0 then
- if primary_weap_ammo ~= 0 or primary_weap_clip ~= 0 then
- primary_weap_info = "Primary Ammo: " .. primary_weap_clip .. " / " .. primary_weap_ammo
- end
- else
- primary_weap_info = "Primary Battery: " .. primary_weap_heat .. "% / " .. primary_weap_age .. "%"
- end
- end
- if secondary_weap ~= nil then
- if secondary_weap_age == 0 then
- if secondary_weap_ammo ~= 0 or secondary_weap_clip ~= 0 then
- secondary_weap_info = "Secondary Ammo: " .. secondary_weap_clip .. " / " .. secondary_weap_ammo
- end
- else
- secondary_weap_info = "Secondary Battery: " .. secondary_weap_heat .. "% / " .. secondary_weap_age .. "%"
- end
- end
- end
- end
- local nade_info = "Frag Grenades: " .. obj_primary_nades .. " | " .. "Plasma Grenades: " .. obj_secondary_nades
- if obj_nade_type == 1 then
- nade_info = "Plasma Grenades: " .. obj_secondary_nades .. " | " .. "Frag Grenades: " .. obj_primary_nades
- end
- if obj_crouch == 0 then
- obj_crouch = "Warthog: Driver"
- elseif obj_crouch == 1 then
- obj_crouch = "Warthog: Gunner"
- elseif obj_crouch == 2 then
- obj_crouch = "Warthog: Passenger"
- elseif obj_crouch == 3 then
- obj_crouch = "Stance: Crouching"
- elseif obj_crouch == 4 then
- obj_crouch = "Stance: Standing"
- elseif obj_crouch == 5 then
- obj_crouch = "Ghost: Driver"
- elseif obj_crouch == 6 then
- obj_crouch = "Banshee: Pilot"
- elseif obj_crouch == 13 then
- obj_crouch = "Scorpion: Driver"
- elseif obj_crouch == 17 then
- obj_crouch = "Shade: Gunner"
- elseif obj_crouch == 20 or obj_crouch == 21 or obj_crouch == 22 or obj_crouch == 23 then
- obj_crouch = "Scorpion: Passenger"
- end
- if obj_crouch == "Stance: Crouching" or obj_crouch == "Stance: Standing" then
- if obj_airborne == 1 then
- obj_crouch = "Stance: Airborne"
- end
- end
- if obj_health == 0 and obj_shields == 0 then
- obj_crouch = "Stance: Dead"
- end
- obj_max_health = round(obj_health * obj_max_health)
- obj_max_shields = round(obj_shields * obj_max_shields)
- obj_health = round(obj_health * 100)
- obj_shields = round(obj_shields * 100)
- local health_info = "Health: " .. obj_health .. "% (" .. obj_max_health .. ") | " .. "Shields: " .. obj_shields .. "% (" .. obj_max_shields .. ")"
- if obj_health == 0 and obj_shields == 0 and player_respawn_time ~= 0 then
- if player_respawn_time == 1 then
- health_info = "Respawn: " .. player_respawn_time .. " sec"
- else
- health_info = "Respawn: " .. player_respawn_time .. " secs"
- end
- end
- if suspend_table[hash] == 2 then
- health_info = "Respawn: Never"
- end
- privatesay(player, "----------")
- privatesay(player, "Name: " .. player_name .. " (" .. player_number .. ") | " .. "Team: " .. player_team .. " (" .. teamsize .. ") | " .. "Speed: " .. player_speed .. " | " .. "Location: " .. player_x_coord .. ", " .. player_y_coord .. ", " .. player_z_coord)
- privatesay(player, "Hash: " .. hash .. " | " .. "Ping: " .. player_ping .. " | " .. obj_crouch)
- privatesay(player, "Kills: " .. player_kills .. " (" .. player_killstreak .. ") | " .. "Assists: " .. player_assists .. " | " .. "Betrays: " .. player_betrays .. " | " .. "Suicides: " .. player_suicides .. " | " .. "Deaths: " .. player_deaths)
- privatesay(player, health_info .. " | " .. invis_info .. " | " .. "Light: " .. obj_flashlight_mode .. " (" .. obj_flashlight_level .. "%)")
- privatesay(player, primary_weap_info .. " | " .. secondary_weap_info .. " | " .. "Objective: " .. player_objective_mode)
- privatesay(player, nade_info)
- privatesay(player, "----------")
- end
- end
- if mute_table[hash] ~= nil then
- AllowChat = 0
- end
- if spamtimeout_table[hash] ~= nil then
- AllowChat = 0
- end
- if AllowChat == 1 and access == nil then
- if spam_table[hash] == nil then
- spam_table[hash] = 1
- else
- spam_table[hash] = spam_table[hash] + 1
- end
- end
- return AllowChat
- end
- function Spawn(message, objname, objtype, objloc, player, give)
- message = message:gsub('"', "")
- m = {}
- vehid = 0
- local count = gettokencount(message, " ")
- for i=1,count do
- local word = gettoken(message, " ", i - 1)
- word = string.lower(word)
- table.insert(m, word)
- end
- if count == 2 then -- only spawn one next to person spawning
- local m_player = getplayer(player)
- local m_playerObjId = readdword(m_player, 0x34)
- local m_object = getobject(m_playerObjId)
- local m_vehicleId = readdword(m_object, 0x11C)
- if m_object ~= nil then
- if m_vehicleId ~= 0xFFFFFFFF then
- x,y,z = getobjectcoords(m_vehicleId)
- else
- x,y,z = getobjectcoords(m_playerObjId)
- local camera_x = readfloat(m_object, 0x230)
- local camera_y = readfloat(m_object, 0x234)
- x = x + camera_x * 2
- y = y + camera_y * 2
- z = z + 2
- end
- vehid = createobject(objtype, objloc, 0, 60, false, x+1.0, y, z + 1.3)
- if give == true then
- assignweapon(player, vehid)
- registertimer(0, "delayMsg", objname .. " given to " .. getname(player), message, player)
- else
- registertimer(0, "delayMsg", objname .. " spawned at " .. getname(player) .. "'s location", message, player)
- end
- else
- registertimer(0, "delayMsg", "You cannot spawn stuff while dead!", message, player)
- end
- elseif count >= 3 and count <= 6 then
- if validplayer(m[3]) ~= false then
- for i = 1,#players do
- local m_player = getplayer(players[i])
- local m_playerObjId = readdword(m_player, 0x34)
- local m_object = getobject(m_playerObjId)
- local m_vehicleId = readdword(m_object, 0x11C)
- if m_object ~= nil then
- if m_vehicleId ~= 0xFFFFFFFF and m_vehicleId ~= nil then
- x,y,z = getobjectcoords(m_vehicleId)
- else
- x,y,z = getobjectcoords(m_playerObjId)
- local camera_x = readfloat(m_object, 0x230)
- local camera_y = readfloat(m_object, 0x234)
- x = x + camera_x * 2
- y = y + camera_y * 2
- z = z + 2
- end
- if count == 3 then
- vehid = createobject(objtype, objloc, 0, 60, false, x, y, z)
- if objtype == "weap" and give == true then
- assignweapon(players[i], vehid)
- registertimer(0, "delayMsg", objname .. " given to " .. getname(players[i]), message, player)
- if string.sub(message, 1, 1) ~= "/" then
- registertimer(0, "delayMsg", "You have been given a " .. objname .. ".", "\\", player)
- end
- else
- registertimer(0, "delayMsg", objname .. " spawned at " .. getname(players[i]) .. "'s location.", message, player)
- end
- elseif count == 4 then -- specify amount
- if m[4] ~= 0 then
- for i = 1,m[4] do
- createobject(objtype, objloc, 0, 0, false, x, y, z)
- end
- registertimer(0, "delayMsg", m[4] .. " " .. objname .. "s spawned at " .. getname(players[i]) .. "'s location.", message, player)
- privatesay(players[i], objname .. " spawned above you.")
- else
- registertimer(0, "delayMsg", "You didn't spawn anything!")
- end
- elseif count == 5 then -- specify resptime
- if m[4] ~= 0 then
- for i = 1,m[4] do
- createobject(objtype, objloc, 0, m[5], false, x, y, z)
- end
- registertimer(0, "delayMsg", m[4] .. " " .. objname .. "s spawned at " .. getname(players[i]) .. "'s location.", message, player)
- privatesay(players[i], objname .. " spawned above you.")
- else
- registertimer(0, "delayMsg", "You didn't spawn anything!")
- end
- elseif count == 6 then -- specify recycle boolean
- if m[4] ~= 0 then
- for i = 1,m[4] do
- createobject(objtype, objloc, 0, m[5], m[6], x, y, z)
- end
- registertimer(0, "delayMsg", m[4] .. " " .. objname .. "s spawned at " .. getname(players[i]) .. "'s location.", message, player)
- privatesay(players[i], objname .. " spawned above you.")
- else
- registertimer(0, "delayMsg", "You didn't spawn anything!", message, player)
- end
- else
- registertimer(0, "delayMsg", "Invalid Syntax: /spawn [object] {person} {amount} {resptime} {recycle}", message, player)
- end
- else
- say("Could not spawn next to " .. getname(players[i]) ". Player is dead.")
- end
- end
- else
- registertimer(5, "delayMsg", "Invalid Player!")
- end
- else
- registertimer(5, "delayMsg", "Invalid Syntax: /spawn [object]")
- registertimer(5, "delayMsg", "Invalid Syntax: /spawn [object] [person]")
- registertimer(5, "delayMsg", "Invalid Syntax: /spawn [object] [person] [amount]")
- registertimer(5, "delayMsg", "Invalid Syntax: /spawn [object] [person] [amount] [resptime]")
- registertimer(5, "delayMsg", "Invalid Syntax: /spawn [object] [person] [amount] [resptime] [recycle]")
- end
- return vehid
- end
- function OnServerCommand(player, command)
- local response = 1
- local toksize = getcmdtokencount(command)
- local cmd = getcmdtoken(command, 0)
- local count = gettokencount(command, " ")
- t = {}
- for i=1,count do
- local word = gettoken(command, " ", i - 1)
- word = string.lower(word)
- word = word:gsub('"', "")
- table.insert(t, word)
- end
- if t[1] == "sv_afk" then
- response = 0
- if count == 2 then
- if validplayer(t[2]) ~= false then
- for i = 1,#players do
- local m_player = getplayer(players[i])
- local player_respawn_time = readdword(m_player, 0x2c)
- if player_respawn_time >= 20 then
- writedword(m_player, 0x2c, 1 * 33)
- hprintf(getname(players[i]) .. " is no longer afk!")
- else
- kill(players[i])
- writedword(m_player, 0x2c, 9999 * 33)
- hprintf(getname(players[i]) .. " is now afk!")
- end
- end
- else
- hprintf("Invalid Player!")
- end
- else
- hprintf("Invalid Syntax: sv_afk {player}")
- end
- elseif t[1] == "sv_gethash" then
- response = 0
- if count == 2 then
- if validplayer(t[2]) ~= false then
- for i = 1,#players do
- hprintf(gethash(players[i]))
- end
- else
- hprintf("Invalid Player!")
- end
- else
- hprintf("Invalid Syntax: sv_gethash [player]")
- end
- elseif t[1] == "sv_help" then
- response = 0
- if t[2] == "a" then
- hprintf("Syntax: sv_a [player] [nickname] [level]")
- hprintf("Adds a player to the admin list.")
- elseif t[2] == "ammo" then
- hprintf("Syntax: sv_ammo [player] [ammo]")
- hprintf("Sets the player's primary weapon's ammo. Use * for all players.")
- elseif t[2] == "b" then
- hprintf("Syntax: sv_b [player] {time}")
- hprintf("Bans a player indefinitely, or for the time specified.")
- elseif t[2] == "c" then
- hprintf("Syntax: sv_c [victim] [controller]")
- hprintf("Forces the victim to move in any direction the controller is moving.")
- elseif t[2] == "deathless" then
- hprintf("Syntax: sv_deathless [boolean]")
- hprintf("Will set the game so no one can die. 0 for off, 1 for on.")
- hprintf("Using 'heal' will override this, however")
- elseif t[2] == "e" then
- hprintf("Syntax: sv_e [Command]")
- hprintf("This will execute any command that you would normally put in the console.")
- hprintf("This is also used more commonly to tell if the script is working.")
- hprintf("Or if a player has admin.")
- elseif t[2] == "eject" then
- hprintf("Syntax: sv_eject [player]")
- hprintf("Ejects a player. Use * for all players.")
- elseif t[2] == "enter" then
- hprintf("Syntax: sv_enter [player] [seat]")
- hprintf("Will cause you to enter the player's vehicle, and the seat specified.")
- elseif t[2] == "getloc" then
- hprintf("Syntax: sv_getloc [player]")
- hprintf("Will display the location of the player specified.")
- elseif t[2] == "godmode" then
- hprintf("Syntax: sv_godmode [player]")
- hprintf("Will make this person unkillable. Backtaps, however, will still kill them.")
- elseif t[2] == "hax" then
- hprintf("Syntax: sv_hax")
- hprintf("I made this command because I was bored.")
- elseif t[2] == "heal" then
- hprintf("Syntax: sv_heal [player]")
- hprintf("Will heal the specified player.")
- elseif t[2] == "help" then
- hprintf("Syntax: sv_help [Command]")
- hprintf("Will provide details on any specified command.")
- hprintf("Do not include sv_ or \ for the [Command]")
- elseif t[2] == "hitler" then
- hprintf("Syntax: sv_hitler")
- hprintf("Will lethaly inject everyone.")
- elseif t[2] == "infammo" then
- hprintf("Syntax: sv_infammo [boolean]")
- hprintf("Will set the game so everyone has infinite ammo. 0 for off, 1 for on")
- elseif t[2] == "give" then
- hprintf("Syntax: sv_give [weapon] {player}")
- hprintf("Will give yourself, or the person specified, a weapon.")
- hprintf("You can hold up to 4 weapons. If you are holding 4 weapons,")
- hprintf("you cannot pickup the flag, or the oddball.")
- elseif t[2] == "gethash" then
- hprintf("Syntax: sv_gethash [player]")
- hprintf("This will get the hash of the player specified.")
- elseif t[2] == "invis" then
- hprintf("Syntax: sv_invis [player] {time}")
- hprintf("This will camouflage the person specified for the amount of time specified.")
- elseif t[2] == "j" then
- hprintf("Syntax: sv_j [player] [x] [y] [z]")
- hprintf("Moves the specified player by coords specified.")
- elseif t[2] == "k" then
- hprintf("Syntax: sv_k [player]")
- hprintf("Will kick the player specified.")
- elseif t[2] == "kill" then
- hprintf("Syntax: sv_kill [player]")
- hprintf("Will kill the player specified.")
- elseif t[2] == "lo3" then
- hprintf("Syntax: sv_lo3")
- hprintf("Will lo3 the game.")
- elseif t[2] == "m" then
- hprintf("Syntax: sv_m [map] [gametype] {script} {script2} . . .")
- hprintf("Will load the map specified. No need to specify chatcommands script.")
- elseif t[2] == "mc" then
- hprintf("Syntax: sv_mc")
- hprintf("Starts the mapcycle.")
- elseif t[2] == "mnext" then
- hprintf("Syntax: sv_mnext")
- hprintf("Loads the next map in the mapcycle.")
- elseif t[2] == "mute" then
- hprintf("Syntax: sv_mute [player] {time}")
- hprintf("Mutes the player. Admins cannot be muted.")
- elseif t[2] == "pass" then
- hprintf("Syntax: sv_pass [password]")
- hprintf("Sets the server password.")
- elseif t[2] == "reset" then
- hprintf("Syntax: sv_reset")
- hprintf("Resets the map.")
- elseif t[2] == "resp" then
- hprintf("Syntax: sv_resp [player] [time]")
- hprintf("Sets respawn time of player. Only works if player is dead.")
- elseif t[2] == "say" then
- hprintf("Syntax: sv_say [message]")
- hprintf("Will say something as the server. No quotes needed.")
- elseif t[2] == "sc" then
- hprintf("Syntax: sv_sc [player] [nickname]")
- hprintf("Will set the player's nickname. Used instead of player IDs")
- elseif t[2] == "setassists" then
- hprintf("Syntax: sv_setassists [player] [# of assists]")
- hprintf("Will set the assists of the player specified.")
- elseif t[2] == "setdeaths" then
- hprintf("Syntax: sv_setdeaths [player] [# of deaths]")
- hprintf("Will set the deaths of the player specified.")
- elseif t[2] == "setfrags" then
- hprintf("Syntax: sv_setfrags [player] [# of frags]")
- hprintf("Will set the # of frag grenades of the player specified.")
- elseif t[2] == "setkills" then
- hprintf("Syntax: sv_setkills [player] [# of kills]")
- hprintf("Will set the kills of the player specified.")
- elseif t[2] == "setname" then
- hprintf("Syntax: sv_setname [player] [name]")
- hprintf("Sets the name of the player specified.")
- hprintf("You will only notice a difference on rejoin.")
- elseif t[2] == "setresp" then
- hprintf("Syntax: sv_setresp [time]")
- hprintf("Sets the universal respawn time of all mapssv_gametypes.")
- elseif t[2] == "setplasmas" then
- hprintf("Syntax: sv_setplasmas [player] [# of plasma grenades]")
- hprintf("Will set the plasma grenades of the player specified.")
- elseif t[2] == "spd" then
- hprintf("Syntax: sv_spd [player] [speed]")
- hprintf("Will set the speed of the player specified.")
- elseif t[2] == "spawn" then
- hprintf("Syntax: sv_spawn [object] {player} {ammount} {resptime} {recycle}")
- hprintf("Will spawn a object over a player if specified.")
- elseif t[2] == "st" then
- hprintf("Syntax: sv_st [location]")
- hprintf("Will set a teleport location to wherever you're standing.")
- elseif t[2] == "suspend" then
- hprintf("Syntax: sv_suspend [player] {time}")
- hprintf("Will suspend the player for the time specified.")
- elseif t[2] == "t" then
- hprintf("Syntax: sv_t [player] [location]")
- hprintf("Will teleport the player specified to the location specified.")
- elseif t[2] == "td" then
- hprintf("Syntax: sv_td [location]")
- hprintf("Will delete the teleport location specified.")
- elseif t[2] == "test" then
- hprintf("Syntax: sv_test [player]")
- hprintf("I used this to randomly see the returns of some addresses and offsets.")
- elseif t[2] == "tp" then
- hprintf("Syntax: sv_tp [player] [t_player]")
- hprintf("Will teleport player to t_player")
- elseif t[2] == "ts" then
- hprintf("Syntax: sv_changeteam [player] {team}")
- hprintf("Will switch the players team. Teams are 0 and 1")
- elseif t[2] == "unhax" then
- hprintf("Syntax: sv_unhax")
- hprintf("Unhax's you. I was bored, what can i say?")
- elseif t[2] == "unmute" then
- hprintf("Syntax: sv_unmute [player]")
- hprintf("Unmutes the player specified.")
- elseif t[2] == "unsuspend" then
- hprintf("Syntax: sv_unsuspend [player]")
- hprintf("Unsuspends the player specified.")
- elseif t[2] == "credits" then
- hprintf("Created by [DWM]Wizard")
- hprintf("Base script created by Smiley")
- else
- hprintf("Invalid Command! Use sv_list for list of commands!")
- end
- elseif t[1] == "sv_deathless" then
- response = 0
- if count == 1 then
- if deathless == 1 then
- hprintf("Deathless is currently enabled.")
- else
- hprintf("Deathless is currently disabled")
- end
- elseif count == 2 then
- if (t[2] == "1" or t[2] == "true") and deathless ~= 1 then
- for c = 0,15 do
- if getplayer(c) ~= nil then
- local m_player = getplayer(c)
- local m_playerObjId = readdword(m_player, 0x34)
- local m_object = getobject(m_playerObjId)
- local obj_health = readfloat(m_object, 0xE0)
- local obj_shields = readfloat(m_object, 0xE4)
- writefloat(m_object, 0xE0, 99999999)
- writefloat(m_object, 0xE4, 99999999)
- end
- end
- hprintf("Deathless player is now on. You cannot die.")
- deathless = 1
- elseif t[2] == "1" or t[2] == "true" then
- hprintf("Deathless is already enabled!")
- elseif (t[2] == "0" or t[2] == "false") and deathless ~= 0 then
- local c = 0
- for c = 0,15 do
- if getplayer(c) ~= nil then
- local m_player = getplayer(c)
- local m_playerObjId = readdword(m_player, 0x34)
- local m_object = getobject(m_playerObjId)
- local obj_health = readfloat(m_object, 0xE0)
- local obj_shields = readfloat(m_object, 0xE4)
- writefloat(m_object, 0xE0, 1)
- writefloat(m_object, 0xE4, 1)
- end
- end
- hprintf("Deathless player is now off.")
- deathless = 0
- elseif t[2] == "0" or t[2] == "false" then
- hprintf("Deathless is already disabled!")
- else
- hprintf("Invalid Boolean: 0 for false, 1 for true")
- end
- else
- hprintf("Invalid Syntax: sv_deathless {boolean}")
- end
- elseif t[1] == "sv_setmode" then
- response = 0
- if validplayer(t[2]) ~= false then
- if count == 3 then
- for i = 1,#players do
- if t[3] == "destroy" then
- mode[gethash(players[i])] = "destroy"
- hprintf(getname(players[i]) .. " is now in destroy mode!")
- elseif t[3] == "portalgun" then
- mode[gethash(players[i])] = "portalgun"
- hprintf(getname(players[i]) .. " is now in portalgun mode!")
- elseif t[3] == "entergun" then
- mode[gethash(players[i])] = "entergun"
- hprintf(getname(players[i]) .. " is now in entergun mode!")
- elseif t[3] == "controlgun" then
- mode[gethash(players[i])] = "controlgun"
- hprintf(getname(players[i]) .. " is now in controlgun mode!")
- elseif t[3] == "normal" or t[3] == "none" or t[3] == "regular" then
- objspawntype[gethash(players[i])] = nil
- objspawntag[gethash(players[i])] = nil
- mode[gethash(players[i])] = nil
- hprintf(getname(players[i]) .. " is now in normal mode!")
- end
- end
- elseif count == 4 then
- for i = 1,#players do
- if t[3] == "spawngun" then
- local objexists = false
- objspawntype[gethash(players[i])] = nil
- objspawntag[gethash(players[i])] = nil
- mode[gethash(players[i])] = nil
- for j = 1,#objects do
- if t[4] == objects[j][1] then
- mode[gethash(players[i])] = "spawngun"
- objspawntype[gethash(players[i])] = objects[j][2]
- objspawntag[gethash(players[i])] = objects[j][3]
- hprintf(getname(players[i]) .. " is now spawning " .. objects[j][3] .. "!")
- objexists = true
- break
- end
- end
- if objexists == false then
- hprintf("Object does not exist. Make sure you are spelling it right.")
- end
- end
- end
- else
- hprintf("Invalid Syntax: sv_setmode [player] [mode] {object}")
- end
- else
- say("Invalid Player!")
- end
- elseif t[1] == "sv_eject" then
- response = 0
- if count == 2 then
- if validplayer(t[2]) ~= false then
- for i = 1,#players do
- local player_struct = getplayer(players[i])
- local player_respawn_time = readdword(player_struct, 0x2c)
- local player_obj_struct = getobject(getplayerobjectid(players[i]))
- local player_vehicle_id = readdword(player_obj_struct, 0x11C)
- if player_obj_struct ~= nil and player_respawn_time == 0 then
- if player_vehicle_id ~= 0xffffffff then
- exitvehicle(players[i])
- hprintf("Ejecting " .. getname(players[i]) .. " from his/her vehicle!")
- else
- hprintf("Error! " .. getname(players[i]) .. " is not in a vehicle!")
- end
- else
- hprintf("Error! " .. getname(players[i]) .. " is dead!")
- end
- end
- else
- hprintf("Invalid Player")
- end
- else
- hprintf("Invalid Syntax: sv_eject [player]")
- end
- elseif t[1] == "sv_getloc" then
- response = 0
- if count == 2 then
- if validplayer(t[2]) ~= false then
- for i = 1,#players do
- local m_playerObjId = getplayerobjectid(players[i])
- if getobject(m_playerObjId) ~= nil then
- local x,y,z = getobjectcoords(m_playerObjId)
- hprintf(getname(players[i]) .. "'s coords are: X: " .. x .. " Y: " .. y .. " Z: " .. z)
- else
- hprintf("Error! " .. getname(players[i]) .. " is dead!")
- end
- end
- else
- hprintf("Invalid Player!")
- end
- else
- hprintf("Invalid Syntax: sv_getloc [player]")
- end
- elseif t[1] == "sv_ghost" then
- response = 0
- if count == 1 then
- local m_object = getobject(getplayerobjectid(player))
- if m_object ~= nil then
- writebit(m_object, 0x10, 7, 1)
- hprintf("You are now a ghost!")
- else
- hprintf("You cannot become a ghost while dead!")
- end
- elseif count == 2 then
- if validplayer(t[2]) ~= false then
- for i = 1,#players do
- local m_object = getobject(getplayerobjectid(players[i]))
- if m_object ~= nil then
- writebit(m_object, 0x10, 7, 1)
- hprintf(getname(players[i]) .. " is now a ghost!")
- privatesay(players[i], "You are now a ghost.")
- else
- hprintf("You cannot ghost " .. getname(players[i]) .. " because " .. getname(players[i]) .. " is dead!")
- end
- end
- else
- hprintf("Invalid Player!")
- end
- else
- hprintf("Invalid Syntax: sv_ghost {player}")
- end
- elseif t[1] == "sv_unghost" then
- response = 0
- if count == 1 then
- local m_object = getobject(getplayerobjectid(player))
- if m_object ~= nil then
- writebit(m_object, 0x10, 7, 0)
- hprintf("You are no longer a ghost.")
- else
- hprintf("You cannot unghost while dead!")
- end
- elseif count == 2 then
- if validplayer(t[2]) ~= false then
- for i = 1,#players do
- local m_object = getobject(getplayerobjectid(players[i]))
- if m_object ~= nil then
- writebit(m_object, 0x10, 7, 0)
- hprintf(getname(players[i]) .. " is no longer a ghost!")
- privatesay(players[i], "You are no longer a ghost.")
- else
- hprintf("You cannot unghost " .. getname(players[i]) .. " because " .. getname(players[i]) .. " is dead!")
- end
- end
- else
- hprintf("Invalid Player!")
- end
- else
- hprintf("Invalid Syntax: sv_unghost {player}")
- end
- elseif t[1] == "sv_setgod" then
- response = 0
- if count == 2 then
- if deathless ~= 1 then
- if validplayer(t[2]) ~= false then
- for i = 1,#players do
- local m_player = getplayer(players[i])
- local m_playerObjId = readdword(m_player, 0x34)
- local m_object = getobject(m_playerObjId)
- if m_object ~= nil then
- local obj_health = readfloat(m_object, 0xE0)
- local obj_shields = readfloat(m_object, 0xE4)
- writefloat(m_object, 0xE0, 99999999)
- writefloat(m_object, 0xE4, 99999999)
- hprintf(getname(players[i]) .. " has been given godmode!")
- privatesay(players[i], "You have been given godmode.")
- else
- hprintf("Error! " .. getname(players[i]) .. " is dead!")
- end
- end
- else
- hprintf("Invalid Player")
- end
- else
- hprintf("Deathless is enabled! You cannot give out godmode!")
- end
- else
- hprintf("Invalid Syntax: sv_setgod [player]")
- end
- elseif t[1] == "cheat_hax" then
- response = 0
- if count == 2 then
- if validplayer(t[2]) ~= false then
- for i = 1,#players do
- local m_player = getplayer(players[i])
- writeword(m_player, 0x9C, 9999)
- writeword(m_player, 0xA4, 9999)
- writeword(m_player, 0xAC, 9999)
- writeword(m_player, 0xAE, 9999)
- writeword(m_player, 0xB0, 9999)
- privatesay(players[i], "You have been haxed!")
- end
- end
- else
- hprintf("Invalid Syntax: cheat_hax [player]")
- end
- elseif t[1] == "sv_heal" then
- response = 0
- if count == 2 then
- if validplayer(t[2]) ~= false then
- for i = 1,#players do
- local m_player = getplayer(players[i])
- local m_playerObjId = readdword(m_player, 0x34)
- local m_object = getobject(m_playerObjId)
- if m_object ~= nil then
- local obj_health = readfloat(m_object, 0xE0)
- local obj_shields = readfloat(m_object, 0xE4)
- writefloat(m_object, 0xE0, 1)
- writefloat(m_object, 0xE4, 1)
- hprintf(getname(players[i]) .. " has been healed!")
- privatesay(players[i], "You have been healed!")
- else
- hprintf("Error! " .. getname(players[i]) .. " is dead!")
- end
- end
- else
- hprintf("Invalid Player")
- end
- else
- hprintf("Invalid Syntax: sv_heal [player]")
- end
- elseif t[1] == "sv_ungod" then
- response = 0
- if count == 2 then
- if validplayer(t[2]) ~= false then
- for i = 1,#players do
- local m_player = getplayer(players[i])
- local m_playerObjId = readdword(m_player, 0x34)
- local m_object = getobject(m_playerObjId)
- local obj_health = readfloat(m_object, 0xE0)
- local obj_shields = readfloat(m_object, 0xE4)
- writefloat(m_object, 0xE0, 1)
- writefloat(m_object, 0xE4, 1)
- hprintf(getname(players[i]) .. " is no longer in godmode")
- privatesay(players[i], "You are no longer in godmode.")
- end
- else
- hprintf("Invalid Player")
- end
- else
- hprintf("Invalid Syntax: sv_ungod [player]")
- end
- elseif t[1] == "sv_hitler" then
- response = 0
- if count == 1 then
- local c = 0
- for c = 0,15 do
- if getplayer(c) ~= nil then
- kill(c)
- hprintf(getname(c) .. " was given a lethal injection!")
- end
- end
- else
- hprintf("Invalid Syntax: sv_hitler")
- end
- elseif t[1] == "sv_infinite_ammo" then
- response = 0
- if count == 1 then
- if infammo == 1 then
- hprintf("Infinite ammo is currently enabled")
- elseif infammo == 0 then
- hprintf("Infinite ammo is currently disabled")
- end
- elseif count == 2 then
- if t[2] == "1" and infammo ~= 1 then
- for c = 0,15 do
- if getplayer(c) ~= nil then
- local m_player = getplayer(c)
- local m_ObjId = readdword(m_player, 0x34)
- local m_Object = getobject(m_ObjId)
- if m_player ~= nil and m_Object ~= nil then
- for i = 0, 3 do
- local m_weaponId = readdword(m_Object, 0x2F8 + (i*4))
- if m_weaponId ~= -1 then
- local m_weapon = getobject(m_weaponId)
- writeword(m_weapon, 0x2B6, 9999) -- unloaded clip to 9999
- --writeword(m_weapon, 0x2B8, 9999) -- loaded clip to 9999
- --updateammo(m_weaponId)
- end
- end
- end
- end
- end
- infammo = 1
- hprintf("Infinite Ammo is now enabled!")
- elseif t[2] == "1" then
- hprintf("Infammo is already enabled!")
- elseif t[2] ~= "0" then
- hprintf("Invalid Boolean: 0 for false, 1 for true")
- elseif t[2] == "0" and infammo ~= 0 then
- if nadetimer ~= nil then
- removetimer(nadetimer)
- end
- for c = 0,15 do
- if getplayer(c) ~= nil then
- local m_player = getplayer(c)
- local m_ObjId = readdword(m_player, 0x34)
- local m_Object = getobject(m_ObjId)
- if m_player ~= nil and m_Object ~= nil then
- for i = 0, 3 do
- local m_weaponId = readdword(m_Object, 0x2F8 + (i*4))
- if m_weaponId ~= -1 then
- local m_weapon = getobject(m_weaponId)
- writeword(m_weapon, 0x2B6, 20) -- unloaded clip to 20
- writeword(m_weapon, 0x2B8, 3)
- end
- end
- writebyte(m_Object, 0x31E, 4) -- set frags to 4
- writebyte(m_Object, 0x31F, 4) -- set plasmas to 4
- end
- end
- end
- infammo = 0
- hprintf("Infinite Ammo is now disabled!")
- elseif t[2] == "0" then
- hprintf("Infammo is already disabled!")
- else
- hprintf("Invalid Boolean: 0 for false, 1 for true")
- end
- else
- hprintf("Invalid Syntax: sv_infinite_ammo [boolean]")
- end
- elseif t[1] == "sv_invis" then
- response = 0
- if count == 2 then
- if validplayer(t[2]) ~= false then
- for i = 1,#players do
- if getobject(getplayerobjectid(players[i])) ~= nil then
- applycamo(players[i], 0)
- hprintf(getname(players[i]) .. " is now invisible!")
- privatesay(players[i], "You are now invisible until you die.")
- else
- hprintf("Error! " .. getname(players[i]) .. " is dead!")
- end
- end
- else
- hprintf("Invalid Player")
- end
- elseif count == 3 then
- if validplayer(t[2]) ~= false then
- for i = 1,#players do
- applycamo(players[i], t[3])
- hprintf(getname(players[i]) .. " is now invisible for " .. t[3] .. " seconds!")
- privatesay(players[i], "You are now invisible for " .. t[3] .. " seconds.")
- end
- else
- hprintf("Invalid Player")
- end
- else
- hprintf("Invalid Syntax: sv_invis [player]")
- hprintf("Invalid Syntax: sv_invis [player] [time]")
- end
- elseif t[1] == "sv_move" then
- response = 0
- if count == 5 then
- if validplayer(t[2]) ~= false then
- for i = 1,#players do
- local m_playerObjId = getplayerobjectid(players[i])
- if m_playerObjId ~= 0xFFFFFFFF then
- local m_objectId = 0xFFFFFFFF
- local m_vehicleId = readdword(getobject(m_playerObjId), 0x11C)
- if m_vehicleId ~= 0xFFFFFFFF then
- m_objectId = m_vehicleId
- elseif m_playerObjId ~= 0xFFFFFFFF then
- m_objectId = m_playerObjId
- end
- if m_objectId ~= 0xFFFFFFFF then
- local x,y,z = getobjectcoords(m_objectId)
- movobjcoords(m_objectId, x+t[3], y+t[4], z+t[5])
- hprintf(getname(players[i]) .. " has been moved!")
- end
- else
- hprintf("Error! " .. getname(players[i]) .. " is dead!")
- end
- end
- else
- hprintf("Invalid Player")
- end
- else
- hprintf("Invalid Syntax: sv_move [player] [x] [y] [z]")
- end
- elseif t[1] == "sv_scrim" then
- response = 0
- if count == 1 then
- lo3timer = registertimer(2000, "lo3Timer")
- hprintf("Live on three.")
- else
- hprintf("Invalid Syntax: SV_scrim")
- end
- elseif t[1] == "sv_mute" then
- response = 0
- if count == 2 then
- local mute = nil
- for k,v in pairs(admin_table) do
- if k == hash2 then
- mute = 1
- break
- end
- end
- if validplayer(t[2]) ~= false then
- for i = 1,#players do
- if mute == nil then
- if mute_table[gethash(players[i])] == nil and spamtimeout_table[gethash(players[i])] == nil then
- mute_table[gethash(players[i])] = 1
- hprintf(getname(players[i]) .. " was muted by an admin!")
- else
- hprintf(getname(players[i]) .. " has already been muted.")
- end
- else
- hprintf("Admins cannot be muted.")
- end
- end
- else
- hprintf("Invalid Player")
- end
- else
- hprintf("Invalid Syntax: sv_mute [player]")
- end
- elseif t[1] == "sv_noweapons" then
- response = 0
- if count == 2 then
- if t[2] == "1" and noweapons ~= 1 then
- for c = 0,15 do
- if getplayer(c) ~= nil and getobject(getplayerobjectid(player)) ~= nil then
- local m_player = getplayer(c)
- local m_playerObjId = readdword(m_player, 0x34)
- local m_object = getobject(m_playerObjId)
- local obj_primary_weap_id = readdword(m_object, 0x2F8)
- local obj_secondary_weap_id = readdword(m_object, 0x2FC)
- local obj_ternary_weap_id = readdword(m_object, 0x300)
- local obj_quartary_weap_id = readdword(m_object, 0x304)
- if obj_primary_weap_id ~= 4294967295 then
- destroyobject(obj_primary_weap_id)
- end
- if obj_secondary_weap_id ~= 4294967295 then
- destroyobject(obj_secondary_weap_id)
- end
- if obj_ternary_weap_id ~= 4294967295 then
- destroyobject(obj_ternary_weap_id)
- end
- if obj_quartary_weap_id ~= 4294967295 then
- destroyobject(obj_quartary_weap_id)
- end
- end
- end
- hprintf("Noweapons is now on. You cannot pick up weapons.")
- noweapons = 1
- elseif t[2] == "1" then
- hprintf("Noweapons is already enabled!")
- elseif t[2] ~= "0" then
- hprintf("Invalid Boolean: 0 for false, 1 for true")
- elseif t[2] == "0" and noweapons ~= 0 then
- local c = 0
- for c = 0,15 do
- if getplayer(c) ~= nil and getobject(getplayerobjectid(c)) ~= nil then
- resetweapons(c)
- end
- end
- hprintf("Noweapons is now off.")
- noweapons = 0
- elseif t[2] == "0" then
- hprintf("Noweapons is already disabled!")
- else
- hprintf("Invalid Boolean: 0 for false, 1 for true")
- end
- else
- hprintf("Invalid Syntax: sv_noweapons [boolean]")
- end
- elseif t[1] == "sv_resp" then
- response = 0
- if count == 3 then
- if validplayer(t[2]) ~= false then
- for i = 1,#players do
- local m_player = getplayer(players[i])
- local player_respawn_time = readdword(m_player, 0x2C)
- writedword(m_player, 0x2c, t[3] * 33)
- hprintf("Setting " .. getname(players[i]) .. "'s respawn time to " .. t[3] .. " seconds!")
- end
- else
- hprintf("Invalid Player")
- end
- else
- hprintf("Invalid Syntax sv_resp [player] [respawn time]")
- end
- elseif t[1] == "sv_enter" then
- response = 0
- if count == 3 then
- if validplayer(t[3]) ~= false then
- for i = 1,#players do
- local vehid = nil
- if t[2] == "wraith" then
- vehid = Spawn(command, "Wraith", "vehi", "vehicles\\wraith\\wraith", players[i])
- elseif t[2] == "lifepod" then
- vehid = Spawn(command, "Lifepod", "vehi", "vehicles\\lifepod\\lifepod", players[i])
- elseif t[2] == "longsword" then
- vehid = Spawn(command, "Longsword", "vehi", "vehicles\\fighterbomber\\fighterbomber", players[i])
- elseif t[2] == "dropship" then
- vehid = Spawn(command, "Covenant Dropship", "vehi", "vehicles\\c_dropship\\c_dropship", players[i])
- elseif t[2] == "cryotube" then
- vehid = Spawn(command, "Cryotube", "vehi", "levels\\a10\\devices\\cryotube\\cryotube", players[i])
- elseif t[2] == "peli" or t[2] == "pelican" then
- vehid = Spawn(command, "Pelican", "vehi", "vehicles\\pelican\\pelican", players[i])
- elseif t[2] == "ghost" then
- vehid = Spawn(command, "Ghost", "vehi", "vehicles\\ghost\\ghost_mp", players[i])
- elseif t[2] == "hog" then
- vehid = Spawn(command, "Warthog", "vehi", "vehicles\\warthog\\mp_warthog", players[i])
- elseif t[2] == "rhog" then
- vehid = Spawn(command, "Rocket Warthog", "vehi", "vehicles\\rwarthog\\rwarthog", players[i])
- elseif t[2] == "shee" or t[2] == "banshee" then
- vehid = Spawn(command, "Banshee", "vehi", "vehicles\\banshee\\banshee_mp", players[i])
- elseif t[2] == "tank" or t[2] == "scorpion" then
- vehid = Spawn(command, "Tank", "vehi", "vehicles\\scorpion\\scorpion_mp", players[i])
- elseif t[2] == "turret" or t[2] == "shade" then
- vehid = Spawn(command, "Gun Turret", "vehi", "vehicles\\c gun turret\\c gun turret_mp", players[i])
- else
- hprintf("Invalid Vehicle!")
- end
- if vehid ~= nil then
- local m_player = getplayer(players[i])
- local m_playerObjId = getplayerobjectid(players[i])
- if m_playerObjId ~= 0xffffffff then
- entervehicle(players[i], vehid, 0)
- table.insert(vehicle_drone_table[players[i]], vehid)
- hprintf(getname(players[i]) .. " has been forced to enter a vehicle!")
- else
- hprintf(getname(players[i]) .. " cannot enter a vehicle while dead!")
- end
- end
- end
- else
- hprintf("Invalid Player!")
- end
- else
- hprintf("Invalid Syntax: sv_enter [vehicle] [player]")
- end
- elseif t[1] == "sv_setassists" then
- response = 0
- if count == 3 then
- if validplayer(t[2]) ~= false then
- for i = 1,#players do
- writeword(getplayer(players[i]), 0xA4, t[3])
- hprintf(getname(players[i]) .. " had their assists set to " .. t[3])
- end
- else
- hprintf("Invalid Player")
- end
- else
- hprintf("Invalid Syntax: sv_setassists [player] [assists]")
- end
- elseif t[1] == "sv_setdeaths" then
- response = 0
- if count == 3 then
- if validplayer(t[2]) ~= false then
- for i = 1,#players do
- writeword(getplayer(players[i]), 0xAE, t[3])
- hprintf(getname(players[i]) .. " had their deaths set to " .. t[3])
- end
- else
- hprintf("Invalid Player")
- end
- else
- hprintf("Invalid Syntax: sv_setdeaths [player] [deaths]")
- end
- elseif t[1] == "sv_setfrags" then
- response = 0
- if count == 3 then
- if validplayer(t[2]) ~= false then
- for i = 1,#players do
- local m_object = getobject(getplayerobjectid(players[i]))
- if m_object ~= nil then
- if tonumber(t[3]) ~= nil then
- writebyte(m_object, 0x31E, t[3])
- hprintf("Setting " .. getname(players[i]) .. "'s frag grenades to " .. t[3])
- privatesay(players[i], "Your frag grenades were set to " .. t[3])
- else
- hprintf(t[3] .. " is not a valid number.")
- end
- else
- hprintf("Error! " .. getname(players[i]) .. " is dead!")
- end
- end
- else
- hprintf("Invalid Player")
- end
- else
- hprintf("Invalid Syntax: sv_setfrags [player] [amount]")
- end
- elseif t[1] == "sv_setkills" then
- response = 0
- if count == 3 then
- if validplayer(t[2]) ~= false then
- for i = 1,#players do
- writeword(getplayer(players[i]), 0x9C, t[3])
- hprintf(getname(players[i]) .. " had their kills set to " .. t[3])
- end
- else
- hprintf("Invalid Player")
- end
- else
- hprintf("Invalid Syntax: sv_setkills [player] [kills]")
- end
- elseif t[1] == "sv_respawn_time" then
- response = 0
- if count == 2 then
- if t[2] == "default" then
- respset = 0
- hprintf("Respawn time set to the gametype's default setting!")
- elseif tonumber(t[2]) ~= nil then
- resptime = t[2]
- respset = 1
- hprintf("Respawn time set to " .. t[2] .. " seconds!")
- else
- hprintf("That is not a valid number.")
- end
- else
- hprintf("Invalid Syntax: sv_respawn_time [seconds]")
- end
- elseif t[1] == "sv_setplasmas" then
- response = 0
- if count == 3 then
- if validplayer(t[2]) ~= false then
- for i = 1,#players do
- local m_object = getobject(getplayerobjectid(players[i]))
- if m_object ~= nil then
- if tonumber(t[3]) ~= nil then
- writebyte(m_object, 0x31F, t[3])
- hprintf("Setting " .. getname(players[i]) .. "'s plasma grenades to " .. t[3])
- else
- hprintf(t[3] .. " is not a valid number.")
- end
- else
- hprintf("Error! " .. getname(players[i]) .. " is dead!")
- end
- end
- else
- hprintf("Invalid Player")
- end
- else
- hprintf("Invalid Syntax: sv_setplasmas [player] [amount]")
- end
- elseif t[1] == "sv_spawn" then
- response = 0
- --Objects with 'bipd' tag
- if t[2] == "cyborg" or t[2] == "bot" or t[2] == "mastercheif" or t[2] == "biped" or t[2] == "bipd" then
- Spawn(command, "Cyborg", "bipd", "characters\\cyborg_mp\\cyborg_mp", player, false)
- elseif t[2] == "captain" or t[2] == "keyes" then
- Spawn(command, "Captain Keyes", "bipd", "characters\\captain\\captain", false)
- elseif t[2] == "cortana" then
- Spawn(command, "Cortana", "bipd", "characters\\cortana\\cortana", false)
- elseif t[2] == "cortana2" then
- Spawn(command, "Cortana2", "bipd", "characters\\cortana\\halo_enhanced\\halo_enhanced", false)
- elseif t[2] == "crewman" then
- Spawn(command, "Crewman", "bipd", "characters\\crewman\\crewman", false)
- elseif t[2] == "elite" then
- Spawn(command, "elite", "bipd", "characters\\elite\\elite", false)
- elseif t[2] == "elite2" then
- Spawn(command, "Elite Special", "bipd", "characters\\elite\\elite special", false)
- elseif t[2] == "engineer" then
- Spawn(command, "Engineer", "bipd", "characters\\engineer\\engineer", false)
- elseif t[2] == "flood" then
- Spawn(command, "Flood Captain", "bipd", "characters\\flood_captain\\flood_captain", false)
- elseif t[2] == "flood2" then
- Spawn(command, "Flood Infection", "bipd", "characters\\flood_infection\\flood_infection", false)
- elseif t[2] == "flood3" then
- Spawn(command, "Flood Carrier", "bipd", "characters\\floodcarrier\\floodcarrier", false)
- elseif t[2] == "floodelite" then
- Spawn(command, "FloodCombat Elite", "bipd", "characters\\floodcombat elite\\floodcombat elite", false)
- elseif t[2] == "floodhuman" then
- Spawn(command, "FloodCombat Human", "bipd", "characters\\floodcombat_human\\floodcombat_human", false)
- elseif t[2] == "pedobear" or t[2] == "grunt" then
- Spawn(command, "Pedobear", "bipd", "characters\\grunt\\grunt", false)
- elseif t[2] == "hunter" then
- Spawn(command, "Hunter", "bipd", "characters\\hunter\\hunter", false)
- elseif t[2] == "marine" then
- Spawn(command, "Marine", "bipd", "characters\\marine\\marine", false)
- elseif t[2] == "marinesuicide" or t[2] == "marine2" then
- Spawn(command, "Marine Suicidal", "bipd", "characters\\marine_suicidal\\marine_suicidal", false)
- elseif t[2] == "monitor" then
- Spawn(command, "Monitor", "bipd", "characters\\monitor\\monitor", false)
- elseif t[2] == "sentinel" then
- Spawn(command, "Sentinel", "bipd", "characters\\sentinel\\sentinel", false)
- elseif t[2] == "johnson" then
- Spawn(command, "Sgt. Johnson", "bipd", "characters\\johnson\\johnson", false)
- --Objects with 'eqip' tags
- elseif t[2] == "camo" or t[2] == "camouflage" then
- Spawn(command, "Camouflage", "eqip", "powerups\\active camouflage", player, false)
- elseif t[2] == "dblspd" then
- Spawn(command, "Double Speed", "eqip", "powerups\\double speed", player, false)
- elseif t[2] == "fullspec" then
- Spawn(command, "Full-Spectrum Vision", "eqip", "powerups\\full-spectrum vision", player, false)
- elseif t[2] == "fnade" or t[2] == "nades" then
- Spawn(command, "Frag Grenade", "eqip", "weapons\\frag grenade\\frag grenade", player, false)
- elseif t[2] == "pnade" then
- Spawn(command, "Plasma Grenade", "eqip", "weapons\\plasma grenade\\plasma grenade", player, false)
- elseif t[2] == "overshield" or t[2] == "os" then
- Spawn(command, "Overshield", "eqip", "powerups\\over shield", player, false)
- elseif t[2] == "rifleammo" then
- Spawn(command, "Assault Rifle Ammo", "eqip", "powerups\\assault rifle ammo\\assault rifle ammo", player, false)
- elseif t[2] == "healthpack" then
- Spawn(command, "Health Pack", "eqip", "powerups\\health pack", player, false)
- elseif t[2] == "needlerammo" then
- Spawn(command, "Needler Ammo", "eqip", "powerups\\needler ammo\\needler ammo", player, false)
- elseif t[2] == "pistolammo" then
- Spawn(command, "Pistol Ammo", "eqip", "powerups\\pistol ammo\\pistol ammo", player, false)
- elseif t[2] == "rocketammo" then
- Spawn(command, "Rocket Ammo", "eqip", "powerups\\rocket launcher ammo\\rocket launcher ammo", player, false)
- elseif t[2] == "shottyammo" then
- Spawn(command, "Shotgun Ammo", "eqip", "powerups\\shotgun ammo\\shotgun ammo", player, false)
- elseif t[2] == "sniperammo" then
- Spawn(command, "Sniper Ammo", "eqip", "powerups\\sniper rifle ammo\\sniper rifle ammo", player, false)
- elseif t[2] == "flameammo" then
- Spawn(command, "Flamethrower Ammo", "eqip", "powerups\\flamethrower ammo\\flamethrower ammo", player, false)
- --Objects with 'weap' tag
- elseif t[2] == "energysword" or t[2] == "esword" then
- Spawn(command, "Energy Sword", "weap", "weapons\\energy sword\\energy sword", false)
- elseif t[2] == "ball" or t[2] == "oddball" then
- Spawn(command, "Oddball", "weap", "weapons\\ball\\ball", player, false)
- elseif t[2] == "flag" then
- Spawn(command, "Flag", "weap", "weapons\\flag\\flag", player, false)
- elseif t[2] == "frg" or t[2] == "fuelrod" or t[2] == "rod" or t[2] == "plasmacannon" then
- Spawn(command, "Fuel Rod", "weap", "weapons\\plasma_cannon\\plasma_cannon", player, false)
- elseif t[2] == "ggun" or t[2] == "gravitygun" then
- Spawn(command, "Gravity Gun", "weap", "weapons\\gravity rifle\\gravity rifle", player, false)
- elseif t[2] == "needler" then
- Spawn(command, "Needler", "weap", "weapons\\needler\\mp_needler", player, false)
- elseif t[2] == "pistol" then
- Spawn(command, "Pistol", "weap", "weapons\\pistol\\pistol", player, false)
- elseif t[2] == "ppistol" or t[2] == "plasmapistol" then
- Spawn(command, "Plasma Pistol", "weap", "weapons\\plasma pistol\\plasma pistol", player, false)
- elseif t[2] == "prifle" or t[2] == "plasmarifle" then
- Spawn(command, "Plasma Rifle", "weap", "weapons\\plasma rifle\\plasma rifle", player, false)
- elseif t[2] == "rifle" or t[2] == "arifle" or t[2] == "assaultrifle" then
- Spawn(command, "Assault Rifle", "weap", "weapons\\assault rifle\\assault rifle", player, false)
- elseif t[2] == "rocket" or t[2] == "rocketlauncher" or t[2] == "rox" then
- Spawn(command, "Rocket Launcher", "weap", "weapons\\rocket launcher\\rocket launcher", player, false)
- elseif t[2] == "shotty" or t[2] == "shotgun" then
- Spawn(command, "Shotgun", "weap", "weapons\\shotgun\\shotgun", player, false)
- elseif t[2] == "sniper" then
- Spawn(command, "Sniper Rifle", "weap", "weapons\\sniper rifle\\sniper rifle", player, false)
- --Objects with 'vehi' tag
- elseif t[2] == "wraith" then
- Spawn(command, "Wraith", "vehi", "vehicles\\wraith\\wraith", player, false)
- elseif t[2] == "peli" or t[2] == "pelican" then
- Spawn(command, "Pelican", "vehi", "vehicles\\pelican\\pelican", player, false)
- elseif t[2] == "ghost" then
- Spawn(command, "Ghost", "vehi", "vehicles\\ghost\\ghost_mp", player, false)
- elseif t[2] == "hog" or t[2] == "warthog" then
- Spawn(command, "Warthog", "vehi", "vehicles\\warthog\\mp_warthog", player, false)
- elseif t[2] == "rhog" or t[2] == "rocketwarthog" then
- Spawn(command, "Rocket Warthog", "vehi", "vehicles\\rwarthog\\rwarthog", player, false)
- elseif t[2] == "shee" or t[2] == "banshee" then
- Spawn(command, "Banshee", "vehi", "vehicles\\banshee\\banshee_mp", player, false)
- elseif t[2] == "tank" or t[2] == "scorpion" then
- Spawn(command, "Tank", "vehi", "vehicles\\scorpion\\scorpion_mp", player, false)
- elseif t[2] == "turret" or t[2] == "shade" then
- Spawn(command, "Gun Turret", "vehi", "vehicles\\c gun turret\\c gun turret_mp", player, false)
- else
- hprintf("Invalid Object!")
- end
- elseif t[1] == "sv_give" then
- response = 0
- if t[2] == "energysword" or t[2] == "esword" or t[2] == "sword" then
- Spawn(command, "Energy Sword", "weap", "weapons\\energy sword\\energy sword", player, true)
- elseif t[2] == "ball" or t[2] == "oddball" then
- Spawn(command, "Oddball", "weap", "weapons\\ball\\ball", player, true)
- elseif t[2] == "flag" then
- Spawn(command, "Flag", "weap", "weapons\\flag\\flag", player, true)
- elseif t[2] == "frg" or t[2] == "fuelrod" or t[2] == "rod" or t[2] == "plasmacannon" then
- Spawn(command, "Fuel Rod", "weap", "weapons\\plasma_cannon\\plasma_cannon", player, true)
- elseif t[2] == "ggun" or t[2] == "gravitygun" then
- Spawn(command, "Gravity Gun", "weap", "weapons\\gravity rifle\\gravity rifle", player, true)
- elseif t[2] == "needler" then
- Spawn(command, "Needler", "weap", "weapons\\needler\\mp_needler", player, true)
- elseif t[2] == "pistol" then
- Spawn(command, "Pistol", "weap", "weapons\\pistol\\pistol", player, true)
- elseif t[2] == "ppistol" or t[2] == "plasmapistol" then
- Spawn(command, "Plasma Pistol", "weap", "weapons\\plasma pistol\\plasma pistol", player, true)
- elseif t[2] == "flamethrower" or t[2] == "flame" then
- Spawn(command, "Flamethrower", "weap", "weapons\\flamethrower\\flamethrower", player, true)
- elseif t[2] == "prifle" or t[2] == "plasmarifle" then
- Spawn(command, "Plasma Rifle", "weap", "weapons\\plasma rifle\\plasma rifle", player, true)
- elseif t[2] == "rifle" or t[2] == "arifle" or t[2] == "assaultrifle" then
- Spawn(command, "Assault Rifle", "weap", "weapons\\assault rifle\\assault rifle", player, true)
- elseif t[2] == "rocket" or t[2] == "rocketlauncher" or t[2] == "rox" then
- Spawn(command, "Rocket Launcher", "weap", "weapons\\rocket launcher\\rocket launcher", player, true)
- elseif t[2] == "shotty" or t[2] == "shotgun" then
- Spawn(command, "Shotgun", "weap", "weapons\\shotgun\\shotgun", player, true)
- elseif t[2] == "sniper" then
- Spawn(command, "Sniper Rifle", "weap", "weapons\\sniper rifle\\sniper rifle", player, true)
- else
- hprintf("Invalid Object!")
- end
- elseif t[1] == "sv_suspend" then
- response = 0
- if validplayer(t[2]) ~= false then
- for i = 1,#players do
- if suspend_table[gethash(players[i])] == nil then
- local m_player = getplayer(players[i])
- local player_respawn_time = readdword(m_player, 0x2c)
- if count == 2 then
- kill(players[i])
- writedword(m_player, 0x2C, 2592000)
- suspend_table[gethash(players[i])] = 2
- hprintf(getname(players[i]) .. " was suspended by an admin!")
- elseif count == 3 then
- kill(players[i])
- writedword(m_player, 0x2C, t[3] * 30)
- suspend_table[gethash(players[i])] = 1
- if tonumber(t[3]) == 1 then
- hprintf(getname(players[i]) .. " was suspended by an admin for " .. t[3] .. " second!")
- else
- hprintf(getname(players[i]) .. " was suspended by an admin for " .. t[3] .. " seconds!")
- end
- else
- hprintf("Invalid Syntax: sv_suspend [player] {time}")
- end
- else
- hprintf(getname(players[i]) .. " has already been suspended.")
- end
- end
- else
- hprintf("Invalid Player!")
- end
- elseif t[1] == "sv_teleport_pl" then
- response = 0
- if count == 3 then
- if validplayer(t[2]) ~= false then
- for i = 1,#players do
- local name = getname(players[i])
- local m_player = getplayer(players[i])
- local player_respawn_time = readdword(m_player, 0x2C)
- local m_playerObjId = readdword(m_player, 0x34)
- local m_object = getobject(m_playerObjId)
- local m_vehicle = getobject(readdword(m_object, 0x11C))
- local validplayer = validplayer2(t[3])
- if validplayer == true then
- local t_player = getplayer(players2[1])
- local t_name = getname(players2[1])
- local player2_respawn_time = readdword(t_player, 0x2C)
- local player_x_coord,player_y_coord,player_z_coord = getobjectcoords(readdword(t_player, 0x34))
- if m_vehicle ~= nil then
- writefloat(m_vehicle, 0x5C, player_x_coord)
- writefloat(m_vehicle, 0x60, player_y_coord)
- writefloat(m_vehicle, 0x64, player_z_coord + 1.5)
- hprintf(name .. " was teleported to " .. t_name)
- else
- movobjcoords(m_playerObjId, player_x_coord, player_y_coord, player_z_coord+1)
- hprintf(name .. " was teleported to " .. t_name)
- end
- elseif validplayer == nil then
- hprintf("Invalid Player!")
- end
- end
- else
- hprintf("Invalid Player!")
- end
- else
- hprintf("Invalid Syntax: sv_teleport_pl [player] [player]")
- hprintf("If you are unsure of a command, do /help on it")
- end
- elseif t[1] == "sv_changeteam" then
- response = 0
- if count == 2 then
- if validplayer(t[2]) ~= false then
- for i = 1,#players do
- changeteam(players[i], 1)
- hprintf(getname(players[i]) .. " had their team changed!")
- end
- else
- hprintf("Invalid Player")
- end
- else
- hprintf("Invalid Syntax: sv_changeteam [player]")
- end
- elseif t[1] == "sv_test" then
- response = 0
- if count == 2 then
- if getplayer(rresolveplayer(t[2])) ~= nil then
- player_struct = getplayer(rresolveplayer(t[2]))
- m_playerObjId = readdword(player_struct, 0x34)
- if m_playerObjId ~= 0xffffffff then
- entervehicle(player, m_playerObjId, 0)
- end
- end
- end
- elseif t[1] == "sv_timelimit" then
- response = 0
- if count == 2 then
- settimelimit(t[2])
- hprintf("Timelimit set to " .. t[2] .. " minutes!")
- else
- hprintf("Invalid Syntax: sv_timelimit [time]")
- end
- elseif t[1] == "cheat_unhax" then
- response = 0
- if count == 2 then
- if validplayer(t[2]) ~= nil then
- for i = 1,#players do
- local m_player = getplayer(players[i])
- writeword(m_player, 0x9C, 0)
- writeword(m_player, 0xA4, 0)
- writeword(m_player, 0xAC, 0)
- writeword(m_player, 0xAE, 0)
- writeword(m_player, 0xB0, 0)
- hprintf("Happy Hacking.")
- end
- else
- hprintf("Invalid Player!")
- end
- else
- hprintf("Invalid Syntax: cheat_unhax [player]")
- end
- elseif t[1] == "sv_unmute" then
- response = 0
- if count == 2 then
- if validplayer(t[2]) ~= false then
- for i = 1,#players do
- if gethash(players[i]) ~= nil then
- if mute_table[gethash(players[i])] ~= nil or spamtimeout_table[gethash(players[i])] ~= nil then
- mute_table[gethash(players[i])] = nil
- spamtimeout_table[gethash(players[i])] = nil
- hprintf(getname(players[i]) .. " was unmuted by an admin!")
- else
- hprintf(getname(players[i]) .. " has not been muted.")
- end
- else
- hprintf("Invalid Player")
- end
- end
- else
- hprintf("Invalid Player!")
- end
- else
- hprintf("Invalid Syntax: sv_unmute [player]")
- end
- elseif t[1] == "sv_uninvis" then
- response = 0
- if count == 2 then
- if validplayer(t[2]) ~= false then
- for i = 1,#players do
- local m_playerObjId = getplayerobjectid(players[i])
- if getobject(m_playerObjId) ~= nil then
- local x,y,z = getobjectcoords(m_playerObjId)
- local m_vehicleId = readdword(getobject(m_playerObjId), 0x11C)
- if m_vehicleId ~= 0xFFFFFFFF then
- exitvehicle(players[i])
- destroyobject(m_playerObjId)
- registertimer(1000, "uninvisTimer", players[i], m_vehicleId, x, y, z)
- elseif m_playerObjId ~= 0xFFFFFFFF then
- destroyobject(m_playerObjId)
- registertimer(1000, "uninvisTimer", players[i], m_vehicleId, x, y, z)
- end
- hprintf(getname(players[i]) .. " is no longer invisible!")
- else
- hprintf("Error! " .. getname(players[i]) .. " is dead!")
- end
- end
- else
- hprintf("Invalid Player!")
- end
- else
- hprintf("Invalid Syntax: sv_uninvis [player]")
- end
- elseif t[1] == "sv_unsuspend" then
- response = 0
- if count == 2 then
- if validplayer(t[2]) ~= false then
- for i = 1,#players do
- local m_player = getplayer(players[i])
- if suspend_table[gethash(players[i])] ~= nil then
- writedword(m_player, 0x2C, 0)
- hprintf(getname(players[i]) .. " was unsuspended by an admin!")
- else
- hprintf(getname(players[i]) .. " has not been suspended.")
- end
- end
- else
- hprintf("Invalid Player!")
- end
- else
- hprintf("Invalid Syntax: sv_unsuspend [player]")
- end
- elseif cmd == "sv_bos" then
- response = 1
- if count == 2 then
- if validplayer(t[2]) ~= false then
- for i = 1,#players do
- local bos_entry = bos_table[players[i]]
- local words = {}
- for word in bos_entry:gmatch("%w+") do
- table.insert(words, word)
- end
- local size = table.getn(words)
- local name = ""
- local hash = words[size]
- for i=1,(size - 1) do
- name = name .. words[i] .. " "
- end
- hprintf("Adding " .. name .. "to BoS.")
- hprintf("Entry: " .. name .. "- " .. hash)
- table.insert(boslog_table, bos_entry)
- end
- else
- hprintf("Invalid Player!")
- end
- else
- hprintf("Invalid Syntax: sv_bos [player]")
- end
- elseif cmd == "sv_boslist" then
- response = 0
- if count == 1 then
- hprintf("[Num Name - Hash]")
- for k,v in pairs(boslog_table) do
- if v ~= nil then
- local words = {}
- for word in v:gmatch("%w+") do
- table.insert(words, word)
- end
- local size = table.getn(words)
- local name = ""
- local hash = words[size]
- for i=1,(size - 1) do
- name = name .. " " .. words[i]
- end
- hprintf("[" .. k - 1 .. name .. " - " .. hash .. "]")
- end
- end
- end
- elseif cmd == "sv_stickman_animation" then
- response = 0
- if toksize == 1 then
- registertimer(750, "stickman")
- else
- hprintf("Invalid Syntax: sv_stickman_animation")
- end
- elseif cmd == "sv_randomkill" then
- response = 0
- if count == 1 then
- local random = getrandomnumber(0, 15)
- local player_number = resolveplayer(random)
- while player_number == -1 do
- random = getrandomnumber(0, 15)
- player_number = resolveplayer(random)
- end
- kill(rresolveplayer(player_number))
- else
- hprintf("Invalid Syntax: sv_randomkill")
- end
- elseif cmd == "sv_unbos" then
- response = 0
- if count == 2 then
- local number = tonumber(getcmdtoken(command, 1) + 1)
- local entry = boslog_table[number]
- local words = {}
- if entry == nil then
- hprintf("Invalid Entry")
- else
- for word in entry:gmatch("%w+") do
- table.insert(words, word)
- end
- local size = table.getn(words)
- local name = ""
- local hash = words[size]
- for i=1,(size - 1) do
- name = name .. " " .. words[i]
- end
- hprintf("Removing" .. name .. " - " .. hash .. " from BoS.")
- table.remove(boslog_table, number)
- end
- else
- hprintf("Invalid Syntax: sv_unbos [entry]")
- end
- elseif cmd == "sv_info" then
- response = 0
- local player_number = player + 1
- local m_player = getplayer(player)
- local hash = gethash(player)
- local display = 1
- if count == 2 then
- player_number = tonumber(getcmdtoken(command, 1))
- m_player = getplayer(rresolveplayer(player_number))
- hash = gethash(rresolveplayer(player_number))
- if hash == 0 then
- hprintf("Invalid Player")
- display = 0
- end
- elseif toksize > 2 then
- hprintf("Invalid Syntax: sv_info {player}")
- display = 0
- end
- if display == 1 then
- local m_playerObjId = readdword(m_player, 0x34)
- local m_object = getobject(m_playerObjId)
- local player_name = readstring(m_player, 0x4, 0x14)
- local player_team = readdword(m_player, 0x20)
- local player_respawn_time = readdword(m_player, 0x2C)
- local player_invis_time = readword(m_player, 0x68)
- local player_speed = readfloat(m_player, 0x6C)
- local player_objective_mode = readbyte(m_player, 0x74)
- local player_objective_mode2 = readbyte(m_player, 0x7A)
- local player_killstreak = readword(m_player, 0x96)
- local player_kills = readword(m_player, 0x9C)
- local player_assists = readword(m_player, 0xA4)
- local player_betrays = readword(m_player, 0xAC)
- local player_deaths = readword(m_player, 0xAE)
- local player_suicides = readword(m_player, 0xB0)
- local player_ping = readword(m_player, 0xDC)
- local player_x_coord = readfloat(m_player, 0xF8)
- local player_y_coord = readfloat(m_player, 0xFC)
- local player_z_coord = readfloat(m_player, 0x100)
- local obj_max_health = readfloat(m_object, 0xD8)
- local obj_max_shields = readfloat(m_object, 0xDC)
- local obj_health = readfloat(m_object, 0xE0)
- local obj_shields = readfloat(m_object, 0xE4)
- local obj_flashlight_mode = readbyte(m_object, 0x206)
- local obj_crouch = readbyte(m_object, 0x2A0)
- local obj_weap_type = readbyte(m_object, 0x2F2)
- local obj_nade_type = readbyte(m_object, 0x31C)
- local obj_primary_nades = readbyte(m_object, 0x31E)
- local obj_secondary_nades = readbyte(m_object, 0x31F)
- local obj_flashlight_level = readfloat(m_object, 0x344)
- local obj_invis_scale = readfloat(m_object, 0x37C)
- local obj_airborne = readbyte(m_object, 0x4CC)
- local obj_primary_weap_id = readdword(m_object, 0x2F8)
- local obj_secondary_weap_id = readdword(m_object, 0x2FC)
- local primary_weap = getobject(obj_primary_weap_id)
- local secondary_weap = getobject(obj_secondary_weap_id)
- local m_vehicle = getobject(readdword(m_object, 0x11C))
- if obj_crouch == 1 or obj_crouch == 5 or obj_crouch == 6 or obj_crouch == 13 or obj_crouch == 17 then
- primary_weap = getobject(readdword(m_vehicle, 0x2F8))
- end
- local primary_weap_heat = readfloat(primary_weap, 0x23C)
- local primary_weap_age = readfloat(primary_weap, 0x240)
- local primary_weap_ammo = readword(primary_weap, 0x2B6)
- local primary_weap_clip = readword(primary_weap, 0x2B8)
- local secondary_weap_heat = readfloat(secondary_weap, 0x23C)
- local secondary_weap_age = readfloat(secondary_weap, 0x240)
- local secondary_weap_ammo = readword(secondary_weap, 0x2B6)
- local secondary_weap_clip = readword(secondary_weap, 0x2B8)
- local teamsize = getteamsize(player_team)
- if player_team == 0 then
- player_team = "Red"
- elseif player_team == 1 then
- player_team = "Blue"
- end
- if player_objective_mode == 0x22 and player_objective_mode2 == 0x71 then
- player_objective_mode = "Hill"
- elseif player_objective_mode == 0x23 and player_objective_mode2 == 0x71 then
- player_objective_mode = "Juggernaut"
- elseif player_objective_mode == 0x23 and player_objective_mode2 == 0x72 then
- player_objective_mode = "It"
- elseif player_objectivemode == 0x29 and player_objective_mode2 == 0x70 then
- player_objective_mode = "Ball"
- else
- player_objective_mode = "None"
- end
- if obj_weap_type == 2 and player_objective_mode == "None" then
- player_objective_mode = "Flag"
- end
- player_respawn_time = round(player_respawn_time / 30)
- player_invis_time = round(player_invis_time / 30)
- player_betrays = player_betrays - player_suicides
- player_x_coord = round(player_x_coord)
- player_y_coord = round(player_y_coord)
- player_z_coord = round(player_z_coord)
- obj_invis_scale = round(obj_invis_scale * 100)
- if obj_invis_scale == 0 then
- obj_invis_scale = "No"
- else
- obj_invis_scale = obj_invis_scale
- end
- local invis_info = "Invis: " .. obj_invis_scale
- if obj_invis_scale ~= "No" then
- invis_info = "Invis: " .. obj_invis_scale .. " (" .. player_invis_time .. " secs)"
- end
- if obj_flashlight_mode == 8 then
- obj_flashlight_mode = "On"
- else
- obj_flashlight_mode = "Off"
- end
- obj_flashlight_level = round(obj_flashlight_level * 100)
- if primary_weap_age == 0 then
- if primary_weap_ammo ~= 0 or primary_weap_clip ~= 0 then
- writefloat(primary_weap, 0x240, 1)
- primary_weap_age = 1
- end
- end
- if secondary_weap_age == 0 then
- if secondary_weap_ammo ~= 0 or secondary_weap_clip ~= 0 then
- writefloat(secondary_weap, 0x240, 1)
- secondary_weap_age = 1
- end
- end
- if obj_weap_type == 1 then
- primary_weap_heat = readfloat(secondary_weap, 0x23C)
- primary_weap_age = readfloat(secondary_weap, 0x240)
- primary_weap_ammo = readword(secondary_weap, 0x2B6)
- primary_weap_clip = readword(secondary_weap, 0x2B8)
- secondary_weap_heat = readfloat(primary_weap, 0x23C)
- secondary_weap_age = readfloat(primary_weap, 0x240)
- secondary_weap_ammo = readword(primary_weap, 0x2B6)
- secondary_weap_clip = readword(primary_weap, 0x2B8)
- end
- primary_weap_heat = round(primary_weap_heat * 100)
- primary_weap_age = round((1 - primary_weap_age) * 100)
- secondary_weap_heat = round(secondary_weap_heat * 100)
- secondary_weap_age = round((1 - secondary_weap_age) * 100)
- local primary_weap_info = "Primary: Empty"
- local secondary_weap_info = "Secondary: Empty"
- if obj_health ~= 0 then
- if obj_crouch == 1 or obj_crouch == 5 or obj_crouch == 6 or obj_crouch == 13 or obj_crouch == 17 then
- if primary_weap_age == 100 and primary_weap_ammo == 0 and primary_weap_clip == 0 then
- primary_weap_info = "Primary: Infinite"
- else
- primary_weap_info = "Primary Ammo: " .. primary_weap_clip .. " / " .. primary_weap_ammo
- end
- else
- if primary_weap ~= 0 then
- if primary_weap_age == 0 then
- if primary_weap_ammo ~= 0 or primary_weap_clip ~= 0 then
- primary_weap_info = "Primary Ammo: " .. primary_weap_clip .. " / " .. primary_weap_ammo
- end
- else
- primary_weap_info = "Primary Battery: " .. primary_weap_heat .. " / " .. primary_weap_age
- end
- end
- if secondary_weap ~= 0 then
- if secondary_weap_age == 0 then
- if secondary_weap_ammo ~= 0 or secondary_weap_clip ~= 0 then
- secondary_weap_info = "Secondary Ammo: " .. secondary_weap_clip .. " / " .. secondary_weap_ammo
- end
- else
- secondary_weap_info = "Secondary Battery: " .. secondary_weap_heat .. " / " .. secondary_weap_age
- end
- end
- end
- end
- local nade_info = "Frag Grenades: " .. obj_primary_nades .. " | " .. "Plasma Grenades: " .. obj_secondary_nades
- if obj_nade_type == 1 then
- nade_info = "Plasma Grenades: " .. obj_secondary_nades .. " | " .. "Frag Grenades: " .. obj_primary_nades
- end
- if obj_crouch == 0 then
- obj_crouch = "Warthog: Driver"
- elseif obj_crouch == 1 then
- obj_crouch = "Warthog: Gunner"
- elseif obj_crouch == 2 then
- obj_crouch = "Warthog: Passenger"
- elseif obj_crouch == 3 then
- obj_crouch = "Stance: Crouching"
- elseif obj_crouch == 4 then
- obj_crouch = "Stance: Standing"
- elseif obj_crouch == 5 then
- obj_crouch = "Ghost: Driver"
- elseif obj_crouch == 6 then
- obj_crouch = "Banshee: Pilot"
- elseif obj_crouch == 13 then
- obj_crouch = "Scorpion: Driver"
- elseif obj_crouch == 17 then
- obj_crouch = "Shade: Gunner"
- elseif obj_crouch == 20 or obj_crouch == 21 or obj_crouch == 22 or obj_crouch == 23 then
- obj_crouch = "Scorpion: Passenger"
- end
- if obj_crouch == "Stance: Crouching" or obj_crouch == "Stance: Standing" then
- if obj_airborne == 1 then
- obj_crouch = "Stance: Airborne"
- end
- end
- if obj_health == 0 and obj_shields == 0 then
- obj_crouch = "Stance: Dead"
- end
- obj_max_health = round(obj_health * obj_max_health)
- obj_max_shields = round(obj_shields * obj_max_shields)
- obj_health = round(obj_health * 100)
- obj_shields = round(obj_shields * 100)
- local health_info = "Health: " .. obj_health .. " (" .. obj_max_health .. ") | " .. "Shields: " .. obj_shields .. " (" .. obj_max_shields .. ")"
- if obj_health == 0 and obj_shields == 0 and player_respawn_time ~= 0 then
- if player_respawn_time == 1 then
- health_info = "Respawn: " .. player_respawn_time .. " sec"
- else
- health_info = "Respawn: " .. player_respawn_time .. " secs"
- end
- end
- if suspend_table[hash] == 2 then
- health_info = "Respawn: Never"
- end
- hprintf("----------")
- hprintf("Name: " .. player_name .. " (" .. player_number .. ") | " .. "Team: " .. player_team .. " (" .. teamsize .. ") | " .. "Speed: " .. player_speed .. " | " .. "Location: " .. player_x_coord .. ", " .. player_y_coord .. ", " .. player_z_coord)
- hprintf("Hash: " .. hash .. " | " .. "Ping: " .. player_ping .. " | " .. obj_crouch)
- hprintf("Kills: " .. player_kills .. " (" .. player_killstreak .. ") | " .. "Assists: " .. player_assists .. " | " .. "Betrays: " .. player_betrays .. " | " .. "Suicides: " .. player_suicides .. " | " .. "Deaths: " .. player_deaths)
- hprintf(health_info .. " | " .. invis_info .. " | " .. "Light: " .. obj_flashlight_mode .. " (" .. obj_flashlight_level .. ")")
- hprintf(primary_weap_info .. " | " .. secondary_weap_info .. " | " .. "Objective: " .. player_objective_mode)
- hprintf(nade_info)
- hprintf("----------")
- end
- end
- return response
- end
- function getstatus(m_player)
- local status = ""
- local player_struct = getplayer(m_player)
- local m_playerObjId = readdword(player_struct, 0x34)
- local m_object = getobject(m_playerObjId)
- local obj_crouch = readbyte(m_object, 0x2A0)
- if obj_crouch == 0 then
- status = "wpassenger"
- elseif obj_crouch == 1 then
- status = "wpassenger"
- elseif obj_crouch == 2 then
- status = "wpassenger"
- elseif obj_crouch == 3 then
- status = "crouching"
- elseif obj_crouch == 4 then
- status = "standing"
- elseif obj_crouch == 5 then
- status = "gdriver"
- elseif obj_crouch == 6 then
- status = "bpilot"
- elseif obj_crouch == 13 then
- status = "sdriver"
- elseif obj_crouch == 17 then
- status = "turret"
- elseif obj_crouch == 20 or obj_crouch == 21 or obj_crouch == 22 or obj_crouch == 23 then
- status = "spassenger"
- end
- return status
- end
- function OnTeamDecision(cur_team)
- return cur_team
- end
- function OnPlayerJoin(player, team)
- cur_players = cur_players + 1
- local sv_player = resolveplayer(player)
- local name = getname(player)
- local hash = gethash(player)
- local words = {}
- for k,v in pairs(boslog_table) do
- for word in v:gmatch("%w+") do
- table.insert(words, word)
- end
- local size = table.getn(words)
- local entry_name = ""
- local entry_hash = words[size]
- for i=1,(size - 1) do
- entry_name = entry_name .. words[i] .. " "
- end
- if entry_hash == hash then
- for i=0,15 do
- local player_hash = gethash(i)
- if admin_table[player_hash] ~= nil then
- privatesay(i, name .. " banned from BoS.")
- privatesay(i, "Entry: " .. entry_name .. "- " .. entry_hash)
- end
- end
- hprintf(name .. " banned from BoS.")
- hprintf("Entry: " .. entry_name .. "- " .. entry_hash)
- svcmd("sv_ban " .. sv_player)
- table.remove(boslog_table, k)
- break
- end
- end
- for k,v in pairs(admin_table) do
- if k == gethash(player) then
- say("Server Admin: " .. getname(player))
- break
- end
- end
- end
- function OnPlayerLeave(player, team)
- cur_players = cur_players - 1
- local sv_player = resolveplayer(player)
- local name = getname(player)
- local hash = gethash(player)
- bos_table[sv_player] = name .. "," .. hash
- cleanupdrones(player)
- end
- function OnPlayerKill(killer, victim, mode)
- if respset == 1 then
- local m_player = getplayer(victim)
- local player_respawn_time = readdword(m_player, 0x2C)
- writedword(m_player, 0x2c, resptime * 33)
- end
- cleanupdrones(victim)
- end
- function OnKillMultiplier(player, multiplier)
- end
- function OnPlayerSpawn(player, m_objectId)
- local hash = gethash(player)
- if deathless == 1 then
- local m_player = getplayer(player)
- local m_playerObjId = readdword(m_player, 0x34)
- local m_object = getobject(m_playerObjId)
- local obj_health = readfloat(m_object, 0xE0)
- local obj_shields = readfloat(m_object, 0xE4)
- writefloat(m_object, 0xE0, 9999999999)
- writefloat(m_object, 0xE4, 9999999999)
- end
- if suspend_table[hash] ~= nil then
- suspend_table[hash] = nil
- end
- end
- function OnPlayerSpawnEnd(player, m_objectId)
- end
- function OnTeamChange(relevant, player, team, dest_team)
- return 1
- end
- function OnObjectInteraction(player, m_ObjectId, tagType, tagName)
- local Pass = 1
- if noweapons == 1 then
- Pass = 0
- end
- return Pass
- end
- function OnObjectCreation(m_objectId, player_owner, tag)
- if getplayer(player_owner) ~= nil then
- for i = 25,43 do
- if mode[gethash(player_owner)] == "portalgun" then
- if tag == objects[i][3] then
- local m_object = getobject(m_objectId)
- registertimer(20, "portalgunTimer", player_owner, m_object)
- end
- elseif mode[gethash(player_owner)] == "spawngun" then
- if tag == objects[i][3] then
- local m_object = getobject(m_objectId)
- registertimer(0, "spawngunTimer", player_owner, m_object)
- end
- end
- end
- end
- end
- function OnWeaponReload(player, weapon)
- if infammo == 1 then
- writeword(getobject(weapon), 0x2B6, 9999)
- writeword(getobject(weapon), 0x2B8, 9999)
- updateammo(weapon)
- return 0
- else
- return 1
- end
- end
- function OnVehicleEntry(relevant, player, vehicleId, vehicle_tag, seat)
- return 1
- end
- function OnVehicleEject(player, forceEject)
- local m_object = getobject(getplayerobjectid(player))
- if m_object ~= nil then
- local vehicleId = readdword(m_object, 0x11c)
- cleanupdrone(player, vehicleId)
- end
- return 1
- end
- function OnDamageLookup(receiving_obj, causing_obj, tagdata, tagname)
- if deathless == 1 then
- writebyte(tagdata, 0x1C4, 0)
- end
- if causing_obj ~= -1 and causing_obj ~= nil then
- for i = 25,43 do
- local player = objecttoplayer(causing_obj)
- if mode[gethash(player)] == "destroy" then
- if tagname == objects[i][3] then
- destroyobject(receiving_obj)
- end
- elseif mode[gethash(player)] == "entergun" then
- if tagname == objects[i][3] and string.sub(getobjecttag(receiving_obj), 1, 8) == "vehicles" then
- entervehicle(player, receiving_obj, 0)
- end
- end
- end
- end
- end
- function getobjecttag(object)
- local m_object = getobject(object)
- local object_map_id = readdword(m_object, 0x0)
- local map_pointer = 0x460678
- local map_base = readdword(map_pointer, 0x0)
- local map_tag_count = todec(endian(map_base, 0xC, 0x3))
- local tag_table_base = map_base + 0x28
- local tag_table_size = 0x20
- for i=0,(map_tag_count - 1) do
- local tag_id = todec(endian(tag_table_base, 0xC + (tag_table_size * i), 0x3))
- if tag_id == object_map_id then
- tag_name_address = endian(tag_table_base, 0x10 + (tag_table_size * i), 0x3)
- tag_name = readtagname("0x" .. tag_name_address)
- return tag_name
- end
- end
- end
- function endian(address, offset, length)
- local data_table = {}
- local data = ""
- for i=0,length do
- local hex = string.format("%X", readbyte(address, offset + i))
- if tonumber(hex, 16) < 16 then
- hex = 0 .. hex
- end
- table.insert(data_table, hex)
- end
- for k,v in pairs(data_table) do
- data = v .. data
- end
- return data
- end
- function todec(number)
- return tonumber(number, 16)
- end
- function readtagname(address)
- local char_table = {}
- local i = 0
- local string = ""
- while readbyte(address, i) ~= 0 do
- table.insert(char_table, string.char(readbyte(address, i)))
- i = i + 1
- end
- for k,v in pairs(char_table) do
- string = string .. v
- end
- return string
- end
- function getweapon(player, weapon)
- local tag_name_address = nil
- local tag_name = ""
- local m_player = getplayer(player)
- local m_object = getobject(readdword(m_player, 0x34))
- local weap_id = getobject(readdword(m_object, 0x2F8 + ((weapon - 1) * 4)))
- local weap_meta_id = readdword(weap_id, 0x0)
- local map_pointer = 0x460678
- local map_base = readdword(map_pointer, 0x0)
- local map_tag_count = todec(endian(map_base, 0xC, 0x3))
- local tags_base = map_base + 0x28
- local tags_size = 0x20
- local tag_address = 0
- for i=0,(map_tag_count - 1) do
- local tag_id = todec(endian(tags_base, 0xC + (tags_size * i), 0x3))
- if tag_id == weap_meta_id then
- tag_name_address = endian(tags_base, 0x10 + (tags_size * i), 0x3)
- tag_name = readtagname("0x" .. tag_name_address)
- end
- end
- return tag_name
- end
- function OnWeaponAssignment(player, object, count, tag)
- end
- function cleanupdrones(player)
- -- pretty hacky way to remove the vehicles, but only way i could get working
- for k,v in pairs(vehicle_drone_table[player]) do
- local seats = getseats(v)
- if seats ~= nil then
- for i = 0,seats - 1 do
- entervehicle(player, v, i)
- exitvehicle(player)
- end
- destroyobject(v)
- end
- vehicle_drone_table[player][k] = nil
- end
- end
- function getseats(m_objectId)
- local seats = nil
- local m_object = getobject(m_objectId)
- local tagname = getobjecttag(m_object)
- if tagname == "vehicles\\rwarthog\\rwarthog" or tagname == "vehicles\\warthog\\mp_warthog" then
- seats = 3
- elseif tagname == "vehicles\\scorpion\\scorpion_mp" then
- seats = 5
- else
- seats = 1
- end
- return seats
- end
- function cleanupdrone(player, objid)
- for k,v in pairs(vehicle_drone_table[player]) do
- if v == objid then
- entervehicle(player, v, 0)
- exitvehicle(player)
- local seats = getseats(v)
- if seats ~= nil then
- for i = 0,seats - 1 do
- entervehicle(player, v, i)
- exitvehicle(player)
- end
- end
- --destroyobject(v) dont destroy, will destroy itself soon
- vehicle_drone_table[player][k] = nil
- break
- end
- end
- end
- function MainTimer(id, count)
- for i=0,15 do
- local hash = gethash(i)
- if hash ~= nil then
- if ghost_table[hash] == 1 then
- local m_player = getplayer(i)
- writefloat(m_player, 0x100, readfloat(m_player, 0x100) - 1000)
- end
- end
- end
- return 1
- end
- function SpamTimer(id, count)
- for i=0,15 do
- local hash = gethash(i)
- if hash ~= nil then
- local name = getname(i)
- if spam_table[hash] == nil then
- spam_table[hash] = 0
- end
- if spam_table[hash] < spam_max then
- if spam_table[hash] > 0 then
- spam_table[hash] = spam_table[hash] - 0.25
- end
- else
- say(name .. " has been muted for " .. spam_timeout .. " seconds for spamming!")
- spam_table[hash] = -1
- end
- if spam_table[hash] == -1 then
- if spamtimeout_table[hash] == nil then
- spamtimeout_table[hash] = spam_timeout
- else
- spamtimeout_table[hash] = spamtimeout_table[hash] - 1
- end
- if spamtimeout_table[hash] == 0 then
- say(name .. " has been unmuted!")
- spamtimeout_table[hash] = nil
- spam_table[hash] = 0
- end
- end
- end
- end
- return 1
- end
- function rtvTimer(id, count)
- if count == 1 then
- rtv_initiated = rtv_timeout
- say("The current rtv has expired!")
- return 0
- else
- return 1
- end
- end
- function votekickTimer(id, count, userdata)
- if count == 1 then
- local name = getname(userdata)
- votekick_allowed = true
- say("The votekick on " .. name .. " has expired!")
- for k,v in pairs(votekick_table) do
- votekick_table[k] = nil
- end
- return 0
- else
- return 1
- end
- end
- function lo3Timer(id, count)
- if count >= 3 then
- say("Start your match!")
- svcmd("sv_map_reset")
- return 0
- else
- svcmd("sv_map_reset")
- return 1
- end
- end
- function round(num)
- under = math.floor(num)
- upper = math.floor(num) + 1
- underV = -(under - num)
- upperV = upper - num
- if (upperV > underV) then
- return under
- else
- return upper
- end
- end
- function readstring(address, offset, length)
- local char_table = {}
- local string = ""
- for i=0,length do
- if readbyte(address, (offset + i)) ~= 0 then
- table.insert(char_table, string.char(readbyte(address, (offset + i))))
- end
- end
- for k,v in pairs(char_table) do
- string = string .. v
- end
- return string
- end
- function nadeTimer(id, count)
- for c = 0,15 do
- if getplayer(c) ~= nil then
- local m_player = getplayer(c)
- local m_ObjId = readdword(m_player, 0x34)
- local m_Object = getobject(m_ObjId)
- if m_player ~= -1 and m_Object ~= -1 then
- writebyte(m_Object, 0x31E, 3) -- set frags to 3
- writebyte(m_Object, 0x31F, 3) -- set plasmas to 3
- if m_player ~= -1 and m_Object ~= -1 then
- for i = 0, 3 do
- local m_weaponId = readdword(m_Object, 0x2F8 + (i*4))
- if m_weaponId ~= -1 then
- local m_weapon = getobject(m_weaponId)
- --writeword(m_weapon, 0x2B8, 2) --loaded ammo
- writeword(m_weapon, 0x2B6, 9999) -- unloaded clip to 9999
- end
- end
- end
- end
- end
- end
- if infammo == 1 then
- return 1
- elseif infammo == 0 then
- return 0
- end
- end
- function TimelimitTimer(id, count)
- time_passed = time_passed + 1 -- Increase time_passed by one every time this function is called (every second)
- return 1
- end
- function settimelimit(value)
- local gametype_base = 0x671340
- writedword(gametype_base, 0x78, (30*60*value) + ((time_passed + 1) * 30)) -- set game timer to the specified value (in minutes) + the amount of time passed (+ one second for testing purposes)
- end
- function Stickman(id, count)
- if count == 1 then
- hprintf(" _._ ")
- hprintf(" / O \ ")
- hprintf(" \| |/ ")
- hprintf("O--+=-=+--O")
- elseif count == 2 then
- svcmd("cls")
- hprintf(" ,-O-, ")
- hprintf("O--=---=--O")
- hprintf(" 2-2 ")
- hprintf(" - - ")
- elseif count == 3 then
- svcmd("cls")
- hprintf(" ,_O_, ")
- hprintf("O--(---)--O")
- hprintf(" >'> ")
- hprintf(" - - ")
- elseif count == 4 then
- svcmd("cls")
- hprintf(" ._O_. ")
- hprintf("O--<-+->--O")
- hprintf(" X ")
- hprintf(" / \ ")
- hprintf(" - - ")
- elseif count == 5 then
- svcmd("cls")
- hprintf("O--=-O-=--O")
- hprintf(" '-' ")
- hprintf(" v ")
- hprintf(" / ) ")
- hprintf(" ~ z ")
- elseif count == 6 then
- svcmd("cls")
- hprintf("O--,---,--O")
- hprintf(" \ O / ")
- hprintf(" - - ")
- hprintf(" - ")
- hprintf(" / \ ")
- hprintf(" = = ")
- elseif count == 7 then
- svcmd("cls")
- hprintf("O--=-O-=--O")
- hprintf(" '-' ")
- hprintf(" v ")
- hprintf(" / ) ")
- hprintf(" ~ z ")
- elseif count == 8 then
- svcmd("cls")
- hprintf(" ._O_. ")
- hprintf("O--<-+->--O")
- hprintf(" X ")
- hprintf(" / \ ")
- hprintf(" - - ")
- elseif count == 9 then
- svcmd("cls")
- hprintf(" ,_O_, ")
- hprintf("O--(---)--O")
- hprintf(" >'> ")
- hprintf(" - - ")
- elseif count == 10 then
- svcmd("cls")
- hprintf(" ,-O-, ")
- hprintf("O--=---=--O")
- hprintf(" 2-2 ")
- hprintf(" - - ")
- elseif count == 11 then
- svcmd("cls")
- hprintf(" _._ ")
- hprintf(" / O \ ")
- hprintf(" \| |/ ")
- hprintf("O--+=-=+--O")
- elseif count == 12 then
- svcmd("cls")
- return 0
- end
- return 1
- end
- function resetweapons(player)
- local m_player = getplayer(player)
- local m_object = getobject(readdword(m_player, 0x34))
- local x = readfloat(m_object, 0x5C)
- local y = readfloat(m_object, 0x60)
- local z = readfloat(m_object, 0x64)
- local m_playerObjId = readdword(m_player, 0x34)
- objId = createobject("weap", "weapons\\pistol\\pistol", 0, 60, false, x+1.0, y, z + 2.0)
- assignweapon(player, objId)
- objId = createobject("weap", "weapons\\assault rifle\\assault rifle", 0, 60, false, x+1.0, y, z + 2.0)
- assignweapon(player, objId)
- end
- function portalgunTimer(id, count, player_owner, m_object)
- if count == 500 then
- return 0
- end
- local m_player = getplayer(player_owner)
- if m_player ~= nil and m_object ~= nil then
- local obj_x_velocity = readfloat(m_object, 0x68)
- local m_playerObjId = readdword(m_player, 0x34)
- if obj_x_velocity == 0 then
- local x = readfloat(m_object, 0x5C)
- local y = readfloat(m_object, 0x60)
- local z = readfloat(m_object, 0x64)
- movobjcoords(m_playerObjId, x, y, z)
- return 0
- else
- return 1
- end
- end
- return 1
- end
- function spawngunTimer(id, count, player_owner, m_object)
- local m_player = getplayer(player_owner)
- if m_player ~= nil and m_object ~= nil then
- local m_playerObjId = readdword(player_owner, 0x34)
- local x = readfloat(m_object, 0x5C)
- local y = readfloat(m_object, 0x60)
- local z = readfloat(m_object, 0x64)
- createobject(objspawntype[gethash(player_owner)], objspawntag[gethash(player_owner)], 0, 60, false, x, y, z)
- end
- return 0
- end
- function validplayer2(message)
- local valid = false
- for i = 1,#players2 do
- if players2[i] ~= nil then
- players2[i] = nil
- end
- end
- if string.len(message) == "1" and message == "*" then
- for i = 0,15 do
- if getplayer(i) ~= nil then
- table.insert(players2, i)
- valid = true
- end
- end
- elseif string.sub(message, 1, 1) == "*" then
- for c = 0,15 do
- if getplayer(c) ~= nil then
- local name = getname(c)
- local lowerfix = string.gsub(message, "*", "")
- if string.find(string.lower(name), string.lower(lowerfix)) ~= nil then
- table.insert(players2, c)
- valid = true
- end
- end
- end
- elseif string.sub(message, 1, 3) == "red" then
- for i = 0,15 do
- if getplayer(i) ~= nil then
- local player_team = readdword(getplayer(i), 0x20)
- if player_team == 0 then
- table.insert(players2, i)
- valid = true
- end
- end
- end
- elseif string.sub(message, 1, 4) == "blue" then
- for i = 0,15 do
- if getplayer(i) ~= nil then
- local player_team = readdword(getplayer(i), 0x20)
- if player_team == 1 then
- table.insert(players2, i)
- valid = true
- end
- end
- end
- elseif message == "1" or message == "2" or message == "3" or message == "4" or message == "5" or message == "6" or message == "7" or message == "8" or message == "9" or message == "10" or message == "11" or message == "12" or message == "13" or message == "14" or message == "15" or message == "16" then
- if getplayer(rresolveplayer(message)) ~= nil then
- table.insert(players2, rresolveplayer(message))
- valid = true
- end
- end
- return valid
- end
- function validplayer(message)
- local valid = false
- for i = 1,#players do
- if players[i] ~= nil then
- players[i] = nil
- end
- end
- if string.len(message) == "1" and message == "*" then
- for i = 0,15 do
- if getplayer(i) ~= nil then
- table.insert(players, i)
- valid = true
- end
- end
- elseif string.sub(message, 1, 1) == "*" then
- for i = 0,15 do
- if getplayer(i) ~= nil then
- local name = getname(i)
- local lowerfix = string.gsub(message, "*", "")
- if string.find(string.lower(name), string.lower(lowerfix)) ~= nil then
- table.insert(players, i)
- valid = true
- end
- end
- end
- elseif string.sub(message, 1, 3) == "red" then
- for i = 0,15 do
- if getplayer(i) ~= nil then
- local player_team = readdword(getplayer(i), 0x20)
- if player_team == 0 then
- table.insert(players, i)
- valid = true
- end
- end
- end
- elseif string.sub(message, 1, 4) == "blue" then
- for i = 0,15 do
- if getplayer(i) ~= nil then
- local player_team = readdword(getplayer(i), 0x20)
- if player_team == 1 then
- table.insert(players, i)
- valid = true
- end
- end
- end
- elseif tonumber(message) ~= nil then
- if message == "1" or message == "2" or message == "3" or message == "4" or message == "5" or message == "6" or message == "7" or message == "8" or message == "9" or message == "10" or message == "11" or message == "12" or message == "13" or message == "14" or message == "15" or message == "16" then
- if getplayer(rresolveplayer(message)) ~= nil then
- table.insert(players, rresolveplayer(message))
- valid = true
- end
- end
- end
- return valid
- end
- function uninvisTimer(id, count, player, m_vehicleId, x, y, z)
- m_playerObjId = getplayerobjectid(player)
- if getobject(m_playerObjId) ~= nil then
- if getobject(m_vehicleId) ~= nil then
- movobjcoords(m_playerObjId, x, y, z+1)
- entervehicle(player, m_vehicleId, 0)
- else
- movobjcoords(m_playerObjId, x, y, z)
- end
- end
- return 0
- end
- function delayMsg(id, count, msg, message, player)
- message = message:gsub('"', "")
- if string.sub(message, 1, 1) == "\\" then
- privatesay(player, msg)
- elseif string.sub(message, 1, 1) == "/" then
- say(msg)
- else
- hprintf(msg)
- say(msg)
- end
- return 0
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement