pi.hooks = {} function GetPlayerDamageScale (H) return pi.hooks.PlayerDamageScale(H) end function pi.hooks.PlayerDamageScale (H) if hitgroup == HITGROUP_HEAD then return 4.5 else return 1.2 end end function GiveDefaultItems(PlayerID) pi.hooks.EquipPlayer(PlayerID) end function pi.hooks.EquipPlayer (PlayerID) SteamID = pi.players.GetSteamID(PlayerID) PTable = pi.players.data[SteamID] if PTable.alive then _Msg("Player ".._PlayerInfo(PlayerID, "name").." is spawning.\n") _PlayerRemoveAllWeapons(PlayerID) _PlayerSetHealth(PlayerID, PTable.attributes.health + 100) _PlayerSetArmor(PlayerID, PTable.attributes.armour) _PlayerSetMaxSpeed(PlayerID, PTable.attributes.speed) _Msg("HP: "..PTable.attributes.health.." ("..PTable.attributes.healthregen..") - AP: "..PTable.attributes.armour.." ("..PTable.attributes.armourregen..") - SPD: "..PTable.attributes.speed.."\n") _PlayerEnableSprint(PlayerID, false) PTable.WA = true for i in PTable.weapons do _PlayerGiveSWEP(PlayerID, "weapons/pinnacle/"..autoswep.weapons[PTable.weapons[i][1]].name..".lua") id = _PlayerGetActiveWeapon(PlayerID) _SWEPRunString(id, "DAMAGEbonus = "..PTable.weapons[i][2]) _SWEPRunString(id, "ROFbonus = "..PTable.weapons[i][3]) _SWEPRunString(id, "ACCURACYbonus = "..PTable.weapons[i][4]) _SWEPRunString(id, "CLIPbonus = "..PTable.weapons[i][5]) _SWEPRunString(id, "reloadSWEPSettings()") _SWEPRunString(id, "") _Msg("Weapon "..autoswep.weapons[PTable.weapons[i][1]].name.." : "..PTable.weapons[i][2].." "..PTable.weapons[i][3].." "..PTable.weapons[i][4].." "..PTable.weapons[i][5].."\n") end PTable.WA = false PTable.spawning = false end end function pi.hooks.NPCKilled (PlayerID, NPCID) end function pi.hooks.PropBreak (AttackerID, VictimID) end function pi.hooks.TakeDamage (VictimID, ObjectID, AttackerID, damage) end function pi.hooks.KeyPressed (PlayerID, key) end function pi.hooks.KeyReleased (PlayerID, key) end function pi.hooks.PlayerUseEntity (PlayerID, TargetID) end function pi.hooks.F1 (PlayerID) end function pi.hooks.F2 (PlayerID) end function pi.hooks.F3 (PlayerID) end function pi.hooks.F4 (PlayerID) end function pi.hooks.GravGunPunt (PlayerID, TargetID) end function pi.hooks.GravGunPickup (PlayerID, TargetID) end function pi.hooks.GravGunLaunch (PlayerID, TargetID) end function pi.hooks.GravGunDrop (PlayerID, TargetID) end function pi.hooks.PhysPickup (PlayerID, TargetID) end function pi.hooks.PhysFreeze (PlayerID, TargetID) end function pi.hooks.PhysDrop (PlayerID, TargetID) end function pi.hooks.PlayerConnect (N, A, SteamID) end function pi.hooks.PlayerActive (N, PlayerID, SteamID) end function pi.hooks.PlayerDisconnect (N, PlayerID, A, SteamID, R) pi.players.SaveData (PlayerID) end function pi.hooks.PlayerInitialSpawn (PlayerID) pi.players.LoadData (PlayerID) if pi.players.data[SteamID] == nil then pi.players.ResetPlayer (PlayerID) end AddTimer(0.02, 1, pi.gui.KillAndShowMenu, PlayerID) AddTimer(0.02, 1, pi.gui.ShowHelp, PlayerID) end function pi.hooks.PlayerSpawn (PlayerID) end function pi.hooks.PlayerNameChange (PlayerID, NN, ON) end function eventPlayerSay (PlayerID, C, T) return pi.hooks.PlayerSay(PlayerID, C, T) end function pi.hooks.PlayerSay (PlayerID, C, T) return C end function pi.hooks.PlayerHurt (VictimID, H, AttackerID) end function pi.hooks.PlayerKilled (VictimID, AttackerID, weapon) VictimSteamID = pi.players.GetSteamID(VictimID) if AttackerID ~= 0 and AttackerID <= _MaxPlayers() then AttackerSteamID = pi.players.GetSteamID(AttackerID) if VictimID ~= AttackerID then profit = pi.players.ProfitValue(AttackerID, pi.KillMoney * (pi.players.CalculateNetworth(VictimID) / pi.players.CalculateNetworth(AttackerID))) if _player.LastHitGroup(VictimID) == HITGROUP_HEAD then profit = profit * pi.HeadshotMultiplier end pi.players.data[AttackerSteamID].cash = pi.players.data[AttackerSteamID].cash + profit pi.gui.ShowCash(AttackerID) pi.players.SaveData(AttackerID) end end local VictimPTable = pi.players.data[VictimSteamID] VictimPTable.alive = false AddTimer(2, 1, pi.gui.KillAndShowMenu, VictimID) end ------------------------------------------- pi.timers = {} function pi.timers.SecondPassed () for k,l in gmx.allPlayers() do _PlayerSetSprint(l, false) SteamID = pi.players.GetSteamID(l) PTable = pi.players.data[SteamID] local health = _PlayerInfo(l, "health") _PlayerSetHealth(l, health + PTable.attributes.healthregen) if(_PlayerInfo(l, "health") > PTable.attributes.health) then _PlayerSetHealth(l, _PlayerInfo(l, "health") - 20) if(PTable.attributes.health > _PlayerInfo(l, "health")) then _PlayerSetHealth(l, PTable.attributes.health) end end local armour = _PlayerInfo(l, "armor") _PlayerSetArmor(l, armour + PTable.attributes.armourregen) if(_PlayerInfo(l, "armor") > PTable.attributes.armour) then _PlayerSetArmor(l, _PlayerInfo(l, "armor") - 20) if(PTable.attributes.armour > _PlayerInfo(l, "armor")) then _PlayerSetArmor(l, PTable.attributes.armour) end end end end function pi.timers.QuarterPassed () for k,l in gmx.allPlayers() do SteamID = pi.players.GetSteamID(l) PTable = pi.players.data[SteamID] _TraceLine(_PlayerGetShootPos(l),_PlayerGetShootAng(l),60,l) if _EntGetName(_TraceGetEnt()) == "hackpoint" then PTable.hacking = true else PTable.hacking = false end if PTable.hacking then if PTable.hackstats == nil then PTable.hackstats = {} PTable.hackstats.code = {math.random(1,9),math.random(1,9),math.random(1,9),math.random(1,9),math.random(1,9),math.random(1,9)} PTable.hackstats.enteredcode = {0,0,0,0,0,0} else CT = PTable.hackstats.enteredcode C = PTable.hackstats.code local W = false for i in CT do if CT[i] ~= C[i] then CT[i] = math.random(1,9) W = true break end end if not W then profit = math.floor((pi.HackMoney * pi.players.count()) * PTable.attributes.hack) PTable.cash = math.floor(PTable.cash + profit) pi.gui.ShowCash(l) gmx.makeText("hack3",l,"TargetID","($"..profit..")",-1024,480,gmx.color4(200,200,200,200),0,0,2,0) PTable.hackstats = {} PTable.hackstats.code = {math.random(1,9),math.random(1,9),math.random(1,9),math.random(1,9),math.random(1,9),math.random(1,9)} PTable.hackstats.enteredcode = {0,0,0,0,0,0} end end gmx.makeText("hack1",l,"TargetID","HACKING . . .",-1024,400,gmx.color4(200,200,200,200),0,0,0.2,0) gmx.makeText("hack2",l,"TargetID",CT[1]..""..CT[2]..""..CT[3]..""..CT[4]..""..CT[5]..""..CT[6],-1024,440,gmx.color4(200,200,200,200),0,0,0.2,0) gmx.makeRect("hack1",l,"gmod/white",425,380,175,140,gmx.color4(0,0,0,200),0,0,0.2,0) else if PTable.hackstats ~= nil then PTable.hackstats = nil end end end end function canPlayerHaveItem (PlayerID, item) return pi.hooks.PlayerHaveItem(PlayerID, item) end function pi.hooks.PlayerHaveItem(PlayerID, item) SteamID = pi.players.GetSteamID(PlayerID) PTable = pi.players.data[SteamID] return PTable.WA end