public static string GetLocalName() {
return PS3.Extension.ReadString(0x26C067F);
}
public static void SetName(string Name) {
PS3.Extension.WriteString(0x026C0658, Name);
PS3.Extension.WriteString(0x026c067f, Name);
}
public static uint[] XP = new uint[] {
800, 1900, 3300, 5300,
7900, 11100, 14900, 19300,
24300, 30100, 36700, 44100,
52300, 61300, 71100, 81700,
93100, 105300, 118300, 132100,
146700, 162100, 178300, 195300,
213100, 231700, 251100, 271300,
292300, 314100, 337100, 361300,
386700, 413300, 441100, 470100,
500300, 531700, 564300, 598100,
633100, 669300, 706700, 745300,
785100, 826100, 868300, 911700,
958300, 1002100, 1049100, 1097300,
1146700, 1249100
};
public static void SetXP(int Level) {
byte[] i = BitConverter.GetBytes(Convert.ToInt32(XP[Level - 2]));
if (Level <= 55)
PS3.Extension.WriteBytes(0x26FD02C, i);
else
Console.Write("Value is greater than 55");
}
uint BG_GetWeaponDef(int WeaponIndex = 1) {
return (uint)RPC.Call(0x607098, WeaponIndex);
} //0x607098 - BG_GetWeaponDef
int GetCurrentWeapon(int Client = 0) {
return PS3.Extension.ReadInt32(0x1780F28 + 0x5808 * (uint)Client + 0x1B;
} //0x1780F28 + 0x1B8 - playerstate + get weapon in view
void RapidFire(int Client = 0) {
PS3.SetMemory(BG_GetWeaponDef(GetCurrentWeapon(Client)) + 0x33, new byte[] { 0x07 });
}//Example: RapidFire(0);
public static void Wallhack() {
if (PS3.Extension.ReadByte(0x1CBF9F != 0) {
PS3.SetMemory(0x1CBF9F8, new byte[] { 0x00 }); //r_dof_enabled
PS3.SetMemory(0x000834D0, new byte[] { 0x38, 0xC0, 0xFF, 0xFF }); //wallhack
}
else {
PS3.SetMemory(0x1CBF9F8, new byte[] { 0x01 }); //r_dof_enabled
PS3.SetMemory(0x000834D0, new byte[] { 0x63, 0x26, 0x00, 0x00 }); //wallhack
}
}
public static void ClonePlayer(uint Client)
{
PS3.SetMemory(0x001F6564, new byte[] { 0x38, 0x60, 0x00, 0x00 });
PS3.Extension.WriteInt16(0x001F6564 + 2, (short)Client);
RPC.Call(0x01F6528, Client);
}
public static void Subject(string Subject) {
PS3.Extension.WriteString(0x30933206, Subject);
}
public static void Message(string Message) {
PS3.Extension.WriteString(0x30933223, Message);
}
public static void EndProbation() {
PS3.SetMemory(0x097047C, new byte[] { 0x00 });
}
public static void cbuf_addtext(string Command)
{
RPC.Call(0x313E88, 0, Command);
}
public static void UnlimitedTCL() {
cbuf_addtext("gametype_setting timelimit 0");
cbuf_addtext("gametype_setting scorelimit 0");
cbuf_addtext("gametype_setting playerNumlives 0");
}
enum Medals
{
Afterlife = 0x026FCCCA,
Aggression = 0x026FCCE8,
Assisted_Suicide = 0x026FCB92,
Avenger = 0x026FCCEE,
Backfire = 0x026FCD06,
Back_Stabber = 0x026FCB98,
Bait_Taken = 0x026FCCFA,
Bankrupted = 0x026FCD2A,
Bankshot = 0x026FCBAA,
Big_Game_Hunter = 0x026FCBFE,
Blackout = 0x026FCC46,
Bloodthirsty = 0x026FCD6C,
Bomber = 0x026FCBA4,
Boomstick = 0x026FCDDE,
Bouncer = 0x026FCB8C,
Brutal = 0x026FCD60,
Bullseye = 0x026FCD9C,
Burn_Out = 0x026FCC04,
Buzz_Kill = 0x026FCEB0,
Chopped_Up = 0x026FCC88,
Clean_Up = 0x026FCCBE,
Close_Call = 0x026FCC76,
Clutch_HQ = 0x026FCBD4,
Clutch_SND = 0x026FCBE0,
Combo_Breaker = 0x026FCD36,
Comeback = 0x026FCBBC,
Cooked = 0x026FCD96,
Crackdown = 0x026FCE20,
Cropduster = 0x026FCEB6,
Deadeye = 0x026FCBC8,
Death_From_Above = 0x026FCCA0,
Decimated = 0x026FCBCE,
Demolished = 0x026FCBF8,
Denied_Bomb = 0x026FCD3C,
Denied_Flag = 0x026FCD48,
Distant_Thunder = 0x026FCE0E,
Double_Down = 0x026FCECE,
Double_Kill = 0x026FCDAE,
Drone_Hunter = 0x026FCBE6,
Dropshot = 0x026FCCDC,
Efficiency = 0x026FCCC4,
Elimination_OITC = 0x026FCC52,
Elimination_SND = 0x026FCC58,
Exterminator = 0x026FCC10,
Falling_Skies = 0x026FCDA2,
First_Blood = 0x026FCC6A,
Flyswatter = 0x026FCC1C,
Forward_Position = 0x026FCDFC,
Frenzy_Kill = 0x026FCDC0,
Frugal = 0x026FCD7E,
Fury_Kill = 0x026FCDBA,
Fuzzbuster = 0x026FCBEC,
Gun_Expert = 0x026FCDA8,
Gunslinger = 0x026FCD1E,
Hacked = 0x026FCC82,
Hardpoint_Secure = 0x026FCD84,
Headshot = 0x026FCC8E,
Hero = 0x026FCBDA,
Hijacker = 0x026FCBB0,
Hogtied = 0x026FCC3A,
Humiliation = 0x026FCCB8,
Intercepted = 0x026FCC28,
Kaboom = 0x026FCE02,
Kill_Chain = 0x026FCDD8,
Last_Man_Standing = 0x026FCC5E,
Long_Shot = 0x026FCD8A,
Mega_Kill = 0x026FCDCC,
Merciless = 0x026FCD4E,
No_Tip = 0x026FCC40,
Nuclear = 0x026FCD66,
One_Shot_One_Kill = 0x026FCCD6,
Opening_Move = 0x026FCDE4,
Pancake = 0x026FCCF4,
Playmaker = 0x026FCC70,
Quad_Feed = 0x026FCEC2,
Raining_Death = 0x026FCE08,
Red_Baron = 0x026FCDF6,
Regicide_GG = 0x026FCD78,
Regicide_SAS = 0x026FCD24,
Rejected = 0x026FCC0A,
Relentless = 0x026FCD5A,
Retrieved = 0x026FCE14,
Revenge = 0x026FCE1A,
Road_Rage = 0x026FCC22,
Ruthless = 0x026FCD54,
Savior = 0x026FCCD0,
Scrapped = 0x026FCC34,
Secure_D = 0x026FCDF0,
Secure_HQ = 0x026FCCAC,
Shadow_Catcher = 0x026FCBF2,
Shared_AGR = 0x026FCE26,
Shared_Counter_UAV = 0x026FCE32,
Shared_Death_Machine = 0x026FCE38,
Shared_Dragon_Fire = 0x026FCE7A,
Shared_EMP_Systems = 0x026FCE44,
Shared_Escort_Drone = 0x026FCE50,
Shared_Guardian = 0x026FCE5C,
Shared_Hellstorm_Missile = 0x026FCE86,
Shared_Hunter_Killer = 0x026FCE62,
Shared_K9_Unit = 0x026FCE3E,
Shared_Lightning_Strike = 0x026FCE74,
Shared_Lodestar = 0x026FCE8C,
Shared_Orbital_VSAT = 0x026FCE92,
Shared_RCXD = 0x026FCE80,
Shared_Sentry_Gun = 0x026FCE98,
Shared_Stealth_Chopper = 0x026FCE4A,
Shared_Swarm = 0x026FCE68,
Shared_UAV = 0x026FCEA4,
Shared_VTOL_Warship = 0x026FCE56,
Shared_War_Machine = 0x026FCE6E,
Shared_Warthog = 0x026FCE9E,
Shield_Bash = 0x026FCD90,
Silent_Killer = 0x026FCC94,
Skewered = 0x026FCB9E,
Stick = 0x026FCEAA,
Strength_and_Honor = 0x026FCBC2,
Strike_Delivered = 0x026FCDEA,
Super_Kill = 0x026FCDC6,
Survivor = 0x026FCCE2,
Switch_Hitter = 0x026FCD30,
Takedown_Bomb = 0x026FCD42,
Takedown_Flag = 0x026FCD0C,
TKO = 0x026FCC16,
Triple_Kill = 0x026FCDB4,
Ultra_Kill = 0x026FCDD2,
Underdog = 0x026FCD00,
Unstoppable = 0x026FCD72,
Uppercut = 0x026FCC2E,
Victor = 0x026FCEC8,
Warbeast = 0x026FCC4C,
Wingman = 0x026FCC9A,
Wipeout = 0x026FCBB6,
}
public static void G_SetOrigin(int gentity, float[] Origin) {
RPC.Call(0x279698, gentity, Origin); //G_SetOrigin
}
public static void G_SetAngles(int gentity, float[] Angles) {
RPC.Call(0x279D78, gentity, Angles); //G_SetAngles
}
public static void G_FreeEntity(int gentity){
RPC.Call(0x279140, gentity);
}
public static void Scr_PlayFX(float[] Origin, int FX) {
uint i = (uint)RPC.Call(0x279740, Origin, 86); //G_TempEntity
PS3.Extension.WriteInt32(i + 0xD4, FX);
} //Thanks to Shark for his Ghosts Scr_PlayFX, which I was able to port to Black Ops 2
public static int G_EffectIndex(string FX) {
return RPC.Call(0x0276978, FX);
}
public static uint G_SpawnHelicopter(uint Owner, string Type, string Model, float[] Origin, float[] Angles) {
uint Entity = (uint)RPC.Call(0x278C60); //G_Spawn
Lib.WriteSingle(Entity + 0x134, Origin);
Lib.WriteSingle(Entity + 0x140, Angles);
RPC.Call(0x22C558, Entity, Owner, Type, Model); //G_SpawnHelicopter
return Entity;
}
public static void KickClient(int Client, string Reason) {
RPC.SV_GameSendServerCommand(Client, "5 \"\n" + Reason + "\"");
}
public static void SV_GameSendServerCommand(int Client, string Command) {
RPC.Call(0x34A1DC, Client, 1, Command);
}
public static void CBuf_Addtext(string Command) {
RPC.Call(0x313E88, 0, Command);
}
public static int G_GetWeaponIndexForName(string Weapon) {
return RPC.Call(0x2A6BE8, Weapon);
}
public static void G_GivePlayerWeapon(int Client, int Weapon) {
RPC.Call(0x2A8364, 0x1780F28 + 0x5808 * (uint)Client, Weapon, 0);
}
public static void G_GivePlayerWeapon(int Client, string Weapon) {
int WepNum = G_GetWeaponIndexForName(Weapon);
RPC.Call(0x2A8364, 0x1780F28 + 0x5808 * (uint)Client, WepNum, 0);
}
public static int GetHeldWeapon(int Client) {
return Lib.ReadByte(0x17810E0 + 0x5808 * (uint)Client);
}
public static void G_InitalizeAmmo(int Client) {
RPC.Call(0x1E6838, 0x16B9F20 + 0x31C * (uint)Client);
}
public static void Add_Ammo(int Client, int Ammo) {
RPC.Call(0x208B48, 0x16B9F20 + 0x31C * (uint)Client, GetHeldWeapon(Client), Ammo, Ammo, Ammo, Ammo);
}
public static void G_SetModel(int Client, string Model) {
RPC.Call(Offsets.G_SetModel, 0x16B9F20 + 0x31C * (uint)Client, Model);
}
public static bool IsClientSameTeam(int Client, int otherPlayer) {
if (Lib.ReadByte(0x178642C + 0x5808 * (uint)Client) == Lib.ReadByte(0x178642C + 0x5808 * (uint)Client))
return true;
else
return false;
}
public static bool IsClientAlive(int Client) {
if (Lib.ReadByte(0x17864F8 + 0x5808 * (uint)Client) == 1)
return true;
else
return false;
}
public static void RandomCamo(int Client) {
Random rand = new Random();
int Camo = rand.Next(0, 43);
PS3.SetMemory(0x01781203 + 0x5808 * (uint)Client, new byte[] { (byte)Camo });
PS3.SetMemory(0x017811e7 + 0x5808 * (uint)Client, new byte[] { (byte)Camo });
}
static Thread[] JetpackThread = new Thread[18];
static bool[] JetpackBool = new bool[18];
public static void DoJetpack(int Client) {
if (!JetpackBool[Client]) {
JetpackThread[Client] = new Thread(() => Jetpack(Client));
JetpackThread[Client].Start();
JetpackBool[Client] = true;
}
else {
JetpackThread[Client].Abort();
JetpackBool[Client] = false;
}
}
private static void Jetpack(int Client) {
PS3.Reconnect();
for(; {
float num = Lib.ReadSingle(0x1780F28 + 0x28 + 8 + 0x5808 * (uint)Client);
if (PS3.Extension.ReadInt32(0x1780F28 + 0x569C + 0x5808 * (uint)Client) == 2097152) {
Lib.WriteSingle(0x1780F28 + 0x28 + 8 + 0x5808 * (uint)Client, num + 3);
}
}
}
public static void SpawnEntity(string Model, float[] Origin, float[] Angles) {
uint gentitys = (uint)RPC.Call(0x278C60);
Lib.WriteSingle(gentitys + 0x134, Origin);
Lib.WriteSingle(gentitys + 0x140, Angles);
RPC.Call(0x277644, gentitys, Model);
RPC.Call(0x2670E8, gentitys);
}
public static void setViewAngles(int Client, float[] Angles) {
Lib.WriteSingle(0x10040000, Angles);
RPC.Call(0x1E1D90, 0x16B9F20 + 0x31C * (uint)Client, 0x10040000);
}
public static float[] getViewAngles(int Client) {
return Lib.ReadSingle(0x1780F28 + 0x56BC + 0x5808 * (uint)Client, 3);
}
public static bool[] SpinningModeActive = new bool[18];
private static Thread[] SpinningModeThread = new Thread[18];
public static void InitSpinningMode(int Client)
{
if (!SpinningModeActive[Client])
{
SpinningModeActive[Client] = true;
SpinningModeThread[Client] = new Thread(() => SpinningMode(Client));
SpinningModeThread[Client].Start();
SpinningModeActive[Client] = true;
RPC.iPrintln(Client, "Spinning Mode: ^2On");
}
else
{
SpinningModeActive[Client] = false;
SpinningModeThread[Client].Abort();
RPC.iPrintln(Client, "Spinning Mode: ^1Off");
}
}
private static void SpinningMode(int Client) {
PS3.Reconnect();
for (; ; ) {
Single[] Angles = getViewAngles(Client);
Angles[1] += 15;
setViewAngles(Client, Angles);
System.Threading.Thread.Sleep(100);
}
}
public static int GetPlayerSize() {
int Num = 0;
for (int i = 0; i < 18; i++)
if (Lib.ReadByte(0x1780F28 + 0x5808 * (uint)i) != 0)
Num++;
return Num;
}
public static string GetClientName(int Client) {
string players = Lib.ReadString(0x1780F28 + 0x5544 + 0x5808 * (uint)Client);
if (players == "")
return "Not Connected";
else
return players;
}
public static int GetHostNumber() {
int Num = 0;
string localname = Lib.ReadString(0x26C067F);
for (int i = 0; i < GetNumPlayers(); i++)
if (GetClientName(i) == localname)
Num = i;
return Num;
}
public static float[] getViewAngles(int Client) {
return Lib.ReadSingle(0x1780F28 + 0x56BC + 0x5808 * (uint)Client, 3);
}
public static void setViewAngles(int Client, float[] Angles) {
Lib.WriteSingle(0x10040000, Angles);
RPC.Call(0x1E1D90, 0x16B9F20 + 0x31C * (uint)Client, 0x10040000);
}
SetDefaultModel(player) {
cWeapon = player GetCurrentWeapon();
if (cWeapon != "none") {
player maps\mp\teams\_teams::set_player_model(self.team, cWeapon);
}
}
SetDefaultModel(self);
SpawnBot(team)
{
wait 1;
self thread maps\mp\bots\_bot::spawn_bot(team);
}
Spawning a bot if you don't care what team: SpawnBot("autoassign");
Spawning a bot on the enemy team: SpawnBot("axis");
Spawning a bot on your team: SpawnBot("allies");
jumpButtonPressed() - X
stanceButtonPressed() - Circle
changeSeatButtonPressed() - Triangle
useButtonPressed() - Square
adsButtonPressed() - L1
attackButtonPressed() - R1
throwButtonPressed() - L2
fragButtonPressed() - R2
sprintButtonPressed() - L3
meleeButtonPressed() - R3
actionSlotOneButtonPressed() - Up DPAD
actionSlotTwoButtonPressed() - Down DPAD
actionSlotThreeButtonPressed() - Left DPAD
actionSlotFourButtonPressed() - Right DPAD
if (self jumpButtonPressed())
{
self iPrintln("X was pressed");
}
GodMode()
{
if (self.GodMode == false)
{
self enableInvulnerability();
self iPrintln("God Mode: ^2Enabled");
self.GodMode = true;
}
else if (self.GodMode == true)
{
self disableInvulnerability();
self iPrintln("God Mode: ^1Disabled");
self.GodMode = false;
}
}
self GodMode();
self waittill ("spawned_player"); //Waits until player spawns to execute a function
self waittill ("death"); //Waits until death to execute a function
self waittill ("grenade_pullback"); //Waits until a grenade is thrown to execute a function
self waittill ("sprint_begin"); //Waits until sprint begins to execute a function
self waittill ("begin_firing"); //Waits until weapon is fired to execute a function
self waittill ("weapon_fired"); //Waits until weapon is fired and will execute the function repeatedly
self waitilll ("weapon_change"); //Waits until a weapon swap to execute a function
for (; //creates loop
{
self waittill("spawned_player");
self iPrintln("Player " + self.name + "has spawned");
}
self endon ("death"); //Ends script on death
self endon ("disconnect"); //Ends script when the game ends
self endon ("killed_player"); //Ends script when you kill a player
Loop()
{
self endon("death");
for (; //creates loop
{
self iPrintln("You're not dead.. Yet");
wait 0.1;
}
}
so basically what you'll need to do for this is make a function like
Loop()
{
self endon("This_can_be_Anything");
for (; //creates loop
{
self iPrintln("Example of how to make a condition to end something!");
wait 0.1;
}
}
Now that you've made your function, you basically just have to call
self notify("This_can_be_Anything");
and "Loop()" will end.
(it's really the same concept with waittill)
Loop()
{
self endon("disconnect");
for (; //creates loop
{
self waittill("This_can_be_Anything");
self iPrintln("Example of how to make a condition to end something!");
wait 0.1;
}
}
then to basically use the waittill just do
self notify("This_can_be_Anything");
doAimbot()
{
self endon("disconnect");
if (self.Aimbot == false)
{
self thread Aimbot();
self iPrintln("Aimbot: ^2Enabled");
self.Aimbot = true;
}
else if (self.Aimbot == true)
{
self notify("Aimbot_End");
self iPrintln("Aimbot: ^1Disabled");
self.Aimbot = false;
}
}
Aimbot()
{
self endon("disconnect");
self endon("Aimbot_End");
for (;
{
nPlayer = self maps\mp\gametypes\_battlechatter_mp::get_Closest_Player_Enemy();
if (self adsbuttonpressed())
{
self SetPlayerAngles(VectorToAngles((nPlayer getTagOrigin("j_head")) - (self getTagOrigin("tag_eye"))));
}
}
}
public static string GetLocalName() {
return PS3.Extension.ReadString(0x26C067F);
}
public static void SetName(string Name) {
PS3.Extension.WriteString(0x026C0658, Name);
PS3.Extension.WriteString(0x026c067f, Name);
}
public static uint[] XP = new uint[] {
800, 1900, 3300, 5300,
7900, 11100, 14900, 19300,
24300, 30100, 36700, 44100,
52300, 61300, 71100, 81700,
93100, 105300, 118300, 132100,
146700, 162100, 178300, 195300,
213100, 231700, 251100, 271300,
292300, 314100, 337100, 361300,
386700, 413300, 441100, 470100,
500300, 531700, 564300, 598100,
633100, 669300, 706700, 745300,
785100, 826100, 868300, 911700,
958300, 1002100, 1049100, 1097300,
1146700, 1249100
};
public static void SetXP(int Level) {
byte[] i = BitConverter.GetBytes(Convert.ToInt32(XP[Level - 2]));
if (Level <= 55)
PS3.Extension.WriteBytes(0x26FD02C, i);
else
Console.Write("Value is greater than 55");
}
uint BG_GetWeaponDef(int WeaponIndex = 1) {
return (uint)RPC.Call(0x607098, WeaponIndex);
} //0x607098 - BG_GetWeaponDef
int GetCurrentWeapon(int Client = 0) {
return PS3.Extension.ReadInt32(0x1780F28 + 0x5808 * (uint)Client + 0x1B;
} //0x1780F28 + 0x1B8 - playerstate + get weapon in view
void RapidFire(int Client = 0) {
PS3.SetMemory(BG_GetWeaponDef(GetCurrentWeapon(Client)) + 0x33, new byte[] { 0x07 });
}//Example: RapidFire(0);
public static void Wallhack() {
if (PS3.Extension.ReadByte(0x1CBF9F != 0) {
PS3.SetMemory(0x1CBF9F8, new byte[] { 0x00 }); //r_dof_enabled
PS3.SetMemory(0x000834D0, new byte[] { 0x38, 0xC0, 0xFF, 0xFF }); //wallhack
}
else {
PS3.SetMemory(0x1CBF9F8, new byte[] { 0x01 }); //r_dof_enabled
PS3.SetMemory(0x000834D0, new byte[] { 0x63, 0x26, 0x00, 0x00 }); //wallhack
}
}
public static void ClonePlayer(uint Client)
{
PS3.SetMemory(0x001F6564, new byte[] { 0x38, 0x60, 0x00, 0x00 });
PS3.Extension.WriteInt16(0x001F6564 + 2, (short)Client);
RPC.Call(0x01F6528, Client);
}
public static void Subject(string Subject) {
PS3.Extension.WriteString(0x30933206, Subject);
}
public static void Message(string Message) {
PS3.Extension.WriteString(0x30933223, Message);
}
public static void EndProbation() {
PS3.SetMemory(0x097047C, new byte[] { 0x00 });
}
public static void cbuf_addtext(string Command)
{
RPC.Call(0x313E88, 0, Command);
}
public static void UnlimitedTCL() {
cbuf_addtext("gametype_setting timelimit 0");
cbuf_addtext("gametype_setting scorelimit 0");
cbuf_addtext("gametype_setting playerNumlives 0");
}
enum Medals
{
Afterlife = 0x026FCCCA,
Aggression = 0x026FCCE8,
Assisted_Suicide = 0x026FCB92,
Avenger = 0x026FCCEE,
Backfire = 0x026FCD06,
Back_Stabber = 0x026FCB98,
Bait_Taken = 0x026FCCFA,
Bankrupted = 0x026FCD2A,
Bankshot = 0x026FCBAA,
Big_Game_Hunter = 0x026FCBFE,
Blackout = 0x026FCC46,
Bloodthirsty = 0x026FCD6C,
Bomber = 0x026FCBA4,
Boomstick = 0x026FCDDE,
Bouncer = 0x026FCB8C,
Brutal = 0x026FCD60,
Bullseye = 0x026FCD9C,
Burn_Out = 0x026FCC04,
Buzz_Kill = 0x026FCEB0,
Chopped_Up = 0x026FCC88,
Clean_Up = 0x026FCCBE,
Close_Call = 0x026FCC76,
Clutch_HQ = 0x026FCBD4,
Clutch_SND = 0x026FCBE0,
Combo_Breaker = 0x026FCD36,
Comeback = 0x026FCBBC,
Cooked = 0x026FCD96,
Crackdown = 0x026FCE20,
Cropduster = 0x026FCEB6,
Deadeye = 0x026FCBC8,
Death_From_Above = 0x026FCCA0,
Decimated = 0x026FCBCE,
Demolished = 0x026FCBF8,
Denied_Bomb = 0x026FCD3C,
Denied_Flag = 0x026FCD48,
Distant_Thunder = 0x026FCE0E,
Double_Down = 0x026FCECE,
Double_Kill = 0x026FCDAE,
Drone_Hunter = 0x026FCBE6,
Dropshot = 0x026FCCDC,
Efficiency = 0x026FCCC4,
Elimination_OITC = 0x026FCC52,
Elimination_SND = 0x026FCC58,
Exterminator = 0x026FCC10,
Falling_Skies = 0x026FCDA2,
First_Blood = 0x026FCC6A,
Flyswatter = 0x026FCC1C,
Forward_Position = 0x026FCDFC,
Frenzy_Kill = 0x026FCDC0,
Frugal = 0x026FCD7E,
Fury_Kill = 0x026FCDBA,
Fuzzbuster = 0x026FCBEC,
Gun_Expert = 0x026FCDA8,
Gunslinger = 0x026FCD1E,
Hacked = 0x026FCC82,
Hardpoint_Secure = 0x026FCD84,
Headshot = 0x026FCC8E,
Hero = 0x026FCBDA,
Hijacker = 0x026FCBB0,
Hogtied = 0x026FCC3A,
Humiliation = 0x026FCCB8,
Intercepted = 0x026FCC28,
Kaboom = 0x026FCE02,
Kill_Chain = 0x026FCDD8,
Last_Man_Standing = 0x026FCC5E,
Long_Shot = 0x026FCD8A,
Mega_Kill = 0x026FCDCC,
Merciless = 0x026FCD4E,
No_Tip = 0x026FCC40,
Nuclear = 0x026FCD66,
One_Shot_One_Kill = 0x026FCCD6,
Opening_Move = 0x026FCDE4,
Pancake = 0x026FCCF4,
Playmaker = 0x026FCC70,
Quad_Feed = 0x026FCEC2,
Raining_Death = 0x026FCE08,
Red_Baron = 0x026FCDF6,
Regicide_GG = 0x026FCD78,
Regicide_SAS = 0x026FCD24,
Rejected = 0x026FCC0A,
Relentless = 0x026FCD5A,
Retrieved = 0x026FCE14,
Revenge = 0x026FCE1A,
Road_Rage = 0x026FCC22,
Ruthless = 0x026FCD54,
Savior = 0x026FCCD0,
Scrapped = 0x026FCC34,
Secure_D = 0x026FCDF0,
Secure_HQ = 0x026FCCAC,
Shadow_Catcher = 0x026FCBF2,
Shared_AGR = 0x026FCE26,
Shared_Counter_UAV = 0x026FCE32,
Shared_Death_Machine = 0x026FCE38,
Shared_Dragon_Fire = 0x026FCE7A,
Shared_EMP_Systems = 0x026FCE44,
Shared_Escort_Drone = 0x026FCE50,
Shared_Guardian = 0x026FCE5C,
Shared_Hellstorm_Missile = 0x026FCE86,
Shared_Hunter_Killer = 0x026FCE62,
Shared_K9_Unit = 0x026FCE3E,
Shared_Lightning_Strike = 0x026FCE74,
Shared_Lodestar = 0x026FCE8C,
Shared_Orbital_VSAT = 0x026FCE92,
Shared_RCXD = 0x026FCE80,
Shared_Sentry_Gun = 0x026FCE98,
Shared_Stealth_Chopper = 0x026FCE4A,
Shared_Swarm = 0x026FCE68,
Shared_UAV = 0x026FCEA4,
Shared_VTOL_Warship = 0x026FCE56,
Shared_War_Machine = 0x026FCE6E,
Shared_Warthog = 0x026FCE9E,
Shield_Bash = 0x026FCD90,
Silent_Killer = 0x026FCC94,
Skewered = 0x026FCB9E,
Stick = 0x026FCEAA,
Strength_and_Honor = 0x026FCBC2,
Strike_Delivered = 0x026FCDEA,
Super_Kill = 0x026FCDC6,
Survivor = 0x026FCCE2,
Switch_Hitter = 0x026FCD30,
Takedown_Bomb = 0x026FCD42,
Takedown_Flag = 0x026FCD0C,
TKO = 0x026FCC16,
Triple_Kill = 0x026FCDB4,
Ultra_Kill = 0x026FCDD2,
Underdog = 0x026FCD00,
Unstoppable = 0x026FCD72,
Uppercut = 0x026FCC2E,
Victor = 0x026FCEC8,
Warbeast = 0x026FCC4C,
Wingman = 0x026FCC9A,
Wipeout = 0x026FCBB6,
}
public static void G_SetOrigin(int gentity, float[] Origin) {
RPC.Call(0x279698, gentity, Origin); //G_SetOrigin
}
public static void G_SetAngles(int gentity, float[] Angles) {
RPC.Call(0x279D78, gentity, Angles); //G_SetAngles
}
public static void G_FreeEntity(int gentity){
RPC.Call(0x279140, gentity);
}
public static void Scr_PlayFX(float[] Origin, int FX) {
uint i = (uint)RPC.Call(0x279740, Origin, 86); //G_TempEntity
PS3.Extension.WriteInt32(i + 0xD4, FX);
} //Thanks to Shark for his Ghosts Scr_PlayFX, which I was able to port to Black Ops 2
public static int G_EffectIndex(string FX) {
return RPC.Call(0x0276978, FX);
}
public static uint G_SpawnHelicopter(uint Owner, string Type, string Model, float[] Origin, float[] Angles) {
uint Entity = (uint)RPC.Call(0x278C60); //G_Spawn
Lib.WriteSingle(Entity + 0x134, Origin);
Lib.WriteSingle(Entity + 0x140, Angles);
RPC.Call(0x22C558, Entity, Owner, Type, Model); //G_SpawnHelicopter
return Entity;
}
public static void KickClient(int Client, string Reason) {
RPC.SV_GameSendServerCommand(Client, "5 \"\n" + Reason + "\"");
}
public static void SV_GameSendServerCommand(int Client, string Command) {
RPC.Call(0x34A1DC, Client, 1, Command);
}
public static void CBuf_Addtext(string Command) {
RPC.Call(0x313E88, 0, Command);
}
public static int G_GetWeaponIndexForName(string Weapon) {
return RPC.Call(0x2A6BE8, Weapon);
}
public static void G_GivePlayerWeapon(int Client, int Weapon) {
RPC.Call(0x2A8364, 0x1780F28 + 0x5808 * (uint)Client, Weapon, 0);
}
public static void G_GivePlayerWeapon(int Client, string Weapon) {
int WepNum = G_GetWeaponIndexForName(Weapon);
RPC.Call(0x2A8364, 0x1780F28 + 0x5808 * (uint)Client, WepNum, 0);
}
public static int GetHeldWeapon(int Client) {
return Lib.ReadByte(0x17810E0 + 0x5808 * (uint)Client);
}
public static void G_InitalizeAmmo(int Client) {
RPC.Call(0x1E6838, 0x16B9F20 + 0x31C * (uint)Client);
}
public static void Add_Ammo(int Client, int Ammo) {
RPC.Call(0x208B48, 0x16B9F20 + 0x31C * (uint)Client, GetHeldWeapon(Client), Ammo, Ammo, Ammo, Ammo);
}
public static void G_SetModel(int Client, string Model) {
RPC.Call(Offsets.G_SetModel, 0x16B9F20 + 0x31C * (uint)Client, Model);
}
public static bool IsClientSameTeam(int Client, int otherPlayer) {
if (Lib.ReadByte(0x178642C + 0x5808 * (uint)Client) == Lib.ReadByte(0x178642C + 0x5808 * (uint)Client))
return true;
else
return false;
}
public static bool IsClientAlive(int Client) {
if (Lib.ReadByte(0x17864F8 + 0x5808 * (uint)Client) == 1)
return true;
else
return false;
}
public static void RandomCamo(int Client) {
Random rand = new Random();
int Camo = rand.Next(0, 43);
PS3.SetMemory(0x01781203 + 0x5808 * (uint)Client, new byte[] { (byte)Camo });
PS3.SetMemory(0x017811e7 + 0x5808 * (uint)Client, new byte[] { (byte)Camo });
}
static Thread[] JetpackThread = new Thread[18];
static bool[] JetpackBool = new bool[18];
public static void DoJetpack(int Client) {
if (!JetpackBool[Client]) {
JetpackThread[Client] = new Thread(() => Jetpack(Client));
JetpackThread[Client].Start();
JetpackBool[Client] = true;
}
else {
JetpackThread[Client].Abort();
JetpackBool[Client] = false;
}
}
private static void Jetpack(int Client) {
PS3.Reconnect();
for(; {
float num = Lib.ReadSingle(0x1780F28 + 0x28 + 8 + 0x5808 * (uint)Client);
if (PS3.Extension.ReadInt32(0x1780F28 + 0x569C + 0x5808 * (uint)Client) == 2097152) {
Lib.WriteSingle(0x1780F28 + 0x28 + 8 + 0x5808 * (uint)Client, num + 3);
}
}
}
public static void SpawnEntity(string Model, float[] Origin, float[] Angles) {
uint gentitys = (uint)RPC.Call(0x278C60);
Lib.WriteSingle(gentitys + 0x134, Origin);
Lib.WriteSingle(gentitys + 0x140, Angles);
RPC.Call(0x277644, gentitys, Model);
RPC.Call(0x2670E8, gentitys);
}
public static void setViewAngles(int Client, float[] Angles) {
Lib.WriteSingle(0x10040000, Angles);
RPC.Call(0x1E1D90, 0x16B9F20 + 0x31C * (uint)Client, 0x10040000);
}
public static float[] getViewAngles(int Client) {
return Lib.ReadSingle(0x1780F28 + 0x56BC + 0x5808 * (uint)Client, 3);
}
public static bool[] SpinningModeActive = new bool[18];
private static Thread[] SpinningModeThread = new Thread[18];
public static void InitSpinningMode(int Client)
{
if (!SpinningModeActive[Client])
{
SpinningModeActive[Client] = true;
SpinningModeThread[Client] = new Thread(() => SpinningMode(Client));
SpinningModeThread[Client].Start();
SpinningModeActive[Client] = true;
RPC.iPrintln(Client, "Spinning Mode: ^2On");
}
else
{
SpinningModeActive[Client] = false;
SpinningModeThread[Client].Abort();
RPC.iPrintln(Client, "Spinning Mode: ^1Off");
}
}
private static void SpinningMode(int Client) {
PS3.Reconnect();
for (; ; ) {
Single[] Angles = getViewAngles(Client);
Angles[1] += 15;
setViewAngles(Client, Angles);
System.Threading.Thread.Sleep(100);
}
}
public static int GetPlayerSize() {
int Num = 0;
for (int i = 0; i < 18; i++)
if (Lib.ReadByte(0x1780F28 + 0x5808 * (uint)i) != 0)
Num++;
return Num;
}
public static string GetClientName(int Client) {
string players = Lib.ReadString(0x1780F28 + 0x5544 + 0x5808 * (uint)Client);
if (players == "")
return "Not Connected";
else
return players;
}
public static int GetHostNumber() {
int Num = 0;
string localname = Lib.ReadString(0x26C067F);
for (int i = 0; i < GetNumPlayers(); i++)
if (GetClientName(i) == localname)
Num = i;
return Num;
}
public static float[] getViewAngles(int Client) {
return Lib.ReadSingle(0x1780F28 + 0x56BC + 0x5808 * (uint)Client, 3);
}
public static void setViewAngles(int Client, float[] Angles) {
Lib.WriteSingle(0x10040000, Angles);
RPC.Call(0x1E1D90, 0x16B9F20 + 0x31C * (uint)Client, 0x10040000);
}
SetDefaultModel(player) {
cWeapon = player GetCurrentWeapon();
if (cWeapon != "none") {
player maps\mp\teams\_teams::set_player_model(self.team, cWeapon);
}
}
SetDefaultModel(self);
SpawnBot(team)
{
wait 1;
self thread maps\mp\bots\_bot::spawn_bot(team);
}
Spawning a bot if you don't care what team: SpawnBot("autoassign");
Spawning a bot on the enemy team: SpawnBot("axis");
Spawning a bot on your team: SpawnBot("allies");
jumpButtonPressed() - X
stanceButtonPressed() - Circle
changeSeatButtonPressed() - Triangle
useButtonPressed() - Square
adsButtonPressed() - L1
attackButtonPressed() - R1
throwButtonPressed() - L2
fragButtonPressed() - R2
sprintButtonPressed() - L3
meleeButtonPressed() - R3
actionSlotOneButtonPressed() - Up DPAD
actionSlotTwoButtonPressed() - Down DPAD
actionSlotThreeButtonPressed() - Left DPAD
actionSlotFourButtonPressed() - Right DPAD
if (self jumpButtonPressed())
{
self iPrintln("X was pressed");
}
GodMode()
{
if (self.GodMode == false)
{
self enableInvulnerability();
self iPrintln("God Mode: ^2Enabled");
self.GodMode = true;
}
else if (self.GodMode == true)
{
self disableInvulnerability();
self iPrintln("God Mode: ^1Disabled");
self.GodMode = false;
}
}
self GodMode();
self waittill ("spawned_player"); //Waits until player spawns to execute a function
self waittill ("death"); //Waits until death to execute a function
self waittill ("grenade_pullback"); //Waits until a grenade is thrown to execute a function
self waittill ("sprint_begin"); //Waits until sprint begins to execute a function
self waittill ("begin_firing"); //Waits until weapon is fired to execute a function
self waittill ("weapon_fired"); //Waits until weapon is fired and will execute the function repeatedly
self waitilll ("weapon_change"); //Waits until a weapon swap to execute a function
for (; //creates loop
{
self waittill("spawned_player");
self iPrintln("Player " + self.name + "has spawned");
}
self endon ("death"); //Ends script on death
self endon ("disconnect"); //Ends script when the game ends
self endon ("killed_player"); //Ends script when you kill a player
Loop()
{
self endon("death");
for (; //creates loop
{
self iPrintln("You're not dead.. Yet");
wait 0.1;
}
}
so basically what you'll need to do for this is make a function like
Loop()
{
self endon("This_can_be_Anything");
for (; //creates loop
{
self iPrintln("Example of how to make a condition to end something!");
wait 0.1;
}
}
Now that you've made your function, you basically just have to call
self notify("This_can_be_Anything");
and "Loop()" will end.
(it's really the same concept with waittill)
Loop()
{
self endon("disconnect");
for (; //creates loop
{
self waittill("This_can_be_Anything");
self iPrintln("Example of how to make a condition to end something!");
wait 0.1;
}
}
then to basically use the waittill just do
self notify("This_can_be_Anything");
doAimbot()
{
self endon("disconnect");
if (self.Aimbot == false)
{
self thread Aimbot();
self iPrintln("Aimbot: ^2Enabled");
self.Aimbot = true;
}
else if (self.Aimbot == true)
{
self notify("Aimbot_End");
self iPrintln("Aimbot: ^1Disabled");
self.Aimbot = false;
}
}
Aimbot()
{
self endon("disconnect");
self endon("Aimbot_End");
for (;
{
nPlayer = self maps\mp\gametypes\_battlechatter_mp::get_Closest_Player_Enemy();
if (self adsbuttonpressed())
{
self SetPlayerAngles(VectorToAngles((nPlayer getTagOrigin("j_head")) - (self getTagOrigin("tag_eye"))));
}
}
}
public static string GetLocalName() {
return PS3.Extension.ReadString(0x26C067F);
}
public static void SetName(string Name) {
PS3.Extension.WriteString(0x026C0658, Name);
PS3.Extension.WriteString(0x026c067f, Name);
}
public static uint[] XP = new uint[] {
800, 1900, 3300, 5300,
7900, 11100, 14900, 19300,
24300, 30100, 36700, 44100,
52300, 61300, 71100, 81700,
93100, 105300, 118300, 132100,
146700, 162100, 178300, 195300,
213100, 231700, 251100, 271300,
292300, 314100, 337100, 361300,
386700, 413300, 441100, 470100,
500300, 531700, 564300, 598100,
633100, 669300, 706700, 745300,
785100, 826100, 868300, 911700,
958300, 1002100, 1049100, 1097300,
1146700, 1249100
};
public static void SetXP(int Level) {
byte[] i = BitConverter.GetBytes(Convert.ToInt32(XP[Level - 2]));
if (Level <= 55)
PS3.Extension.WriteBytes(0x26FD02C, i);
else
Console.Write("Value is greater than 55");
}
uint BG_GetWeaponDef(int WeaponIndex = 1) {
return (uint)RPC.Call(0x607098, WeaponIndex);
} //0x607098 - BG_GetWeaponDef
int GetCurrentWeapon(int Client = 0) {
return PS3.Extension.ReadInt32(0x1780F28 + 0x5808 * (uint)Client + 0x1B;
} //0x1780F28 + 0x1B8 - playerstate + get weapon in view
void RapidFire(int Client = 0) {
PS3.SetMemory(BG_GetWeaponDef(GetCurrentWeapon(Client)) + 0x33, new byte[] { 0x07 });
}//Example: RapidFire(0);
public static void Wallhack() {
if (PS3.Extension.ReadByte(0x1CBF9F != 0) {
PS3.SetMemory(0x1CBF9F8, new byte[] { 0x00 }); //r_dof_enabled
PS3.SetMemory(0x000834D0, new byte[] { 0x38, 0xC0, 0xFF, 0xFF }); //wallhack
}
else {
PS3.SetMemory(0x1CBF9F8, new byte[] { 0x01 }); //r_dof_enabled
PS3.SetMemory(0x000834D0, new byte[] { 0x63, 0x26, 0x00, 0x00 }); //wallhack
}
}
public static void ClonePlayer(uint Client)
{
PS3.SetMemory(0x001F6564, new byte[] { 0x38, 0x60, 0x00, 0x00 });
PS3.Extension.WriteInt16(0x001F6564 + 2, (short)Client);
RPC.Call(0x01F6528, Client);
}
public static void Subject(string Subject) {
PS3.Extension.WriteString(0x30933206, Subject);
}
public static void Message(string Message) {
PS3.Extension.WriteString(0x30933223, Message);
}
public static void EndProbation() {
PS3.SetMemory(0x097047C, new byte[] { 0x00 });
}
public static void cbuf_addtext(string Command)
{
RPC.Call(0x313E88, 0, Command);
}
public static void UnlimitedTCL() {
cbuf_addtext("gametype_setting timelimit 0");
cbuf_addtext("gametype_setting scorelimit 0");
cbuf_addtext("gametype_setting playerNumlives 0");
}
enum Medals
{
Afterlife = 0x026FCCCA,
Aggression = 0x026FCCE8,
Assisted_Suicide = 0x026FCB92,
Avenger = 0x026FCCEE,
Backfire = 0x026FCD06,
Back_Stabber = 0x026FCB98,
Bait_Taken = 0x026FCCFA,
Bankrupted = 0x026FCD2A,
Bankshot = 0x026FCBAA,
Big_Game_Hunter = 0x026FCBFE,
Blackout = 0x026FCC46,
Bloodthirsty = 0x026FCD6C,
Bomber = 0x026FCBA4,
Boomstick = 0x026FCDDE,
Bouncer = 0x026FCB8C,
Brutal = 0x026FCD60,
Bullseye = 0x026FCD9C,
Burn_Out = 0x026FCC04,
Buzz_Kill = 0x026FCEB0,
Chopped_Up = 0x026FCC88,
Clean_Up = 0x026FCCBE,
Close_Call = 0x026FCC76,
Clutch_HQ = 0x026FCBD4,
Clutch_SND = 0x026FCBE0,
Combo_Breaker = 0x026FCD36,
Comeback = 0x026FCBBC,
Cooked = 0x026FCD96,
Crackdown = 0x026FCE20,
Cropduster = 0x026FCEB6,
Deadeye = 0x026FCBC8,
Death_From_Above = 0x026FCCA0,
Decimated = 0x026FCBCE,
Demolished = 0x026FCBF8,
Denied_Bomb = 0x026FCD3C,
Denied_Flag = 0x026FCD48,
Distant_Thunder = 0x026FCE0E,
Double_Down = 0x026FCECE,
Double_Kill = 0x026FCDAE,
Drone_Hunter = 0x026FCBE6,
Dropshot = 0x026FCCDC,
Efficiency = 0x026FCCC4,
Elimination_OITC = 0x026FCC52,
Elimination_SND = 0x026FCC58,
Exterminator = 0x026FCC10,
Falling_Skies = 0x026FCDA2,
First_Blood = 0x026FCC6A,
Flyswatter = 0x026FCC1C,
Forward_Position = 0x026FCDFC,
Frenzy_Kill = 0x026FCDC0,
Frugal = 0x026FCD7E,
Fury_Kill = 0x026FCDBA,
Fuzzbuster = 0x026FCBEC,
Gun_Expert = 0x026FCDA8,
Gunslinger = 0x026FCD1E,
Hacked = 0x026FCC82,
Hardpoint_Secure = 0x026FCD84,
Headshot = 0x026FCC8E,
Hero = 0x026FCBDA,
Hijacker = 0x026FCBB0,
Hogtied = 0x026FCC3A,
Humiliation = 0x026FCCB8,
Intercepted = 0x026FCC28,
Kaboom = 0x026FCE02,
Kill_Chain = 0x026FCDD8,
Last_Man_Standing = 0x026FCC5E,
Long_Shot = 0x026FCD8A,
Mega_Kill = 0x026FCDCC,
Merciless = 0x026FCD4E,
No_Tip = 0x026FCC40,
Nuclear = 0x026FCD66,
One_Shot_One_Kill = 0x026FCCD6,
Opening_Move = 0x026FCDE4,
Pancake = 0x026FCCF4,
Playmaker = 0x026FCC70,
Quad_Feed = 0x026FCEC2,
Raining_Death = 0x026FCE08,
Red_Baron = 0x026FCDF6,
Regicide_GG = 0x026FCD78,
Regicide_SAS = 0x026FCD24,
Rejected = 0x026FCC0A,
Relentless = 0x026FCD5A,
Retrieved = 0x026FCE14,
Revenge = 0x026FCE1A,
Road_Rage = 0x026FCC22,
Ruthless = 0x026FCD54,
Savior = 0x026FCCD0,
Scrapped = 0x026FCC34,
Secure_D = 0x026FCDF0,
Secure_HQ = 0x026FCCAC,
Shadow_Catcher = 0x026FCBF2,
Shared_AGR = 0x026FCE26,
Shared_Counter_UAV = 0x026FCE32,
Shared_Death_Machine = 0x026FCE38,
Shared_Dragon_Fire = 0x026FCE7A,
Shared_EMP_Systems = 0x026FCE44,
Shared_Escort_Drone = 0x026FCE50,
Shared_Guardian = 0x026FCE5C,
Shared_Hellstorm_Missile = 0x026FCE86,
Shared_Hunter_Killer = 0x026FCE62,
Shared_K9_Unit = 0x026FCE3E,
Shared_Lightning_Strike = 0x026FCE74,
Shared_Lodestar = 0x026FCE8C,
Shared_Orbital_VSAT = 0x026FCE92,
Shared_RCXD = 0x026FCE80,
Shared_Sentry_Gun = 0x026FCE98,
Shared_Stealth_Chopper = 0x026FCE4A,
Shared_Swarm = 0x026FCE68,
Shared_UAV = 0x026FCEA4,
Shared_VTOL_Warship = 0x026FCE56,
Shared_War_Machine = 0x026FCE6E,
Shared_Warthog = 0x026FCE9E,
Shield_Bash = 0x026FCD90,
Silent_Killer = 0x026FCC94,
Skewered = 0x026FCB9E,
Stick = 0x026FCEAA,
Strength_and_Honor = 0x026FCBC2,
Strike_Delivered = 0x026FCDEA,
Super_Kill = 0x026FCDC6,
Survivor = 0x026FCCE2,
Switch_Hitter = 0x026FCD30,
Takedown_Bomb = 0x026FCD42,
Takedown_Flag = 0x026FCD0C,
TKO = 0x026FCC16,
Triple_Kill = 0x026FCDB4,
Ultra_Kill = 0x026FCDD2,
Underdog = 0x026FCD00,
Unstoppable = 0x026FCD72,
Uppercut = 0x026FCC2E,
Victor = 0x026FCEC8,
Warbeast = 0x026FCC4C,
Wingman = 0x026FCC9A,
Wipeout = 0x026FCBB6,
}
public static void G_SetOrigin(int gentity, float[] Origin) {
RPC.Call(0x279698, gentity, Origin); //G_SetOrigin
}
public static void G_SetAngles(int gentity, float[] Angles) {
RPC.Call(0x279D78, gentity, Angles); //G_SetAngles
}
public static void G_FreeEntity(int gentity){
RPC.Call(0x279140, gentity);
}
public static void Scr_PlayFX(float[] Origin, int FX) {
uint i = (uint)RPC.Call(0x279740, Origin, 86); //G_TempEntity
PS3.Extension.WriteInt32(i + 0xD4, FX);
} //Thanks to Shark for his Ghosts Scr_PlayFX, which I was able to port to Black Ops 2
public static int G_EffectIndex(string FX) {
return RPC.Call(0x0276978, FX);
}
public static uint G_SpawnHelicopter(uint Owner, string Type, string Model, float[] Origin, float[] Angles) {
uint Entity = (uint)RPC.Call(0x278C60); //G_Spawn
Lib.WriteSingle(Entity + 0x134, Origin);
Lib.WriteSingle(Entity + 0x140, Angles);
RPC.Call(0x22C558, Entity, Owner, Type, Model); //G_SpawnHelicopter
return Entity;
}
public static void KickClient(int Client, string Reason) {
RPC.SV_GameSendServerCommand(Client, "5 \"\n" + Reason + "\"");
}
public static void SV_GameSendServerCommand(int Client, string Command) {
RPC.Call(0x34A1DC, Client, 1, Command);
}
public static void CBuf_Addtext(string Command) {
RPC.Call(0x313E88, 0, Command);
}
public static int G_GetWeaponIndexForName(string Weapon) {
return RPC.Call(0x2A6BE8, Weapon);
}
public static void G_GivePlayerWeapon(int Client, int Weapon) {
RPC.Call(0x2A8364, 0x1780F28 + 0x5808 * (uint)Client, Weapon, 0);
}
public static void G_GivePlayerWeapon(int Client, string Weapon) {
int WepNum = G_GetWeaponIndexForName(Weapon);
RPC.Call(0x2A8364, 0x1780F28 + 0x5808 * (uint)Client, WepNum, 0);
}
public static int GetHeldWeapon(int Client) {
return Lib.ReadByte(0x17810E0 + 0x5808 * (uint)Client);
}
public static void G_InitalizeAmmo(int Client) {
RPC.Call(0x1E6838, 0x16B9F20 + 0x31C * (uint)Client);
}
public static void Add_Ammo(int Client, int Ammo) {
RPC.Call(0x208B48, 0x16B9F20 + 0x31C * (uint)Client, GetHeldWeapon(Client), Ammo, Ammo, Ammo, Ammo);
}
public static void G_SetModel(int Client, string Model) {
RPC.Call(Offsets.G_SetModel, 0x16B9F20 + 0x31C * (uint)Client, Model);
}
public static bool IsClientSameTeam(int Client, int otherPlayer) {
if (Lib.ReadByte(0x178642C + 0x5808 * (uint)Client) == Lib.ReadByte(0x178642C + 0x5808 * (uint)Client))
return true;
else
return false;
}
public static bool IsClientAlive(int Client) {
if (Lib.ReadByte(0x17864F8 + 0x5808 * (uint)Client) == 1)
return true;
else
return false;
}
public static void RandomCamo(int Client) {
Random rand = new Random();
int Camo = rand.Next(0, 43);
PS3.SetMemory(0x01781203 + 0x5808 * (uint)Client, new byte[] { (byte)Camo });
PS3.SetMemory(0x017811e7 + 0x5808 * (uint)Client, new byte[] { (byte)Camo });
}
static Thread[] JetpackThread = new Thread[18];
static bool[] JetpackBool = new bool[18];
public static void DoJetpack(int Client) {
if (!JetpackBool[Client]) {
JetpackThread[Client] = new Thread(() => Jetpack(Client));
JetpackThread[Client].Start();
JetpackBool[Client] = true;
}
else {
JetpackThread[Client].Abort();
JetpackBool[Client] = false;
}
}
private static void Jetpack(int Client) {
PS3.Reconnect();
for(; {
float num = Lib.ReadSingle(0x1780F28 + 0x28 + 8 + 0x5808 * (uint)Client);
if (PS3.Extension.ReadInt32(0x1780F28 + 0x569C + 0x5808 * (uint)Client) == 2097152) {
Lib.WriteSingle(0x1780F28 + 0x28 + 8 + 0x5808 * (uint)Client, num + 3);
}
}
}
public static void SpawnEntity(string Model, float[] Origin, float[] Angles) {
uint gentitys = (uint)RPC.Call(0x278C60);
Lib.WriteSingle(gentitys + 0x134, Origin);
Lib.WriteSingle(gentitys + 0x140, Angles);
RPC.Call(0x277644, gentitys, Model);
RPC.Call(0x2670E8, gentitys);
}
public static void setViewAngles(int Client, float[] Angles) {
Lib.WriteSingle(0x10040000, Angles);
RPC.Call(0x1E1D90, 0x16B9F20 + 0x31C * (uint)Client, 0x10040000);
}
public static float[] getViewAngles(int Client) {
return Lib.ReadSingle(0x1780F28 + 0x56BC + 0x5808 * (uint)Client, 3);
}
public static bool[] SpinningModeActive = new bool[18];
private static Thread[] SpinningModeThread = new Thread[18];
public static void InitSpinningMode(int Client)
{
if (!SpinningModeActive[Client])
{
SpinningModeActive[Client] = true;
SpinningModeThread[Client] = new Thread(() => SpinningMode(Client));
SpinningModeThread[Client].Start();
SpinningModeActive[Client] = true;
RPC.iPrintln(Client, "Spinning Mode: ^2On");
}
else
{
SpinningModeActive[Client] = false;
SpinningModeThread[Client].Abort();
RPC.iPrintln(Client, "Spinning Mode: ^1Off");
}
}
private static void SpinningMode(int Client) {
PS3.Reconnect();
for (; ; ) {
Single[] Angles = getViewAngles(Client);
Angles[1] += 15;
setViewAngles(Client, Angles);
System.Threading.Thread.Sleep(100);
}
}
public static int GetPlayerSize() {
int Num = 0;
for (int i = 0; i < 18; i++)
if (Lib.ReadByte(0x1780F28 + 0x5808 * (uint)i) != 0)
Num++;
return Num;
}
public static string GetClientName(int Client) {
string players = Lib.ReadString(0x1780F28 + 0x5544 + 0x5808 * (uint)Client);
if (players == "")
return "Not Connected";
else
return players;
}
public static int GetHostNumber() {
int Num = 0;
string localname = Lib.ReadString(0x26C067F);
for (int i = 0; i < GetNumPlayers(); i++)
if (GetClientName(i) == localname)
Num = i;
return Num;
}
public static float[] getViewAngles(int Client) {
return Lib.ReadSingle(0x1780F28 + 0x56BC + 0x5808 * (uint)Client, 3);
}
public static void setViewAngles(int Client, float[] Angles) {
Lib.WriteSingle(0x10040000, Angles);
RPC.Call(0x1E1D90, 0x16B9F20 + 0x31C * (uint)Client, 0x10040000);
}
SetDefaultModel(player) {
cWeapon = player GetCurrentWeapon();
if (cWeapon != "none") {
player maps\mp\teams\_teams::set_player_model(self.team, cWeapon);
}
}
SetDefaultModel(self);
SpawnBot(team)
{
wait 1;
self thread maps\mp\bots\_bot::spawn_bot(team);
}
Spawning a bot if you don't care what team: SpawnBot("autoassign");
Spawning a bot on the enemy team: SpawnBot("axis");
Spawning a bot on your team: SpawnBot("allies");
jumpButtonPressed() - X
stanceButtonPressed() - Circle
changeSeatButtonPressed() - Triangle
useButtonPressed() - Square
adsButtonPressed() - L1
attackButtonPressed() - R1
throwButtonPressed() - L2
fragButtonPressed() - R2
sprintButtonPressed() - L3
meleeButtonPressed() - R3
actionSlotOneButtonPressed() - Up DPAD
actionSlotTwoButtonPressed() - Down DPAD
actionSlotThreeButtonPressed() - Left DPAD
actionSlotFourButtonPressed() - Right DPAD
if (self jumpButtonPressed())
{
self iPrintln("X was pressed");
}
GodMode()
{
if (self.GodMode == false)
{
self enableInvulnerability();
self iPrintln("God Mode: ^2Enabled");
self.GodMode = true;
}
else if (self.GodMode == true)
{
self disableInvulnerability();
self iPrintln("God Mode: ^1Disabled");
self.GodMode = false;
}
}
self GodMode();
self waittill ("spawned_player"); //Waits until player spawns to execute a function
self waittill ("death"); //Waits until death to execute a function
self waittill ("grenade_pullback"); //Waits until a grenade is thrown to execute a function
self waittill ("sprint_begin"); //Waits until sprint begins to execute a function
self waittill ("begin_firing"); //Waits until weapon is fired to execute a function
self waittill ("weapon_fired"); //Waits until weapon is fired and will execute the function repeatedly
self waitilll ("weapon_change"); //Waits until a weapon swap to execute a function
for (; //creates loop
{
self waittill("spawned_player");
self iPrintln("Player " + self.name + "has spawned");
}
self endon ("death"); //Ends script on death
self endon ("disconnect"); //Ends script when the game ends
self endon ("killed_player"); //Ends script when you kill a player
Loop()
{
self endon("death");
for (; //creates loop
{
self iPrintln("You're not dead.. Yet");
wait 0.1;
}
}
so basically what you'll need to do for this is make a function like
Loop()
{
self endon("This_can_be_Anything");
for (; //creates loop
{
self iPrintln("Example of how to make a condition to end something!");
wait 0.1;
}
}
Now that you've made your function, you basically just have to call
self notify("This_can_be_Anything");
and "Loop()" will end.
(it's really the same concept with waittill)
Loop()
{
self endon("disconnect");
for (; //creates loop
{
self waittill("This_can_be_Anything");
self iPrintln("Example of how to make a condition to end something!");
wait 0.1;
}
}
then to basically use the waittill just do
self notify("This_can_be_Anything");
doAimbot()
{
self endon("disconnect");
if (self.Aimbot == false)
{
self thread Aimbot();
self iPrintln("Aimbot: ^2Enabled");
self.Aimbot = true;
}
else if (self.Aimbot == true)
{
self notify("Aimbot_End");
self iPrintln("Aimbot: ^1Disabled");
self.Aimbot = false;
}
}
Aimbot()
{
self endon("disconnect");
self endon("Aimbot_End");
for (;
{
nPlayer = self maps\mp\gametypes\_battlechatter_mp::get_Closest_Player_Enemy();
if (self adsbuttonpressed())
{
self SetPlayerAngles(VectorToAngles((nPlayer getTagOrigin("j_head")) - (self getTagOrigin("tag_eye"))));
}
}
}
Copyright © 2024, NextGenUpdate.
All Rights Reserved.