Pompa Rodowitej
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <hamsandwich>
#include <fun>
#include <codmod>
#define DMG_BULLET (1<<1)
new const perk_name[] = "Pompa Rodowitej";
new const perk_desc[] = "1/2 z m3";
new bool:ma_perk[33];
new wartosc_perku[33];
public plugin_init()
{
register_plugin(perk_name, "1.0", "QTM_Peyote");
cod_register_perk(perk_name, perk_desc, 2, 2);
RegisterHam(Ham_TakeDamage, "player", "TakeDamage");
}
public cod_perk_enabled(id, wartosc)
{
cod_give_weapon(id, CSW_M3);
wartosc_perku[id] = wartosc;
ma_perk[id] = true;
}
public cod_perk_disabled(id)
{
cod_take_weapon(id, CSW_M3);
ma_perk[id] = false;
}
public TakeDamage(this, idinflictor, idattacker, Float:damage, damagebits)
{
if(!is_user_connected(idattacker))
return HAM_IGNORED;
if(!ma_perk[idattacker])
return HAM_IGNORED;
if(get_user_team(this) == get_user_team(idattacker))
return HAM_IGNORED;
if(get_user_weapon(idattacker) != CSW_M3)
return HAM_IGNORED;
if(!(damagebits & DMG_BULLET))
return HAM_IGNORED;
if(random(wartosc_perku[idattacker]))
return HAM_IGNORED;
cod_inflict_damage(idattacker, this, float(get_user_health(this))-damage+1.0, 0.0, idinflictor, damagebits);
return HAM_IGNORED;
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1045\\ f0\\ fs16 \n\\ par }
*/
Użytkownik SzalonyKrejzol edytował ten post 04.05.2013 19:13