Proszę o naprawę klasy bo nie działa he 1/2
a wiec proszę aby zrobić he 1/2
#include <amxmodx>
#include <hamsandwich>
#include <amxmisc>
#include <codmod>
#include <fun>
#define DMG_BULLET (1<<1)
#define DMG_HEGRENADE (1<<24)
new const nazwa[] = "Kapitan [P MAX]";
new const opis[] = "Klasa premium, ma 1/2 szansy na zabicie z HE i 1/2 z AWP";
new const bronie = (1<<CSW_HEGRENADE)|(1<<CSW_AWP)|(1<<CSW_MP5NAVY);
new const zdrowie = 35;
new const kondycja = 20;
new const inteligencja = 10;
new const wytrzymalosc = 100;
new bool:ma_klase[33];
public plugin_init()
{
register_plugin(nazwa, "1.0", "C@w@ler");
cod_register_class(nazwa, opis, bronie, zdrowie, kondycja, inteligencja, wytrzymalosc);
RegisterHam(Ham_TakeDamage, "player", "TakeDamage");
RegisterHam(Ham_TakeDamage, "player", "TakeDamage1");
}
public cod_class_enabled(id)
{
if(!(get_user_flags(id) & ADMIN_LEVEL_H))
{
client_print(id, print_chat, "[Kapitan [P MAX]] Nie masz uprawnien, aby uzywac tej klasy.")
return COD_STOP;
}
give_item(id, "weapon_hegrenade");
return COD_CONTINUE;
}
public TakeDamage(this, idinflictor, idattacker, Float:damage, damagebits)
{
if(!is_user_connected(idattacker))
return HAM_IGNORED;
if(!ma_klase[idattacker])
return HAM_IGNORED;
if(get_user_team(this) != get_user_team(idattacker) && get_user_weapon(idattacker) == CSW_AWP && damagebits & DMG_BULLET && random_num(1, 2) == 1)
cod_inflict_damage(idattacker, this, float(get_user_health(this))-damage+1.0, 0.0, idinflictor, damagebits);
return HAM_IGNORED;
}
public TakeDamage1(this, idinflictor, idattacker, Float:damage, damagebits)
{
if(!is_user_connected(idattacker))
return HAM_IGNORED;
if(!ma_klase[idattacker])
return HAM_IGNORED;
if(damagebits & DMG_HEGRENADE && get_user_team(this) != get_user_team(idattacker) && random_num(1,2) == 1)
cod_inflict_damage(idattacker, this, float(get_user_health(this))-damage+1.0, 0.0, idinflictor, damagebits);
return HAM_IGNORED;
}
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
![Photo](https://amxx.pl/uploads/profile/photo-thumb-25302.jpg?_r=0)
Naprawa klasy
Started By Milioner, 12.05.2012 08:01
1 reply to this topic
#2
Posted 12.05.2012 09:58
#include <amxmodx> #include <hamsandwich> #include <amxmisc> #include <codmod> #include <fun> #define DMG_BULLET (1<<1) #define DMG_HEGRENADE (1<<24) new const nazwa[] = "Kapitan [P MAX]"; new const opis[] = "Klasa premium, ma 1/2 szansy na zabicie z HE i 1/2 z AWP"; new const bronie = (1<<CSW_HEGRENADE)|(1<<CSW_AWP)|(1<<CSW_MP5NAVY); new const zdrowie = 35; new const kondycja = 20; new const inteligencja = 10; new const wytrzymalosc = 100; new bool:ma_klase[33]; public plugin_init() { register_plugin(nazwa, "1.0", "C@w@ler"); cod_register_class(nazwa, opis, bronie, zdrowie, kondycja, inteligencja, wytrzymalosc); RegisterHam(Ham_TakeDamage, "player", "TakeDamage"); RegisterHam(Ham_TakeDamage, "player", "TakeDamage1"); } public cod_class_enabled(id) { if(!(get_user_flags(id) & ADMIN_LEVEL_H)) { client_print(id, print_chat, "[Kapitan [P MAX]] Nie masz uprawnien, aby uzywac tej klasy.") return COD_STOP; } give_item(id, "weapon_hegrenade"); return COD_CONTINUE; } public TakeDamage(this, idinflictor, idattacker, Float:damage, damagebits) { if(!is_user_connected(idattacker)) return HAM_IGNORED; if(!ma_klase[idattacker]) return HAM_IGNORED; if(get_user_team(this) != get_user_team(idattacker) && get_user_weapon(idattacker) == CSW_AWP && damagebits & DMG_BULLET && random_num(1, 2) == 1) cod_inflict_damage(idattacker, this, float(get_user_health(this))-damage+1.0, 0.0, idinflictor, damagebits); return HAM_IGNORED; } public TakeDamage1(this, idinflictor, idattacker, Float:damage, damagebits) { if(!is_user_connected(idattacker)) return HAM_IGNORED; if(!ma_klase[idattacker]) return HAM_IGNORED; if(get_user_weapon(idattacker) == CSW_HEGRENADE && get_user_team(this) != get_user_team(idattacker) && random_num(1,2) == 1) cod_inflict_damage(idattacker, this, float(get_user_health(this))-damage+1.0, 0.0, idinflictor, damagebits); return HAM_IGNORED; }
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users