SynonymousZ-Scripts

Aiminfo v1.0

Jul 20th, 2014
248
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.49 KB | None | 0 0
  1. //AimInfo FilterScript by SynonymousZ CopyRight entfernen = schlechtes Gewissen!
  2. #include <a_samp>
  3. enum wskill{
  4. wHits,
  5. wShots,
  6. wAmmo
  7. };
  8. new WeapSkills[MAX_PLAYERS][17][wskill];
  9. stock const wName[][]=
  10. {
  11. {"Colt 45 "}, // 22
  12. {"Colt 45 (Silenced) "}, // 23
  13. {"Desert Eagle "}, // 24
  14. {"Normal Shotgun "}, // 25
  15. {"Sawnoff Shotgun "}, // 26
  16. {"Combat Shotgun "}, // 27
  17. {"Micro Uzi (Mac 10) "}, // 28
  18. {"MP5 "}, // 29
  19. {"AK47 "}, // 30
  20. {"M4 "}, // 31
  21. {"Tec9 "}, // 32
  22. {"Country Rifle "}, // 33
  23. {"Sniper Rifle "}, // 34
  24. {"Rocket Launcher "}, // 35
  25. {"Heat-Seeking Rocket Launcher "}, // 36
  26. {"Flamethrower "}, // 37
  27. {"Minigun "} // 38
  28. };
  29. public OnFilterScriptInit()
  30. {
  31. print("AimInfo geladen. Yey! :) ");
  32. return 1;
  33. }
  34.  
  35. public OnPlayerUpdate(playerid)
  36. {
  37. new Ammo;
  38. new Waffe;
  39. for(new i; i != 11; i++)
  40. {
  41. GetPlayerWeaponData(playerid, i, Waffe, Ammo);
  42. if(!IsValidWaffe(Waffe))continue;
  43. if(Ammo > WeapSkills[playerid][Waffe-22][wAmmo])WeapSkills[playerid][Waffe-22][wAmmo] = Ammo;
  44. if(Ammo < WeapSkills[playerid][Waffe-22][wAmmo])
  45. {
  46. WeapSkills[playerid][Waffe-22][wAmmo] --;
  47. WeapSkills[playerid][Waffe-22][wShots] ++;
  48. }
  49. }
  50. return 1;
  51. }
  52. public OnPlayerCommandText(playerid, cmdtext[])
  53. {
  54. if(strcmp("/w", cmdtext, true) == 0)
  55. {
  56. WeapSkills[playerid][31-22][wAmmo] = 500;//Muss nicht, da es automatisch auch gesetzt wird.
  57. GivePlayerWeapon(playerid, 31, 500);
  58. WeapSkills[playerid][24-22][wAmmo] = 200;
  59. GivePlayerWeapon(playerid, 24, 200);
  60. return 1;
  61. }
  62. if(strcmp("/wpd", cmdtext, true) == 0)
  63. {
  64. new string[2000];
  65. new HS[17];
  66. for(new i; i!=39; i++)
  67. {
  68. if(!IsValidWaffe(i))continue;
  69. if(WeapSkills[playerid][i-22][wShots])HS[i-22] = floatround((100.0 / WeapSkills[playerid][i-22][wShots])*WeapSkills[playerid][i-22][wHits]);
  70. format(string, sizeof string, "%s\n{00FFFF}%s|\t{FF3800}%d %% {FFFFFF}Hits {828282}(Schüsse: %d / Treffer: %d)", string, wName[i-22], HS[i-22], WeapSkills[playerid][i-22][wShots], WeapSkills[playerid][i-22][wHits]);
  71. }
  72. ShowPlayerDialog(playerid, 1111, DIALOG_STYLE_LIST, "WaffenSkills", string, "OK","");
  73. return 1;
  74. }
  75. return 0;
  76. }
  77.  
  78. public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
  79. {
  80. if(issuerid != INVALID_PLAYER_ID)
  81. {
  82. if(!IsValidWaffe(weaponid))return 1;
  83. WeapSkills[issuerid][weaponid-22][wHits] ++;
  84. }
  85. return 1;
  86. }
  87.  
  88. IsValidWaffe(id)
  89. {
  90. if(id > 21 && id < 39)return 1;
  91. return 0;
  92. }
Advertisement
Add Comment
Please, Sign In to add comment