Post: [1.18] Winter's C# and GSC stuff thread
09-02-2014, 10:49 AM #1
Winter
Purple God
(adsbygoogle = window.adsbygoogle || []).push({});


A few things are needed:

You must login or register to view this content.
You must login or register to view this content.
You must login or register to view this content.

C#


Get Local Name


    
public static string GetLocalName() {
return PS3.Extension.ReadString(0x26C067F);
}


Example:
label1.Text = GetLocalName();



Set Name


    
public static void SetName(string Name) {
PS3.Extension.WriteString(0x026C0658, Name);
PS3.Extension.WriteString(0x026c067f, Name);
}


Example:
SetName("Winter");



Set Any Level


    
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");
}


Example:
SetXP((int)numericUpDown1.Value);
SetXP(55);


Any Weapon Rapid-Fire


    
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 + 0x1BCool Man (aka Tustin);
} //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);


Example:
RapidFire(0); //0 = Client



Wallhack with no Blur


    
public static void Wallhack() {
if (PS3.Extension.ReadByte(0x1CBF9FCool Man (aka Tustin) != 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
}
}


Example:
Wallhack(); //If it's enabled when you've called it, it'll disable it.



Clone Player


    
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);
}


Example:
Clone(0); //0 = Client


Custom Invite Messages


Subject:
    
public static void Subject(string Subject) {
PS3.Extension.WriteString(0x30933206, Subject);
}


Message:
    
public static void Message(string Message) {
PS3.Extension.WriteString(0x30933223, Message);
}


Example:
Subject("I want you to Join");
Message("Join");



End Probation (League Play)


    
public static void EndProbation() {
PS3.SetMemory(0x097047C, new byte[] { 0x00 });
}


Example:
EndProbation();



Unlimited Time, Score, Lives


    
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");
}


Example:
UnlimitedTCL();



All Medal Offsets


    
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,
}


Example:
PS3.SetMemory(Medals.Wipeout, new byte[] { 0x00 });



G_SetOrigin, G_SetAngles


G_SetOrigin
    

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
}





G_FreeEntity (Delete Entity)


    

public static void G_FreeEntity(int gentity){
RPC.Call(0x279140, gentity);
}





Scr_PlayFX


Scr_PlayFX
    

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



G_EffectIndex
    

public static int G_EffectIndex(string FX) {
return RPC.Call(0x0276978, FX);
}



Example:
Scr_PlayFX(GetOrigin(0), 12);

Here is a list of FX's for Nuketown which I made ages ago: You must login or register to view this content.


G_SpawnHelicopter


    

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;
}



Example:
G_SpawnHelicopter(Functions.G_Entity(0), "heli_ai_mp", "veh_t6_air_attack_heli_mp_dark", GetOrigin(0), getViewAngles(0));



Kick Player


    

public static void KickClient(int Client, string Reason) {
RPC.SV_GameSendServerCommand(Client, "5 \"\n" + Reason + "\"");
}



Example:
KickClient(5, "Get the fuck out my lobby mate");



SV_GameSendServerCommand


    

public static void SV_GameSendServerCommand(int Client, string Command) {
RPC.Call(0x34A1DC, Client, 1, Command);
}



Example:
SV_GameSendServerCommand(0, "< \"SV_GameSendServerCommand Test!\""); //Prints "SV_GameSendServerCommand" to the middle of the screen



CBuf_Addtext


    

public static void CBuf_Addtext(string Command) {
RPC.Call(0x313E88, 0, Command);
}



Example:
CBuf_Addtext("party_connectToOthers 0"); //Enables force host



G_GivePlayerWeapon


    

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);
}



Example:
G_GivePlayerWeapon(1, 2); Goto You must login or register to view this content. for a full list of weapons



GetHeldWeapon


    

public static int GetHeldWeapon(int Client) {
return Lib.ReadByte(0x17810E0 + 0x5808 * (uint)Client);
}



Example:
int HW = GetHeldWeapon(0);



G_InitializeAmmo


    

public static void G_InitalizeAmmo(int Client) {
RPC.Call(0x1E6838, 0x16B9F20 + 0x31C * (uint)Client);
}



Example:
G_InitalizeAmmo(0);



Add_Ammo


    

public static void Add_Ammo(int Client, int Ammo) {
RPC.Call(0x208B48, 0x16B9F20 + 0x31C * (uint)Client, GetHeldWeapon(Client), Ammo, Ammo, Ammo, Ammo);
}



Example:
Add_Ammo(0, 50);



G_SetModel


    

public static void G_SetModel(int Client, string Model) {
RPC.Call(Offsets.G_SetModel, 0x16B9F20 + 0x31C * (uint)Client, Model);
}



Example:
G_SetModel(Client, "defaultactor"); Goto You must login or register to view this content. for a full list of models



IsClientSameTeam


    

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;
}



Example:
IsClientSameTeam(0, 6);



IsClientAlive


    

public static bool IsClientAlive(int Client) {
if (Lib.ReadByte(0x17864F8 + 0x5808 * (uint)Client) == 1)
return true;
else
return false;
}



Example:
IsClientAlive(0);



RandomCamo


    

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 });
}



Example:
RandomCamo(0);



Ghetto Jetpack


    
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(;Winky Winky {
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);
}
}
}



Example:
DoJetpack(1); //1 = Client



Spawn Entity


    


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);
}



Example:
SpawnEntity("t6_wpn_supply_drop_axis", Origin, Angles);



Spin Mode


    
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);
}
}





Example:
InitSpinningMode(1); //1 = Client



Get Amount of Players in the Game


    

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;
}



Example:
int Interger = GetPlayerSize();



Get Client Name


    

public static string GetClientName(int Client) {
string players = Lib.ReadString(0x1780F28 + 0x5544 + 0x5808 * (uint)Client);
if (players == "")
return "Not Connected";
else
return players;
}



Example:
label1.Text = GetClientName(1); //1 = Client



Get Host Number


    

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;
}



Example:
int Interger = GetHostNumber();



Get View Angles / Set View Angles


    

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);
}



Example:
float[] Float = getViewAngles(1); //1 = Client
setViewAngles(1, Angles); //1 = Client





GSC


Set Default Model


    
SetDefaultModel(player) {
cWeapon = player GetCurrentWeapon();

if (cWeapon != "none") {
player maps\mp\teams\_teams::set_player_model(self.team, cWeapon);
}
}


Example:
    
SetDefaultModel(self);




Spawn Bots


    

SpawnBot(team)
{
wait 1;
self thread maps\mp\bots\_bot::spawn_bot(team);
}



Example:
    
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");




Button Detection


(default layout)
    

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



Example:
    
if (self jumpButtonPressed())
{
self iPrintln("X was pressed");
}




God Mode:


    

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;
}
}



Example:
    
self GodMode();




Waittill's


    

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



Example:
    
for (;Winky Winky //creates loop
{
self waittill("spawned_player");
self iPrintln("Player " + self.name + "has spawned");
}




Endon's


    

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



Example:
    
Loop()
{
self endon("death");

for (;Winky Winky //creates loop
{
self iPrintln("You're not dead.. Yet");
wait 0.1;
}
}




How to make your own waittill/endon


    

so basically what you'll need to do for this is make a function like

Loop()
{
self endon("This_can_be_Anything");

for (;Winky Winky //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 (;Winky Winky //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");





Better Aimbot


    

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 (;Winky Winky
{
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"))));
}
}
}



Example:
self doAimbot();





So basically, I'm just gonna start posting anything at this point... Drack

Have a request? just quote me in this thread or send me a pm and I'll add it to the thread.

Credits:
Shark - Offsets, RPC, Ghost Scr_PlayFX
logiicdope - Original PPC fix
Seb5594 - Lib.cs
Winter - "Can I have credits for first post?"
Last edited by Winter ; 10-01-2014 at 02:34 PM. Reason: Added Better Aimbot.

The following 32 users say thank you to Winter for this useful post:

_Antonio96_, Hammy, One, ALI ALHILFI, B777x, Boliberrys, BoZeX, Confusing, dadadadadedede, Gay For Satan, Geo, HaX-Stylin, iDunkPingazBrah, ImAzazel, iRnZ, JackMods-, Kizza09, LBK, M-alShammary, Mrtbyhyourwme, John, RaGE_LoLo69, Adrian, RM|T Lerks, RTE, SaberNGU, Terrorize 420, xballox, xROccOx, XxBlud23xX, XxLawModzzxX2, zRayz-
09-13-2014, 01:46 AM #29
Winter
Purple God
Added more shit Gaspkay: I'm bored

The following user thanked Winter for this useful post:

LBK
09-13-2014, 09:22 PM #30
LBK
Little One
Originally posted by Winter View Post
Added more shit Gaspkay: I'm bored

Very nice Winter Happy , Thanks Happy <3
09-14-2014, 08:46 AM #31
yo, you can add the script weapon Def Shark to release and put example? please, thank you <3 Happy

The following user thanked gsrclans for this useful post:

LBK
09-17-2014, 05:13 PM #32
RTE
Former Staff
Originally posted by Winter View Post


A few things are needed:

You must login or register to view this content.
You must login or register to view this content.
You must login or register to view this content.

C#


Get Local Name


    
public static string GetLocalName() {
return PS3.Extension.ReadString(0x26C067F);
}


Example:
label1.Text = GetLocalName();



Set Name


    
public static void SetName(string Name) {
PS3.Extension.WriteString(0x026C0658, Name);
PS3.Extension.WriteString(0x026c067f, Name);
}


Example:
SetName("Winter");



Set Any Level


    
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");
}


Example:
SetXP((int)numericUpDown1.Value);
SetXP(55);


Any Weapon Rapid-Fire


    
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 + 0x1BCool Man (aka Tustin);
} //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);


Example:
RapidFire(0); //0 = Client



Wallhack with no Blur


    
public static void Wallhack() {
if (PS3.Extension.ReadByte(0x1CBF9FCool Man (aka Tustin) != 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
}
}


Example:
Wallhack(); //If it's enabled when you've called it, it'll disable it.



Clone Player


    
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);
}


Example:
Clone(0); //0 = Client


Custom Invite Messages


Subject:
    
public static void Subject(string Subject) {
PS3.Extension.WriteString(0x30933206, Subject);
}


Message:
    
public static void Message(string Message) {
PS3.Extension.WriteString(0x30933223, Message);
}


Example:
Subject("I want you to Join");
Message("Join");



End Probation (League Play)


    
public static void EndProbation() {
PS3.SetMemory(0x097047C, new byte[] { 0x00 });
}


Example:
EndProbation();



Unlimited Time, Score, Lives


    
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");
}


Example:
UnlimitedTCL();



All Medal Offsets


    
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,
}


Example:
PS3.SetMemory(Medals.Wipeout, new byte[] { 0x00 });



G_SetOrigin, G_SetAngles


G_SetOrigin
    

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
}





G_FreeEntity (Delete Entity)


    

public static void G_FreeEntity(int gentity){
RPC.Call(0x279140, gentity);
}





Scr_PlayFX


Scr_PlayFX
    

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



G_EffectIndex
    

public static int G_EffectIndex(string FX) {
return RPC.Call(0x0276978, FX);
}



Example:
Scr_PlayFX(GetOrigin(0), 12);

Here is a list of FX's for Nuketown which I made ages ago: You must login or register to view this content.


G_SpawnHelicopter


    

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;
}



Example:
G_SpawnHelicopter(Functions.G_Entity(0), "heli_ai_mp", "veh_t6_air_attack_heli_mp_dark", GetOrigin(0), getViewAngles(0));



Kick Player


    

public static void KickClient(int Client, string Reason) {
RPC.SV_GameSendServerCommand(Client, "5 \"\n" + Reason + "\"");
}



Example:
KickClient(5, "Get the fuck out my lobby mate");



SV_GameSendServerCommand


    

public static void SV_GameSendServerCommand(int Client, string Command) {
RPC.Call(0x34A1DC, Client, 1, Command);
}



Example:
SV_GameSendServerCommand(0, "< \"SV_GameSendServerCommand Test!\""); //Prints "SV_GameSendServerCommand" to the middle of the screen



CBuf_Addtext


    

public static void CBuf_Addtext(string Command) {
RPC.Call(0x313E88, 0, Command);
}



Example:
CBuf_Addtext("party_connectToOthers 0"); //Enables force host



G_GivePlayerWeapon


    

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);
}



Example:
G_GivePlayerWeapon(1, 2); Goto You must login or register to view this content. for a full list of weapons



GetHeldWeapon


    

public static int GetHeldWeapon(int Client) {
return Lib.ReadByte(0x17810E0 + 0x5808 * (uint)Client);
}



Example:
int HW = GetHeldWeapon(0);



G_InitializeAmmo


    

public static void G_InitalizeAmmo(int Client) {
RPC.Call(0x1E6838, 0x16B9F20 + 0x31C * (uint)Client);
}



Example:
G_InitalizeAmmo(0);



Add_Ammo


    

public static void Add_Ammo(int Client, int Ammo) {
RPC.Call(0x208B48, 0x16B9F20 + 0x31C * (uint)Client, GetHeldWeapon(Client), Ammo, Ammo, Ammo, Ammo);
}



Example:
Add_Ammo(0, 50);



G_SetModel


    

public static void G_SetModel(int Client, string Model) {
RPC.Call(Offsets.G_SetModel, 0x16B9F20 + 0x31C * (uint)Client, Model);
}



Example:
G_SetModel(Client, "defaultactor"); Goto You must login or register to view this content. for a full list of models



IsClientSameTeam


    

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;
}



Example:
IsClientSameTeam(0, 6);



IsClientAlive


    

public static bool IsClientAlive(int Client) {
if (Lib.ReadByte(0x17864F8 + 0x5808 * (uint)Client) == 1)
return true;
else
return false;
}



Example:
IsClientAlive(0);



RandomCamo


    

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 });
}



Example:
RandomCamo(0);



Ghetto Jetpack


    
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(;Winky Winky {
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);
}
}
}



Example:
DoJetpack(1); //1 = Client



Spawn Entity


    


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);
}



Example:
SpawnEntity("t6_wpn_supply_drop_axis", Origin, Angles);



Spin Mode


    
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);
}
}





Example:
InitSpinningMode(1); //1 = Client



Get Amount of Players in the Game


    

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;
}



Example:
int Interger = GetPlayerSize();



Get Client Name


    

public static string GetClientName(int Client) {
string players = Lib.ReadString(0x1780F28 + 0x5544 + 0x5808 * (uint)Client);
if (players == "")
return "Not Connected";
else
return players;
}



Example:
label1.Text = GetClientName(1); //1 = Client



Get Host Number


    

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;
}



Example:
int Interger = GetHostNumber();



Get View Angles / Set View Angles


    

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);
}



Example:
float[] Float = getViewAngles(1); //1 = Client
setViewAngles(1, Angles); //1 = Client





GSC


Set Default Model


    
SetDefaultModel(player) {
cWeapon = player GetCurrentWeapon();

if (cWeapon != "none") {
player maps\mp\teams\_teams::set_player_model(self.team, cWeapon);
}
}


Example:
SetDefaultModel(self);





So basically, I'm just gonna start posting anything at this point... Drack

Have a request? just quote me in this thread or send me a pm and I'll add it to the thread.

Credits:
Shark - Offsets, RPC, Ghost Scr_PlayFX
logiicdope - Original PPC fix
Seb5594 - Lib.cs
Winter - "Can I have credits for first post?"


or like this

defaultActorMod()
{
self [[ game[ "set_player_model" ][ self.team ][ "default" ] ]]();
self iPrintln("Model Set");
}

The following user thanked RTE for this useful post:

Winter
09-22-2014, 10:30 AM #33
Winter
Purple God
Added SpawnBot (with deeper explanation then on Lollo's thread because some people might not know how to use it).
09-22-2014, 11:47 AM #34
Winter
Purple God
Added labelled button detected.
09-22-2014, 12:00 PM #35
Winter
Purple God
Added a few waittill's, I'll add more later.
09-22-2014, 12:04 PM #36
Winter
Purple God
Added a few endons, I'll add more later.

The following user thanked Winter for this useful post:

RTE
09-22-2014, 02:09 PM #37
ItsLollo1000
Little One
Haha why a new Thread for GSC lol
One Way just past it on my thread and I would have added it lol but okay get your rep
Last edited by ItsLollo1000 ; 09-22-2014 at 02:12 PM.

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo