Advertisement
Guest User

Untitled

a guest
Dec 10th, 2016
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.80 KB | None | 0 0
  1. #include <sourcemod>
  2. #include <sdkhooks>
  3. #include <sdktools>
  4. #include <cstrike>
  5. #include <codmod>
  6.  
  7. new const String:nazwa[] = "Rusher";
  8. new const String:opis[] = "Jest szybki + 1/8 na insta kill z novy";
  9. new const String:bronie[] = "#weapon_nova#weapon_glock";
  10. new const inteligencja = 10;
  11. new const zdrowie = 10;
  12. new const obrazenia = 0;
  13. new const wytrzymalosc = 0;
  14. new const kondycja = 60;
  15.  
  16. bool ma_klase[MAXPLAYERS + 1];
  17.  
  18. public OnPluginStart()
  19. {
  20. CreateConVar(nazwa, "1.0", "Linux`");
  21. CreateTimer(1.6, zaladuj);
  22. }
  23.  
  24. public Action zaladuj(Handle timer)
  25. {
  26. cod_register_class(nazwa, opis, bronie, inteligencja, zdrowie, obrazenia, wytrzymalosc, kondycja);
  27. }
  28.  
  29.  
  30.  
  31. public OnClientPutInServer(client)
  32. {
  33. SDKHook(client, SDKHook_OnTakeDamage, OnTakeDamage);
  34. }
  35.  
  36. public OnClientDisconnect(client)
  37. {
  38. SDKUnhook(client, SDKHook_OnTakeDamage, OnTakeDamage);
  39. }
  40.  
  41. public Action:OnTakeDamage(victim, &attacker, &inflictor, &Float:damage, &damagetype)
  42. {
  43. if(!IsValidClient(victim) || !IsValidClient(attacker))
  44. return Plugin_Continue;
  45.  
  46. if(!ma_klase[attacker] || GetClientTeam(victim) == GetClientTeam(attacker))
  47. return Plugin_Continue;
  48.  
  49.  
  50. //if(cod_get_user_item(victim) == cod_get_itemid("Betonowe Ciało"))
  51. //return Plugin_Continue;
  52. //if(cod_get_user_item(victim) == cod_get_itemid("Betonowa Głowa"))
  53. //return Plugin_Continue;
  54.  
  55. new String:weapon[32];
  56. GetClientWeapon(attacker, weapon, sizeof(weapon));
  57. if(GetRandomInt(1, 1) == 1 && StrEqual(weapon, "weapon_nova") && damagetype & DMG_BULLET)
  58. {
  59. new obrazenia_gracza = GetClientHealth(victim)+1;
  60. cod_inflict_damage(victim, attacker, 0, obrazenia_gracza);
  61. }
  62.  
  63. return Plugin_Changed;
  64. }
  65.  
  66. public cod_class_enabled(client)
  67. {
  68. ma_klase[client] = true;
  69. }
  70.  
  71. public cod_class_disabled(client)
  72. {
  73. ma_klase[client] = false;
  74. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement