iAmHooker

AC130

Nov 22nd, 2012
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.25 KB | None | 0 0
  1. typedef int (*BG_GetViewmodelWeaponIndex)(int ps);// Offset: 820E23C8
  2. typedef void(*BG_TakePlayerWeapon)(int ps, int weaponIndex,int takeAwayAmmo);// Offset: 822109B8
  3. typedef unsigned int (*G_GetClientState)(int clientNum);// Offset : 821E6638
  4. typedef void (*giveWeapon_t)(uint clientNum, int Wid,int asd,int Akimbo);
  5. typedef int (*getWeaponId_t)(const char * name);
  6. typedef void (*AddAmmo_t)(uint gentity, unsigned int weaponIndex, char weaponModel, int count, int fillClip);
  7. typedef void (*SV_GameSendServerCommand_t)(int clientNum, int type, const char *text);
  8. typedef unsigned int uint;
  9. BG_GetViewmodelWeaponIndex WID = (BG_GetViewmodelWeaponIndex)0x820E23C8;
  10. BG_TakePlayerWeapon TPW = (BG_TakePlayerWeapon)0x822109B8;
  11. giveWeapon_t giveWeapons = (giveWeapon_t)0x82210B58;
  12.  
  13. uint getPlayerState(int clientIndex)
  14. {
  15. return GCS(Client);
  16. }
  17. uint getEntity(int clientIndex)
  18. {
  19. return (0x82F03600 + ((uint)clientIndex * 0x280));
  20. }
  21. int GetWeapId(const char *Name)
  22. {
  23. getWeaponId_t getWeaponId = (getWeaponId_t)0x822105D0;
  24. return getWeaponId(Name);
  25. }
  26. void sendSV(int ClientIndex,const char *Text)
  27. {
  28. SV_GameSendServerCommand_t sendcmd = (SV_GameSendServerCommand_t)0x822548C8;
  29. sendcmd(ClientIndex,1,Text);
  30. }
  31. void giveWeapon2(int ClientIndex,int WID)
  32. {
  33. giveWeapons(getPlayerState(ClientIndex),WID,0,0);
  34. AddAmmo(ClientIndex,WID);
  35. }
  36. void AddAmmo(int ClientIndex,int WIndex)
  37. {
  38. AddAmmo_t AddAmmo_s = (AddAmmo_t)0x821E1F20;
  39. AddAmmo_s(getEntity(ClientIndex),WIndex,0,100,1);
  40. }
  41.  
  42. //Add this into a void //Client is for a int for ClientIndex
  43. TPW(getPlayerState(Client),WID(getPlayerState(Client)),1);sendSV(Client,"a 3216 1");
  44. TPW(getPlayerState(Client),WID(getPlayerState(Client)),1);sendSV(Client,"a 3216 1");
  45. TPW(getPlayerState(Client),WID(getPlayerState(Client)),1);sendSV(Client,"a 3216 1");
  46. TPW(getPlayerState(Client),WID(getPlayerState(Client)),1);sendSV(Client,"a 3216 1");
  47. TPW(getPlayerState(Client),WID(getPlayerState(Client)),1);sendSV(Client,"a 3216 1");
  48. giveWeapon2(Client,GetWeapId("ac130_105mm_mp"));
  49. giveWeapon2(Client,GetWeapId("ac130_40mm_mp"));
  50. giveWeapon2(Client,GetWeapId("ac130_25mm_mp"));
Add Comment
Please, Sign In to add comment