Plik Sma:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <codmod>
#include <engine>
#include <hamsandwich>
#define DMG_BULLET (1<<1)
new bool:ma_klase[33];
new const nazwa[] = "HedMaster";
new const opis[] = "Natychmiastowe zabicie z Shotgun'a";
new const bronie = 1<<CSW_M3;
new const zdrowie = 50;
new const kondycja = 30;
new const inteligencja = 5;
new const wytrzymalosc = 10;
public plugin_init()
{
register_plugin(nazwa, "1.0", "Skowron");
cod_register_class(nazwa, opis, bronie, zdrowie, kondycja, inteligencja, wytrzymalosc);
RegisterHam(Ham_TakeDamage, "player", "TakeDamage");
}
public cod_class_enabled(id)
{
client_print(id, print_chat, "[%s] Klasa stworzona przez www.cslimanowa.xxa.pl.", nazwa)
if(!(get_user_flags(id) & ADMIN_LEVEL_E))
{
client_print(id, print_chat, "[%s] Nie masz uprawnien, aby uzywac tej klasy.", nazwa)
return COD_STOP;
}
ma_klase[id] = true;
return COD_CONTINUE;
}
public cod_class_disabled(id)
ma_klase[id] = false;
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_weapon(idattacker) == CSW_M3 && damagebits & DMG_BULLET && damage > 20.0)
cod_inflict_damage(idattacker, this, float(get_user_health(this))-damage+1.0, 0.0, idinflictor, damagebits);
return HAM_IGNORED;
}
W tej klasie prosilbym o zmienienie na 1/3 szansy na zabranie perku swojej ofierze
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <codmod>
#include <engine>
#include <colorchat>
new const nazwa[] = "[Premium]Zlodziej";
new const opis[] = "Ma zmniejszona widocznosc oraz 1/2 szansy na zabranie perku swojej ofierze";
new const bronie = 1<<CSW_GALIL | 1<<CSW_FLASHBANG | 1<<CSW_HEGRENADE;
new const zdrowie = 15;
new const kondycja = 30;
new const inteligencja = 15;
new const wytrzymalosc = 0;
new bool:ma_klase[33];
new ofiara[33], perk_ofiary[33], wartosc_perku_ofiary[33];
public plugin_init() {
register_plugin(nazwa, "1.0", "QTM_Peyote");
cod_register_class(nazwa, opis, bronie, zdrowie, kondycja, inteligencja, wytrzymalosc);
register_event("DeathMsg", "DeathMsg", "ade");
}
public cod_class_enabled(id)
{
if(!(get_user_flags(id) & ADMIN_LEVEL_H))
{
client_print(id, print_chat, "[%s] Nie masz uprawnien, aby uzywac tej klasy.", nazwa)
return COD_STOP;
}
ma_klase[id] = true;
return COD_CONTINUE;
}
public cod_class_disabled(id)
{
set_rendering(id,kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha, 255);
ma_klase[id] = false;
}
public DeathMsg()
{
new killer = read_data(1);
new victim = read_data(2);
if(!is_user_connected(killer))
return;
if(!ma_klase[killer])
return;
if(random(2))
return;
if(!(perk_ofiary[killer] = cod_get_user_perk(victim, wartosc_perku_ofiary[killer])))
return;
ofiara[killer] = victim;
Zapytaj(killer);
}
public Zapytaj(id)
{
new tytul[55];
new nazwa_perku[33];
cod_get_perk_name(perk_ofiary[id], nazwa_perku, 32);
format(tytul, 54, "Czy chcesz ukrasc perk: %s ?", nazwa_perku);
new menu = menu_create(tytul, "Zapytaj_Handle");
menu_additem(menu, "Tak");
menu_setprop(menu, MPROP_EXITNAME, "Nie");
menu_display(id, menu);
}
public Zapytaj_Handle(id, menu, item)
{
if(item)
return;
if(cod_get_user_perk(ofiara[id]) != perk_ofiary[id])
return;
new nick_zlodzieja[33];
get_user_name(id, nick_zlodzieja, 32);
ColorChat(ofiara[id], RED, "Twoj perk zostal skradziony przez %s.", nick_zlodzieja);
cod_set_user_perk(ofiara[id], 0);
cod_set_user_perk(id, perk_ofiary[id], wartosc_perku_ofiary[id]);
}
Użytkownik gunner98 edytował ten post 24.04.2012 10:24