Spoiler
#include <amxmodx>
#include <codmod>
#include <hamsandwich>
new const perk_name[] = "Naboje Weterana";
new const perk_desc[] = "Dostajesz 1500 obrazen z kazdej broni";
new bool:ma_perk[33];
public plugin_init()
{
register_plugin(perk_name, "1.0", "QTM_Peyote");
cod_register_perk(perk_name, perk_desc);
RegisterHam(Ham_TakeDamage, "player", "TakeDamage");
}
public cod_perk_enabled(id)
{
ma_perk[id] = true;
}
public cod_perk_disabled(id)
{
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(ma_perk[idattacker])
cod_inflict_damage(idattacker, this, 1500.0, 1.0, idinflictor, damagebits);
return HAM_IGNORED;
}
SpeedHack
Spoiler
#include <amxmodx>
#include <codmod>
new const perk_name[] = "SpeedHack";
new const perk_desc[] = "Dostajesz 8000 speeda";
new bool:ma_perk[33];
public plugin_init()
{
register_plugin(perk_name, "1.0", "QTM_Peyote");
cod_register_perk(perk_name, perk_desc);
}
public cod_perk_enabled(id)
{
ma_perk[id] = true;
cod_set_user_bonus_trim(id, cod_get_user_trim(id, 0, 0)+8000);
}
public cod_perk_disabled(id)
{
ma_perk[id] = false;
cod_set_user_bonus_trim(id, cod_get_user_trim(id, 0, 0)-8000);
}
Nóż komandosa
Spoiler
#include <amxmodx>
#include <amxmisc>
#include <codmod>
#include <fakemeta>
#include <hamsandwich>
#define DMG_BULLET (1<<1)
new const perk_name[] = "Noz Komandosa";
new const perk_desc[] = "Masz 1/1 z kosy (PPM)";
new bool:ma_perk[33];
public plugin_init()
{
register_plugin(perk_name, "1.0", "QTM_Peyote");
cod_register_perk(perk_name, perk_desc);
RegisterHam(Ham_TakeDamage, "player", "TakeDamage");
}
public cod_perk_enabled(id)
{
ma_perk[id] = true;
}
public cod_perk_disabled(id)
{
ma_perk[id] = false;
}
public TakeDamage(this, idinflictor, idattacker, Float:damage, damagebits)
{
if(!is_user_connected(idattacker) || !ma_perk[idattacker])
return HAM_IGNORED
if(get_user_weapon(idattacker) == CSW_KNIFE && pev(idattacker, pev_button) & IN_ATTACK2)
{
SetHamParamFloat(4, float(pev(this, pev_health)))
return HAM_HANDLED
}
return HAM_IGNORED;
}
Tajemnica M3
Spoiler
#include <amxmodx>
#include <amxmisc>
#include <codmod>
#include <hamsandwich>
new const perk_name[] = "Tajemnica m3";
new const perk_desc[] = "Dostajesz M3 i masz 1/4 z niej";
new bool:ma_perk[33];
new zygfryd[33][31]
public plugin_init()
{
register_plugin(perk_name, "1.0", "QTM_Peyote");
cod_register_perk(perk_name, perk_desc);
}
public cod_perk_enabled(id)
{
ma_perk[id] = true;
cod_give_weapon(id, CSW_M3);
zygfryd[id][CSW_M3] = 4
}
public cod_perk_disabled(id)
{
ma_perk[id] = false;
cod_take_weapon(id, CSW_M3);
zygfryd[id][CSW_M3] = 0
}
public TakeDamage(this, idinflictor, idattacker, Float:damage, damagebits)
{
if(!is_user_connected(idattacker))
return HAM_IGNORED;
if(!ma_perk[idattacker])
return HAM_IGNORED;
if(!(damagebits & (1<<1)))
return HAM_IGNORED;
new hp_ofiary = get_user_health(this)
new bron_atakujacego = get_user_weapon(idattacker)
if (zygfryd[idattacker][bron_atakujacego] > 0)
{
if (random_num(1,zygfryd[idattacker][bron_atakujacego]) == 1) cod_inflict_damage(idattacker, this, float(hp_ofiary), 0.0, idinflictor, damagebits);
}
return HAM_IGNORED;
}
Dostajesz 5 skoków
Spoiler
#include <amxmodx>
#include <amxmisc>
#include <codmod>
#include <fakemeta>
new const perk_name[] = "brak nazwy";
new const perk_desc[] = "Dostajesz 5 skokow";
new skoki[33];
new ma_perk[33];
public plugin_init()
{
register_plugin(perk_name, "1.0", "amxx.pl");
cod_register_perk(perk_name, perk_desc);
register_forward(FM_CmdStart, "fwCmdStart_MultiJump");
}
public cod_class_enabled(id)
{
ma_perk[id] = true;
}
public cod_class_disabled(id)
{
ma_perk[id] = false;
}
public fwCmdStart_MultiJump(id, uc_handle)
{
if(!is_user_alive(id) || !ma_perk[id])
return FMRES_IGNORED;
new flags = pev(id, pev_flags);
if((get_uc(uc_handle, UC_Buttons) & IN_JUMP) && !(flags & FL_ONGROUND) && !(pev(id, pev_oldbuttons) & IN_JUMP) && skoki[id])
{
skoki[id]--;
new Float:velocity[3];
pev(id, pev_velocity,velocity);
velocity[2] = random_float(265.0,285.0);
set_pev(id, pev_velocity,velocity);
}
else if(flags & FL_ONGROUND)
skoki[id] = 4;
return FMRES_IGNORED;
}
Duch
Spoiler
#include <amxmodx>
#include <codmod>
#include <fakemeta>
#include <ColorChat>
#define CZAS_NOCLIP 8
new const nazwa[] = "Duch";
new const opis[] = "Przenikanie przez ściany (8sek)";
new bool:uzyl[33];
new msg_bartime;
public plugin_init()
{
register_plugin(nazwa, "1.0", "QTM_Peyote");
cod_register_perk(nazwa, opis);
register_event("ResetHUD", "ResetHUD", "abe");
msg_bartime = get_user_msgid("BarTime");
}
public cod_perk_enabled(id)
{
uzyl[id] = false;
}
public cod_perk_used(id)
{
if(!is_user_alive(id))
return PLUGIN_CONTINUE;
if(uzyl[id])
{
ColorChat(id, RED, "Juz wykorzystales perk!");
return PLUGIN_CONTINUE;
}
set_pev(id, pev_movetype, MOVETYPE_NOCLIP);
set_bartime(id, CZAS_NOCLIP);
set_task(CZAS_NOCLIP.0, "WylaczNoclip", id);
uzyl[id] = true;
return PLUGIN_CONTINUE;
}
public ResetHUD(id)
uzyl[id] = false;
public WylaczNoclip(id)
{
if(!is_user_connected(id))
return;
set_pev(id, pev_movetype, MOVETYPE_WALK);
new Float:origin[3];
pev(id, pev_origin, origin);
if (!is_hull_vacant(origin, pev(id, pev_flags) & FL_DUCKING ? HULL_HEAD : HULL_HUMAN, id))
user_silentkill(id);
}
stock bool:is_hull_vacant(const Float:origin[3], hull,id)
{
static tr;
engfunc(EngFunc_TraceHull, origin, origin, 0, hull, id, tr)
if (!get_tr2(tr, TR_StartSolid) || !get_tr2(tr, TR_AllSolid))
return true;
return false;
}
public set_bartime(id, czas)
{
message_begin(MSG_ONE, msg_bartime, _, id);
write_short(czas);
message_end();
}
Zostało do zrobienia:
6.Brak nazwy masz 1/x na oślepienie wroga na 10 sekund
7.Niewidzialny jesteś niewidzialny przez 7 sekund
9.Brak nazwy masz 1/1 na odrodzenie się ,ale możesz tylko raz na rundę .
10.brak nazwy dostajesz 3 paki które mozesz położyć na ziemi,i zdetonować .