Tu masz na flagę H każdy na serwerze ma na flagę H
#include <amxmodx>
#include <codmod>
#include <fakemeta>
#include <cstrike>
#include <csx>
#include <fun>
new const nazwa[] = "Rambo(Premium)";
new const opis[] = "Ma podwojny skok, 20 hp oraz pelen magazynak za kazde zabojstwo";
new const bronie = 1<<CSW_M4A1 | 1<<CSW_AK47 | 1<<CSW_AWP | 1<<CSW_DEAGLE | 1<<CSW_SMOKEGRENADE | 1<<CSW_HEGRENADE | 1<<CSW_FLASHBANG
new const zdrowie = 0;
new const kondycja = 0;
new const inteligencja = 0;
new const wytrzymalosc = 0;
new bool:ma_klase[33];
new bool:moze_skoczyc[33];
new const maxClip[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 };
public plugin_init() {
register_plugin(nazwa, "1.0", "QTM_Peyote");
cod_register_class(nazwa, opis, bronie, zdrowie, kondycja, inteligencja, wytrzymalosc);
register_forward(FM_CmdStart, "CmdStart");
register_event("DeathMsg", "DeathMsg", "ade");
}
public cod_class_enabled(id)
{
if(!(get_user_flags(id) & ADMIN_LEVEL_H))
{
client_print(id, print_chat, "[Rambo] Nie masz uprawnien, aby uzywac tej klasy.")
return COD_STOP;
}
ma_klase[id] = true;
return COD_CONTINUE;
}
public cod_class_disabled(id)
ma_klase[id] = false;
public CmdStart(id, uc_handle)
{
if(!ma_klase[id])
return FMRES_IGNORED;
new button = get_uc(uc_handle, UC_Buttons);
new oldbutton = pev(id, pev_oldbuttons);
new flags = pev(id, pev_flags);
if((button & IN_JUMP) && !(flags & FL_ONGROUND) && !(oldbutton & IN_JUMP) && moze_skoczyc[id])
{
moze_skoczyc[id] = false;
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)
moze_skoczyc[id] = true;
return FMRES_IGNORED;
}
public DeathMsg()
{
new killer = read_data(1);
new victim = read_data(2);
if(!is_user_connected(killer))
return PLUGIN_CONTINUE;
if(ma_klase[victim] && !ma_klase[killer])
cod_set_user_xp(killer, cod_get_user_xp(killer)+35);
if(ma_klase[killer])
{
new cur_health = pev(killer, pev_health);
new Float:max_health = 100.0+cod_get_user_health(killer);
new Float:new_health = cur_health+20.0<max_health? cur_health+20.0: max_health;
set_pev(killer, pev_health, new_health);
new weapon = get_user_weapon(killer);
if(maxClip[weapon] != -1)
set_user_clip(killer, maxClip[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;
}
Nekromanta
![:)](https://amxx.pl/public/style_emoticons/default/smile.png)
#include <amxmodx>
#include <amxmisc>
#include <codmod>
#include <engine>
#include <hamsandwich>
new const nazwa[] = "Nekromanta";
new const opis[] = "Moze wskrzeszac osoby z teamu lub likwidowac ciala przeciwnika";
new const bronie = (1<<CSW_TMP)|(1<<CSW_DEAGLE)|(1<<CSW_MAC10);
new const zdrowie = 20;
new const kondycja = 10;
new const inteligencja = 0;
new const wytrzymalosc = 5;
native cod_add_wskrzes(id, ile);
new ma_klase[33];
public plugin_init()
{
register_plugin(nazwa, "1.0", "amxx.pl");
cod_register_class(nazwa, opis, bronie, zdrowie, kondycja, inteligencja, wytrzymalosc);
RegisterHam(Ham_Spawn, "player", "Spawn", 1);
}
public cod_class_enabled(id)
{
cod_add_wskrzes(id, 1);
ma_klase[id] = true
}
public cod_class_disabled(id)
{
cod_add_wskrzes(id, 0)
ma_klase[id] = false
}
public Spawn(id)
{
if(!is_user_alive(id) || !is_user_connected(id))
return PLUGIN_CONTINUE;
if(ma_klase[id])
cod_add_wskrzes(id, 1)
return PLUGIN_CONTINUE;
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1045\\ f0\\ fs16 \n\\ par }
*/
Cvary: (dopisz do amxx.cfg jak chcesz inne)
cod_revkit_time - Jak długo ma wskrzeszać osobę. Standardowo: 3(sekundy)
cod_revkit_health - Ile ma dać graczowi hp po wskrzeszeniu. Standardowo: 75(hp)
cod_revkit_distance - Z jakiego maksymalnej odległość można wskrzeszać. Standardowo: 100(dystanse)
cod_revkit_xpdefiling - Ile expa ma dawać za 'zjedzenie' przeciwnika. Standardowo: 10(exp)
cod_revkit_xpraise - Ile expa ma dawać za wskrzeszenie osoby ze swojej drużyny. Standardowo: 20(exp)
cod_revkit_hpdefiling - Ile hp ma dawać za 'zjedzenie' przeciwnika. Standardowo: 30(hp)
cod_revkit_ile - Ile osób można wskrzesić na rundę. Standardowo: 10