Witamy w Nieoficjalnym polskim support'cie AMX Mod X
Witamy w Nieoficjalnym polskim support'cie AMX Mod X, jak w większości społeczności internetowych musisz się zarejestrować aby móc odpowiadać lub zakładać nowe tematy, ale nie bój się to jest prosty proces w którym wymagamy minimalnych informacji.
|
Guest Message by DevFuse
Wklejka 1levrgavw85bo dodana przez Lucjan, 01.06.2015 16:46
1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. 25. 26. 27. 28. 29. 30. 31. 32. 33. 34. 35. 36. 37. 38. 39. 40. 41. 42. 43. 44. 45. 46. 47. 48. 49. 50. 51. 52. 53. 54. 55. 56. 57. 58. 59. 60. 61. 62. 63. 64. 65.
#include <sdktools>
#include <sdkhooks>
#include <sourcemod>
#include <cmod>
new const String:nazwaKlasy[] = "Nemrod";
new const String:opisKlasy[] = "Ma dodatkowe dmg od int z Scout'a";
new const intKlasy = 35;
new const conKlasy = 10;
new const strKlasy = 0;
new const dexKlasy = 5;
new Handle:bronieKlasy;
public Plugin:myinfo = {
name = "CmodClass: Nemrod",
author = "Lucifer",
description = "Ma dodatkowe dmg od int z Scout'a",
version = "1.0",
url = "http://steamcommunity.com/profiles/76561197960680254"
}
public OnPluginStart(){
bronieKlasy = CreateArray(32);
PushArrayString(bronieKlasy, "weapon_ssg08");
PushArrayString(bronieKlasy, "weapon_glock");
Cmod_RegisterClass(nazwaKlasy, opisKlasy, intKlasy, conKlasy, strKlasy, dexKlasy, bronieKlasy);
}
public OnClientPutInServer(id)
{
SDKHook(id, SDKHook_OnTakeDamage, OnTakeDamage);
}
public OnClassEnabled(id)
{
active[id] = true;
}
public OnClassDisabled(id)
{
active[id] = false;
}
public Action:OnTakeDamage(victim, &attacker, &inflictor, &Float:damage, &damagetype)
{
if(!IsValidClient(attacker))
return Plugin_Continue;
if(GetClientTeam(attacker) == GetClientTeam(victim))
return Plugin_Continue;
if(active[attacker]){
decl String:sWeapon[32];
GetClientWeapon(attacker, sWeapon, sizeof(sWeapon));
if(StrEqual(sWeapon, "weapon_ssg08")){
damage += (Float(GetInt(attacker))*1.1);
return Plugin_Changed;
}
}
return Plugin_Continue;
}
Dodanych wklejek: 15354
Powered By (Pav32) Pastebin © 2011


Dodatki SourceMod


