Advertisement
BaSs_HaXoR

BO2 [cool stuff]

Sep 14th, 2014
2,221
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 20.35 KB | None | 0 0
  1. /*A few things are needed:
  2. //http://pastebin.com/u/NGUWinter
  3. Lib.cs: https://mega.co.nz/#!5I81kDDK!0B32RvG34OOaTPvro4g65M_9QoMcHZrv97OkNBaO03A
  4. PS3.cs: https://mega.co.nz/#!ZIdB3BoI!4OhchZ8erRIAjnHKmxRkULPIpvuAhYbG6GB07ak70aU
  5. RPC: http://pastebin.com/RjVbhLFR
  6.  
  7. Source: http://www.nextgenupdate.com/forums/call-duty-black-ops-2-mods-cheats-guides/761437-1-18-winter-s-stuff-thread.html
  8. */
  9.  
  10. //Get Local Name
  11. //Spoiler:
  12.  
  13. //Code:
  14.  
  15. public static string GetLocalName() {
  16.       return PS3.Extension.ReadString(0x26C067F);
  17. }
  18.  
  19. //Example:
  20. label1.Text = GetLocalName();
  21.  
  22.  
  23.  
  24. //Set Name
  25. //Spoiler:
  26.  
  27.  
  28. //Code:
  29.  
  30.         public static void SetName(string Name) {
  31.             PS3.Extension.WriteString(0x026C0658, Name);
  32.             PS3.Extension.WriteString(0x026c067f, Name);
  33.         }
  34.  
  35. //Example:
  36. SetName("Winter");
  37.  
  38.  
  39.  
  40. //Set Any Level
  41. //Spoiler:
  42.  
  43.  
  44. //Code:
  45.  
  46.        public static uint[] XP = new uint[] {
  47.                 800, 1900, 3300, 5300,
  48.                 7900, 11100, 14900, 19300,
  49.                 24300, 30100, 36700, 44100,
  50.                 52300, 61300, 71100, 81700,
  51.                 93100, 105300, 118300, 132100,
  52.                 146700, 162100, 178300, 195300,
  53.                 213100, 231700, 251100, 271300,
  54.                 292300, 314100, 337100, 361300,
  55.                 386700, 413300, 441100, 470100,
  56.                 500300, 531700, 564300, 598100,
  57.                 633100, 669300, 706700, 745300,
  58.                 785100, 826100, 868300, 911700,
  59.                 958300, 1002100, 1049100, 1097300,
  60.                 1146700, 1249100
  61.         };
  62.  
  63.         public static void SetXP(int Level) {
  64.             byte[] i = BitConverter.GetBytes(Convert.ToInt32(XP[Level - 2]));
  65.             if (Level <= 55)
  66.                 PS3.Extension.WriteBytes(0x26FD02C, i);
  67.             else
  68.                 Console.Write("Value is greater than 55");
  69.         }
  70.  
  71. //Example:
  72. SetXP((int)numericUpDown1.Value);
  73. SetXP(55);
  74.  
  75.  
  76. //Any Weapon Rapid-Fire
  77. //Spoiler:
  78.  
  79.  
  80. //Code:
  81.  
  82.        uint BG_GetWeaponDef(int WeaponIndex = 1) {
  83.             return (uint)RPC.Call(0x607098, WeaponIndex);
  84.         } //0x607098 - BG_GetWeaponDef
  85.  
  86.         int GetCurrentWeapon(int Client = 0) {
  87.             return PS3.Extension.ReadInt32(0x1780F28 + 0x5808 * (uint)Client + 0x1B8);
  88.         } //0x1780F28 + 0x1B8 - playerstate + get weapon in view
  89.  
  90.         void RapidFire(int Client = 0) {
  91.             PS3.SetMemory(BG_GetWeaponDef(GetCurrentWeapon(Client)) + 0x33, new byte[] { 0x07 });
  92.         }////Example: RapidFire(0);
  93.  
  94. //Example:
  95. RapidFire(0); //0 = Client
  96.  
  97.  
  98.  
  99. //Wallhack with no Blur
  100. //Spoiler:
  101.  
  102.  
  103. //Code:
  104.  
  105.         public static void Wallhack() {
  106.             if (PS3.Extension.ReadByte(0x1CBF9F8) != 0) {
  107.                 PS3.SetMemory(0x1CBF9F8, new byte[] { 0x00 }); //r_dof_enabled
  108.                 PS3.SetMemory(0x000834D0, new byte[] { 0x38, 0xC0, 0xFF, 0xFF }); //wallhack
  109.             }
  110.             else {
  111.                 PS3.SetMemory(0x1CBF9F8, new byte[] { 0x01 }); //r_dof_enabled
  112.                 PS3.SetMemory(0x000834D0, new byte[] { 0x63, 0x26, 0x00, 0x00 }); //wallhack
  113.             }
  114.         }
  115.  
  116. //Example:
  117. Wallhack(); //If it's enabled when you've called it, it'll disable it.
  118.  
  119.  
  120.  
  121. //Clone Player
  122. //Spoiler:
  123.  
  124.  
  125. //Code:
  126.  
  127.         public static void ClonePlayer(uint Client)
  128.         {
  129.             PS3.SetMemory(0x001F6564, new byte[] { 0x38, 0x60, 0x00, 0x00 });
  130.             PS3.Extension.WriteInt16(0x001F6564 + 2, (short)Client);
  131.             RPC.Call(0x01F6528, Client);
  132.         }
  133.  
  134. //Example:
  135. Clone(0); //0 = Client
  136.  
  137.  
  138. //Custom Invite Messages
  139. //Spoiler:
  140.  
  141.  
  142. //Subject:
  143. //Code:
  144.  
  145.         public static void Subject(string Subject) {
  146.             PS3.Extension.WriteString(0x30933206, Subject);
  147.         }
  148.  
  149. //Message:
  150. //Code:
  151.  
  152.         public static void Message(string Message) {
  153.             PS3.Extension.WriteString(0x30933223, Message);
  154.         }
  155.  
  156. //Example:
  157. Subject("I want you to Join");
  158. Message("Join");
  159.  
  160.  
  161.  
  162. //End Probation (League Play)
  163. //Spoiler:
  164.  
  165.  
  166. //Code:
  167.  
  168.         public static void EndProbation() {
  169.             PS3.SetMemory(0x097047C, new byte[] { 0x00 });
  170.         }
  171.  
  172. //Example:
  173. EndProbation();
  174.  
  175.  
  176.  
  177. //Unlimited Time, Score, Lives
  178. //Spoiler:
  179.  
  180.  
  181. //Code:
  182.  
  183.         public static void cbuf_addtext(string Command)
  184.         {
  185.             RPC.Call(0x313E88, 0, Command);
  186.         }
  187.  
  188.         public static void UnlimitedTCL() {
  189.             cbuf_addtext("gametype_setting timelimit 0");
  190.             cbuf_addtext("gametype_setting scorelimit 0");
  191.             cbuf_addtext("gametype_setting playerNumlives 0");
  192.         }
  193.  
  194. //Example:
  195. UnlimitedTCL();
  196.  
  197.  
  198.  
  199. //All Medal Offsets
  200. //Spoiler:
  201.  
  202.  
  203. //Code:
  204.  
  205.             enum Medals
  206.             {
  207.                 Afterlife = 0x026FCCCA,
  208.                 Aggression = 0x026FCCE8,
  209.                 Assisted_Suicide = 0x026FCB92,
  210.                 Avenger = 0x026FCCEE,
  211.                 Backfire = 0x026FCD06,
  212.                 Back_Stabber = 0x026FCB98,
  213.                 Bait_Taken = 0x026FCCFA,
  214.                 Bankrupted = 0x026FCD2A,
  215.                 Bankshot = 0x026FCBAA,
  216.                 Big_Game_Hunter = 0x026FCBFE,
  217.                 Blackout = 0x026FCC46,
  218.                 Bloodthirsty = 0x026FCD6C,
  219.                 Bomber = 0x026FCBA4,
  220.                 Boomstick = 0x026FCDDE,
  221.                 Bouncer = 0x026FCB8C,
  222.                 Brutal = 0x026FCD60,
  223.                 Bullseye = 0x026FCD9C,
  224.                 Burn_Out = 0x026FCC04,
  225.                 Buzz_Kill = 0x026FCEB0,
  226.                 Chopped_Up = 0x026FCC88,
  227.                 Clean_Up = 0x026FCCBE,
  228.                 Close_Call = 0x026FCC76,
  229.                 Clutch_HQ = 0x026FCBD4,
  230.                 Clutch_SND = 0x026FCBE0,
  231.                 Combo_Breaker = 0x026FCD36,
  232.                 Comeback = 0x026FCBBC,
  233.                 Cooked = 0x026FCD96,
  234.                 Crackdown = 0x026FCE20,
  235.                 Cropduster = 0x026FCEB6,
  236.                 Deadeye = 0x026FCBC8,
  237.                 Death_From_Above = 0x026FCCA0,
  238.                 Decimated = 0x026FCBCE,
  239.                 Demolished = 0x026FCBF8,
  240.                 Denied_Bomb = 0x026FCD3C,
  241.                 Denied_Flag = 0x026FCD48,
  242.                 Distant_Thunder = 0x026FCE0E,
  243.                 Double_Down = 0x026FCECE,
  244.                 Double_Kill = 0x026FCDAE,
  245.                 Drone_Hunter = 0x026FCBE6,
  246.                 Dropshot = 0x026FCCDC,
  247.                 Efficiency = 0x026FCCC4,
  248.                 Elimination_OITC = 0x026FCC52,
  249.                 Elimination_SND = 0x026FCC58,
  250.                 Exterminator = 0x026FCC10,
  251.                 Falling_Skies = 0x026FCDA2,
  252.                 First_Blood = 0x026FCC6A,
  253.                 Flyswatter = 0x026FCC1C,
  254.                 Forward_Position = 0x026FCDFC,
  255.                 Frenzy_Kill = 0x026FCDC0,
  256.                 Frugal = 0x026FCD7E,
  257.                 Fury_Kill = 0x026FCDBA,
  258.                 Fuzzbuster = 0x026FCBEC,
  259.                 Gun_Expert = 0x026FCDA8,
  260.                 Gunslinger = 0x026FCD1E,
  261.                 Hacked = 0x026FCC82,
  262.                 Hardpoint_Secure = 0x026FCD84,
  263.                 Headshot = 0x026FCC8E,
  264.                 Hero = 0x026FCBDA,
  265.                 Hijacker = 0x026FCBB0,
  266.                 Hogtied = 0x026FCC3A,
  267.                 Humiliation = 0x026FCCB8,
  268.                 Intercepted = 0x026FCC28,
  269.                 Kaboom = 0x026FCE02,
  270.                 Kill_Chain = 0x026FCDD8,
  271.                 Last_Man_Standing = 0x026FCC5E,
  272.                 Long_Shot = 0x026FCD8A,
  273.                 Mega_Kill = 0x026FCDCC,
  274.                 Merciless = 0x026FCD4E,
  275.                 No_Tip = 0x026FCC40,
  276.                 Nuclear = 0x026FCD66,
  277.                 One_Shot_One_Kill = 0x026FCCD6,
  278.                 Opening_Move = 0x026FCDE4,
  279.                 Pancake = 0x026FCCF4,
  280.                 Playmaker = 0x026FCC70,
  281.                 Quad_Feed = 0x026FCEC2,
  282.                 Raining_Death = 0x026FCE08,
  283.                 Red_Baron = 0x026FCDF6,
  284.                 Regicide_GG = 0x026FCD78,
  285.                 Regicide_SAS = 0x026FCD24,
  286.                 Rejected = 0x026FCC0A,
  287.                 Relentless = 0x026FCD5A,
  288.                 Retrieved = 0x026FCE14,
  289.                 Revenge = 0x026FCE1A,
  290.                 Road_Rage = 0x026FCC22,
  291.                 Ruthless = 0x026FCD54,
  292.                 Savior = 0x026FCCD0,
  293.                 Scrapped = 0x026FCC34,
  294.                 Secure_D = 0x026FCDF0,
  295.                 Secure_HQ = 0x026FCCAC,
  296.                 Shadow_Catcher = 0x026FCBF2,
  297.                 Shared_AGR = 0x026FCE26,
  298.                 Shared_Counter_UAV = 0x026FCE32,
  299.                 Shared_Death_Machine = 0x026FCE38,
  300.                 Shared_Dragon_Fire = 0x026FCE7A,
  301.                 Shared_EMP_Systems = 0x026FCE44,
  302.                 Shared_Escort_Drone = 0x026FCE50,
  303.                 Shared_Guardian = 0x026FCE5C,
  304.                 Shared_Hellstorm_Missile = 0x026FCE86,
  305.                 Shared_Hunter_Killer = 0x026FCE62,
  306.                 Shared_K9_Unit = 0x026FCE3E,
  307.                 Shared_Lightning_Strike = 0x026FCE74,
  308.                 Shared_Lodestar = 0x026FCE8C,
  309.                 Shared_Orbital_VSAT = 0x026FCE92,
  310.                 Shared_RCXD = 0x026FCE80,
  311.                 Shared_Sentry_Gun = 0x026FCE98,
  312.                 Shared_Stealth_Chopper = 0x026FCE4A,
  313.                 Shared_Swarm = 0x026FCE68,
  314.                 Shared_UAV = 0x026FCEA4,
  315.                 Shared_VTOL_Warship = 0x026FCE56,
  316.                 Shared_War_Machine = 0x026FCE6E,
  317.                 Shared_Warthog = 0x026FCE9E,
  318.                 Shield_Bash = 0x026FCD90,
  319.                 Silent_Killer = 0x026FCC94,
  320.                 Skewered = 0x026FCB9E,
  321.                 Stick = 0x026FCEAA,
  322.                 Strength_and_Honor = 0x026FCBC2,
  323.                 Strike_Delivered = 0x026FCDEA,
  324.                 Super_Kill = 0x026FCDC6,
  325.                 Survivor = 0x026FCCE2,
  326.                 Switch_Hitter = 0x026FCD30,
  327.                 Takedown_Bomb = 0x026FCD42,
  328.                 Takedown_Flag = 0x026FCD0C,
  329.                 TKO = 0x026FCC16,
  330.                 Triple_Kill = 0x026FCDB4,
  331.                 Ultra_Kill = 0x026FCDD2,
  332.                 Underdog = 0x026FCD00,
  333.                 Unstoppable = 0x026FCD72,
  334.                 Uppercut = 0x026FCC2E,
  335.                 Victor = 0x026FCEC8,
  336.                 Warbeast = 0x026FCC4C,
  337.                 Wingman = 0x026FCC9A,
  338.                 Wipeout = 0x026FCBB6,
  339.             }
  340.  
  341. //Example:
  342. PS3.SetMemory(Medals.Wipeout, new byte[] { 0x00 });
  343.  
  344.  
  345.  
  346. //G_SetOrigin, G_SetAngles
  347. //Spoiler:
  348.  
  349.  
  350. //G_SetOrigin
  351. //Code:
  352.  
  353.         public static void G_SetOrigin(int gentity, float[] Origin) {
  354.             RPC.Call(0x279698, gentity, Origin); //G_SetOrigin
  355.         }
  356.  
  357. //Code:
  358.  
  359.         public static void G_SetAngles(int gentity, float[] Angles) {
  360.             RPC.Call(0x279D78, gentity, Angles); //G_SetAngles
  361.         }
  362.  
  363.  
  364.  
  365. //G_FreeEntity (Delete Entity)
  366. //Spoiler:
  367.  
  368.  
  369. //Code:
  370.  
  371.         public static void G_FreeEntity(int gentity){
  372.             RPC.Call(0x279140, gentity);
  373.         }
  374.  
  375.  
  376.  
  377. //Scr_PlayFX
  378. //Spoiler:
  379.  
  380.  
  381. //Scr_PlayFX
  382. //Code:
  383.  
  384.         public static void Scr_PlayFX(float[] Origin, int FX) {
  385.             uint i = (uint)RPC.Call(0x279740, Origin, 86); //G_TempEntity
  386.             PS3.Extension.WriteInt32(i + 0xD4, FX);
  387.         } //Thanks to Shark for his Ghosts Scr_PlayFX, which I was able to port to Black Ops 2
  388.  
  389. //G_EffectIndex
  390. //Code:
  391.  
  392.         public static int G_EffectIndex(string FX) {
  393.             return RPC.Call(0x0276978, FX);
  394.         }
  395.  
  396. //Example:
  397. Scr_PlayFX(GetOrigin(0), 12);
  398.  
  399. //Here is a list of FX's for Nuketown which I made ages ago: [Black Ops 2] Nuketown FX List - Pastebin.com
  400.  
  401.  
  402. //G_SpawnHelicopter
  403. //Spoiler:
  404.  
  405.  
  406. //Code:
  407.  
  408.         public static uint G_SpawnHelicopter(uint Owner, string Type, string Model, float[] Origin, float[] Angles) {
  409.             uint Entity = (uint)RPC.Call(0x278C60); //G_Spawn
  410.             Lib.WriteSingle(Entity + 0x134, Origin);
  411.             Lib.WriteSingle(Entity + 0x140, Angles);
  412.             RPC.Call(0x22C558, Entity, Owner, Type, Model); //G_SpawnHelicopter
  413.             return Entity;
  414.         }
  415.  
  416. //Example:
  417. G_SpawnHelicopter(Functions.G_Entity(0), "heli_ai_mp", "veh_t6_air_attack_heli_mp_dark", GetOrigin(0), getViewAngles(0));
  418.  
  419.  
  420.  
  421. //Kick Player
  422. //Spoiler:
  423.  
  424.  
  425. //Code:
  426.  
  427.         public static void KickClient(int Client, string Reason) {
  428.             RPC.SV_GameSendServerCommand(Client, "5 \"\n" + Reason + "\"");
  429.         }
  430.  
  431. //Example:
  432. KickClient(5, "Get the fuck out my lobby mate");
  433.  
  434.  
  435.  
  436. //SV_GameSendServerCommand
  437. //Spoiler:
  438.  
  439.  
  440. //Code:
  441.  
  442.         public static void SV_GameSendServerCommand(int Client, string Command) {
  443.             RPC.Call(0x34A1DC, Client, 1, Command);
  444.         }
  445.  
  446. //Example:
  447. SV_GameSendServerCommand(0, "< \"SV_GameSendServerCommand Test!\""); //Prints "SV_GameSendServerCommand" to the middle of the screen
  448.  
  449.  
  450.  
  451. //CBuf_Addtext
  452. //Spoiler:
  453.  
  454.  
  455. //Code:
  456.  
  457.         public static void CBuf_Addtext(string Command) {
  458.             RPC.Call(0x313E88, 0, Command);
  459.         }
  460.  
  461. //Example:
  462. CBuf_Addtext("party_connectToOthers 0"); //Enables force host
  463.  
  464.  
  465.  
  466. //G_GivePlayerWeapon
  467. //Spoiler:
  468.  
  469.  
  470. //Code:
  471.  
  472.         public static int G_GetWeaponIndexForName(string Weapon) {
  473.             return RPC.Call(0x2A6BE8, Weapon);
  474.         }
  475.  
  476.         public static void G_GivePlayerWeapon(int Client, int Weapon) {
  477.             RPC.Call(0x2A8364, 0x1780F28 + 0x5808 * (uint)Client, Weapon, 0);
  478.         }
  479.  
  480.         public static void G_GivePlayerWeapon(int Client, string Weapon) {
  481.             int WepNum = G_GetWeaponIndexForName(Weapon);
  482.             RPC.Call(0x2A8364, 0x1780F28 + 0x5808 * (uint)Client, WepNum, 0);
  483.         }
  484.  
  485. //Example:
  486. G_GivePlayerWeapon(1, 2); Goto Weapon Index - Pastebin.com for a full list of weapons
  487.  
  488.  
  489.  
  490. //GetHeldWeapon
  491. //Spoiler:
  492.  
  493.  
  494. //Code:
  495.  
  496.         public static int GetHeldWeapon(int Client) {
  497.             return Lib.ReadByte(0x17810E0 + 0x5808 * (uint)Client);
  498.         }
  499.  
  500. //Example:
  501. int HW = GetHeldWeapon(0);
  502.  
  503.  
  504.  
  505. //G_InitializeAmmo
  506. //Spoiler:
  507.  
  508.  
  509. //Code:
  510.  
  511.         public static void G_InitalizeAmmo(int Client) {
  512.             RPC.Call(0x1E6838, 0x16B9F20 + 0x31C * (uint)Client);
  513.         }
  514.  
  515. //Example:
  516. G_InitalizeAmmo(0);
  517.  
  518.  
  519.  
  520. //Add_Ammo
  521. //Spoiler:
  522.  
  523.  
  524. //Code:
  525.  
  526.         public static void Add_Ammo(int Client, int Ammo) {
  527.             RPC.Call(0x208B48, 0x16B9F20 + 0x31C * (uint)Client, GetHeldWeapon(Client), Ammo, Ammo, Ammo, Ammo);
  528.         }
  529.  
  530. //Example:
  531. Add_Ammo(0, 50);
  532.  
  533.  
  534.  
  535. //G_SetModel
  536. //Spoiler:
  537.  
  538.  
  539. //Code:
  540.  
  541.         public static void G_SetModel(int Client, string Model) {
  542.             RPC.Call(Offsets.G_SetModel, 0x16B9F20 + 0x31C * (uint)Client, Model);
  543.         }
  544.  
  545. //Example:
  546. G_SetModel(Client, "defaultactor"); Goto http://pastebin.com/rV41PK1e for a full list of models
  547.  
  548.  
  549.  
  550. IsClientSameTeam
  551. //Spoiler:
  552.  
  553.  
  554. //Code:
  555.  
  556.         public static bool IsClientSameTeam(int Client, int otherPlayer) {
  557.             if (Lib.ReadByte(0x178642C + 0x5808 * (uint)Client) == Lib.ReadByte(0x178642C + 0x5808 * (uint)Client))
  558.                 return true;
  559.             else
  560.                 return false;
  561.         }
  562.  
  563. //Example:
  564. IsClientSameTeam(0, 6);
  565.  
  566.  
  567.  
  568. //IsClientAlive
  569. //Spoiler:
  570.  
  571.  
  572. //Code:
  573.  
  574.         public static bool IsClientAlive(int Client) {
  575.             if (Lib.ReadByte(0x17864F8 + 0x5808 * (uint)Client) == 1)
  576.                 return true;
  577.             else
  578.                 return false;
  579.         }
  580.  
  581. //Example:
  582. IsClientAlive(0);
  583.  
  584.  
  585.  
  586. //RandomCamo
  587. //Spoiler:
  588.  
  589.  
  590. //Code:
  591.  
  592.         public static void RandomCamo(int Client) {
  593.             Random rand = new Random();
  594.             int Camo = rand.Next(0, 43);
  595.             PS3.SetMemory(0x01781203 + 0x5808 * (uint)Client, new byte[] { (byte)Camo });
  596.             PS3.SetMemory(0x017811e7 + 0x5808 * (uint)Client, new byte[] { (byte)Camo });
  597.         }
  598.  
  599. //Example:
  600. RandomCamo(0);
  601.  
  602.  
  603.  
  604. // Jetpack
  605. //Spoiler:
  606.  
  607.  
  608. //Code:
  609.  
  610.         static Thread[] JetpackThread = new Thread[18];
  611.         static bool[] JetpackBool = new bool[18];
  612.         public static void DoJetpack(int Client) {
  613.             if (!JetpackBool[Client]) {
  614.                 JetpackThread[Client] = new Thread(() => Jetpack(Client));
  615.                 JetpackThread[Client].Start();
  616.                 JetpackBool[Client] = true;
  617.             }
  618.             else {
  619.                 JetpackThread[Client].Abort();
  620.                 JetpackBool[Client] = false;
  621.             }
  622.         }
  623.  
  624.         private static void Jetpack(int Client) {
  625.             PS3.Reconnect();
  626.             for(;;) {
  627.                 float num = Lib.ReadSingle(0x1780F28 + 0x28 + 8 + 0x5808 * (uint)Client);
  628.                 if (PS3.Extension.ReadInt32(0x1780F28 + 0x569C + 0x5808 * (uint)Client) == 2097152) {
  629.                     Lib.WriteSingle(0x1780F28 + 0x28 + 8 + 0x5808 * (uint)Client, num + 3);
  630.                 }
  631.             }
  632.         }
  633.  
  634. //Example:
  635. DoJetpack(1); //1 = Client
  636.  
  637.  
  638.  
  639. //Spawn Entity
  640. //Spoiler:
  641.  
  642.  
  643. //Code:
  644.  
  645.  
  646.         public static void SpawnEntity(string Model, float[] Origin, float[] Angles) {
  647.             uint gentitys = (uint)RPC.Call(0x278C60);
  648.             Lib.WriteSingle(gentitys + 0x134, Origin);
  649.             Lib.WriteSingle(gentitys + 0x140, Angles);
  650.             RPC.Call(0x277644, gentitys, Model);
  651.             RPC.Call(0x2670E8, gentitys);
  652.         }
  653.  
  654. //Example:
  655. SpawnEntity("t6_wpn_supply_drop_axis", Origin, Angles);
  656.  
  657.  
  658.  
  659. //Spin Mode
  660. //Spoiler:
  661.  
  662.  
  663. //Code:
  664.  
  665.         public static void setViewAngles(int Client, float[] Angles) {
  666.             Lib.WriteSingle(0x10040000, Angles);
  667.             RPC.Call(0x1E1D90, 0x16B9F20 + 0x31C * (uint)Client, 0x10040000);
  668.         }
  669.  
  670.         public static float[] getViewAngles(int Client) {
  671.             return Lib.ReadSingle(0x1780F28 + 0x56BC + 0x5808 * (uint)Client, 3);
  672.         }
  673.  
  674.         public static bool[] SpinningModeActive = new bool[18];
  675.         private static Thread[] SpinningModeThread = new Thread[18];
  676.         public static void InitSpinningMode(int Client)
  677.         {
  678.             if (!SpinningModeActive[Client])
  679.             {
  680.                 SpinningModeActive[Client] = true;
  681.                 SpinningModeThread[Client] = new Thread(() => SpinningMode(Client));
  682.                 SpinningModeThread[Client].Start();
  683.                 SpinningModeActive[Client] = true;
  684.                 RPC.iPrintln(Client, "Spinning Mode: ^2On");
  685.             }
  686.             else
  687.             {
  688.                 SpinningModeActive[Client] = false;
  689.                 SpinningModeThread[Client].Abort();
  690.                 RPC.iPrintln(Client, "Spinning Mode: ^1Off");
  691.             }
  692.         }
  693.  
  694.         private static void SpinningMode(int Client) {
  695.             PS3.Reconnect();
  696.             for (; ; ) {
  697.                 Single[] Angles = getViewAngles(Client);
  698.                 Angles[1] += 15;
  699.                 setViewAngles(Client, Angles);
  700.                 System.Threading.Thread.Sleep(100);
  701.             }
  702.         }
  703.  
  704. //Example:
  705. InitSpinningMode(1); //1 = Client
  706.  
  707.  
  708.  
  709. //Get Amount of Players in the Game
  710. //Spoiler:
  711.  
  712.  
  713. //Code:
  714.  
  715.         public static int GetPlayerSize() {
  716.             int Num = 0;
  717.             for (int i = 0; i < 18; i++)
  718.                 if (Lib.ReadByte(0x1780F28 + 0x5808 * (uint)i) != 0)
  719.                     Num++;
  720.             return Num;
  721.         }
  722.  
  723. //Example:
  724. int Interger = GetPlayerSize();
  725.  
  726.  
  727.  
  728. //Get Client Name
  729. //Spoiler:
  730.  
  731.  
  732. //Code:
  733.  
  734.         public static string GetClientName(int Client) {
  735.             string players = Lib.ReadString(0x1780F28 + 0x5544 + 0x5808 * (uint)Client);
  736.             if (players == "")
  737.                 return "Not Connected";
  738.             else
  739.                 return players;
  740.         }
  741.  
  742. //Example:
  743. label1.Text = GetClientName(1); //1 = Client
  744.  
  745.  
  746.  
  747. Get Host Number
  748. //Spoiler:
  749.  
  750.  
  751. //Code:
  752.  
  753.         public static int GetHostNumber() {
  754.             int Num = 0;
  755.             string localname = Lib.ReadString(0x26C067F);
  756.             for (int i = 0; i < GetNumPlayers(); i++)
  757.                 if (GetClientName(i) == localname)
  758.                     Num = i;
  759.             return Num;
  760.         }
  761.  
  762. //Example:
  763. int Interger = GetHostNumber();
  764.  
  765.  
  766.  
  767. Get View Angles / Set View Angles
  768. //Spoiler:
  769.  
  770.  
  771. //Code:
  772.  
  773.         public static float[] getViewAngles(int Client) {
  774.             return Lib.ReadSingle(0x1780F28 + 0x56BC + 0x5808 * (uint)Client, 3);
  775.         }
  776.  
  777. //Code:
  778.  
  779.         public static void setViewAngles(int Client, float[] Angles) {
  780.             Lib.WriteSingle(0x10040000, Angles);
  781.             RPC.Call(0x1E1D90, 0x16B9F20 + 0x31C * (uint)Client, 0x10040000);
  782.         }
  783.  
  784. //Example:
  785. float[] Float = getViewAngles(1); //1 = Client
  786. setViewAngles(1, Angles); //1 = Client
  787.  
  788.  
  789.  
  790. /*
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement