Nazwa Klasy: Rusher
Inteligencja: 0
Zycie: 25
Wytrzymalosc: 0
Kondycja: 50
Bronie: m3,usp
Opis: 1/7 z m3, pelen magazynek za zabicie
Z gory dzięki
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.
|
Napisano 19.04.2014 21:22
Nazwa Klasy: Rusher
Inteligencja: 0
Zycie: 25
Wytrzymalosc: 0
Kondycja: 50
Bronie: m3,usp
Opis: 1/7 z m3, pelen magazynek za zabicie
Z gory dzięki
GG: 47535977
Napisano 19.04.2014 22:50
#include <amxmodx> #include <codmod> #include <fakemeta> #include <hamsandwich> #define DMG_BULLET (1<<1) new const nazwa[] = "Rusher"; new const opis[] = "1/7 z m3, pelen magazynek za zabicie"; new const bronie = (1<<CSW_M3); new const zdrowie = 25; new const kondycja = 50; new const inteligencja = 0; new const wytrzymalosc = 0; new const max_clip[31] = { -1, 13, -1, 10, 1, 7, 1, 30, 30, 1, 30, 20, 25, 30, 35, 25, 12, 20, 10, 30, 100, 8, 30, 30, 20, 2, 7, 30, 30, -1, 50 }; new ma_klase[33]; public plugin_init() { register_plugin(nazwa, "1.0", "amxx.pl"); cod_register_class(nazwa, opis, bronie, zdrowie, kondycja, inteligencja, wytrzymalosc); register_event("DeathMsg", "Death", "a"); } public cod_class_enabled(id) { ma_klase[id] = true; } public cod_class_disabled(id) { ma_klase[id] = false; } public Death() { new attacker = read_data(1); if(!is_user_connected(attacker)) return PLUGIN_CONTINUE; if(ma_klase[attacker]) { new weapon = get_user_weapon(attacker); if(max_clip[weapon] > 0) set_user_clip(attacker, max_clip[weapon]); } return PLUGIN_CONTINUE; } stock set_user_clip(id, ammo) { new weaponname[32], weaponid = -1, weapon = get_user_weapon(id, _, _); get_weaponname(weapon, weaponname, 31); while ((weaponid = engfunc(EngFunc_FindEntityByString, weaponid, "classname", weaponname)) != 0) if (pev(weaponid, pev_owner) == id) { set_pdata_int(weaponid, 51, ammo, 4); return weaponid; } return 0; } public TakeDamage(this, idinflictor, idattacker, Float:damage, damagebits) { if(!is_user_connected(idattacker)) return HAM_IGNORED; if(!ma_klase[idattacker]) return HAM_IGNORED; if(damagebits & DMG_BULLET) { new weapon = get_user_weapon(idattacker); if(weapon == CSW_M3 && damage > 20.0 && random_num(1,7) == 1) cod_inflict_damage(idattacker, this, float(get_user_health(this))-damage+1.0, 0.0, idinflictor, damagebits); } return HAM_IGNORED; }
Nie jestem pewny czy zadziała
Napisano 19.04.2014 23:32
#include <amxmodx>
#include <codmod>
#include <fakemeta>
#include <hamsandwich>
#define DMG_BULLET (1<<1)
new const nazwa[] = "Rusher";
new const opis[] = "1/7 z m3, pelen magazynek za zabicie";
new const bronie = (1<<CSW_USP)|(1<<CSW_M3);
new const zdrowie = 25;
new const kondycja = 50;
new const inteligencja = 0;
new const wytrzymalosc = 0;
new const max_clip[31] = { -1, 13, -1, 10, 1, 7, 1, 30, 30, 1, 30, 20, 25, 30, 35, 25, 12, 20,
10, 30, 100, 8, 30, 30, 20, 2, 7, 30, 30, -1, 50 };
new ma_klase[33];
public plugin_init()
{
register_plugin(nazwa, "1.0", "amxx.pl");
cod_register_class(nazwa, opis, bronie, zdrowie, kondycja, inteligencja, wytrzymalosc);
register_event("DeathMsg", "Death", "a");
}
public cod_class_enabled(id)
{
ma_klase[id] = true;
}
public cod_class_disabled(id)
{
ma_klase[id] = false;
}
public Death()
{
new attacker = read_data(1);
if(!is_user_connected(attacker))
return PLUGIN_CONTINUE;
if(ma_klase[attacker])
{
new weapon = get_user_weapon(attacker);
if(max_clip[weapon] > 0)
set_user_clip(attacker, max_clip[weapon]);
}
return PLUGIN_CONTINUE;
}
stock set_user_clip(id, ammo)
{
new weaponname[32], weaponid = -1, weapon = get_user_weapon(id, _, _);
get_weaponname(weapon, weaponname, 31);
while ((weaponid = engfunc(EngFunc_FindEntityByString, weaponid, "classname", weaponname)) != 0)
if (pev(weaponid, pev_owner) == id) {
set_pdata_int(weaponid, 51, ammo, 4);
return weaponid;
}
return 0;
}
public TakeDamage(this, idinflictor, idattacker, Float:damage, damagebits)
{
if(!is_user_connected(idattacker))
return HAM_IGNORED;
if(!ma_klase[idattacker])
return HAM_IGNORED;
if(damagebits & DMG_BULLET)
{
new weapon = get_user_weapon(idattacker);
if(weapon == CSW_M3 && damage > 20.0 && random_num(1,7) == 1)
cod_inflict_damage(idattacker, this, float(get_user_health(this))-damage+1.0, 0.0, idinflictor, damagebits);
}
return HAM_IGNORED;
}
Zadziala na 100%.
CoD Nowy
Moc Medyka - problemPugin mocmedyka włącza się w klasie w której nie powinien Napisany przez scythe1, 09.02.2023 ![]() |
|
![]() |
|||
![]() |
Klasa
[ROZWIĄZANE] poźba o klase odrodzenieNapisany przez Anonimowy09, 03.02.2023 ![]() |
|
![]() |
||
Klasa
Poszukuje KlasNapisany przez Aquamarina, 03.01.2023 ![]() |
|
![]() |
|||
![]() |
Klasa
[KOSZ] klasaklasa Napisany przez Anonimowy09, 30.12.2022 ![]() |
|
![]() |
||
![]() |
Klasa
[KOSZ] klasaklasa Napisany przez Anonimowy09, 30.12.2022 ![]() |
|
![]() |
0 użytkowników, 0 gości, 0 anonimowych