#include <amxmodx>
#include <cstrike>
#include <amxmisc>
#include <codmod>
#include <fakemeta>
#include <hamsandwich>
new bool:ma_klase[33];
new const nazwa[] = "Agent";
new const opis[] = "ma ubranie wroga, 10 hp za killa, na +20 lvl 20hp za killa";
new const bronie = (1<<CSW_M4A1);
new const zdrowie = 0;
new const kondycja = 0;
new const inteligencja = 0;
new const wytrzymalosc = 0;
new CT_Skins[4][] = {"sas","gsg9","urban","gign"};
new Terro_Skins[4][] = {"arctic","leet","guerilla","terror"};
public plugin_init()
{
register_plugin(nazwa, "1.0", "amxx.pl");
cod_register_class(nazwa, opis, bronie, zdrowie, kondycja, inteligencja, wytrzymalosc);
register_event("DeathMsg", "DeathMsg", "ade");
RegisterHam(Ham_TakeDamage, "player", "TakeDamage");
}
public cod_class_enabled(id)
{
ZmienUbranie(id, 0);
ma_klase[id] = true;
}
public cod_class_disabled(id)
{
ZmienUbranie(id, 1);
ma_klase[id] = false;
}
public ZmienUbranie(id,reset)
{
if (!is_user_connected(id))
return PLUGIN_CONTINUE;
if (reset)
cs_reset_user_model(id);
else
{
new num = random_num(0,3);
cs_set_user_model(id, (get_user_team(id) == 1)? CT_Skins[num]: Terro_Skins[num]);
}
return PLUGIN_CONTINUE;
}
public DeathMsg()
{
new killer = read_data(1);
new victim = read_data(2);
if(!is_user_connected(killer))
return PLUGIN_CONTINUE;
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+10.0<max_health? cur_health+10.0: max_health;
set_pev(killer, pev_health, new_health);
}
return PLUGIN_CONTINUE;
}
public TakeDamage(this, idinflictor, idattacker, Float:damage, damagebits)
{
if(!is_user_connected(idattacker))
return HAM_IGNORED;
if(!ma_klase[idattacker])
return HAM_IGNORED;
return HAM_IGNORED;
}
Witamy w Nieoficjalnym polskim support'cie AMX Mod X
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.
|
Guest Message by DevFuse

1 odpowiedź w tym temacie
#1
Napisano 24.02.2013 12:40
mam problem, chciałem zrobić żeby dana klasa miała 10 hp za killa do 20 lvl, a później już 20 hp, http://amxx.pl/topic...od-pewnego-lvl/ w tym temacie jest jak to zrobić na innej klasie, ale ja nie wiem jak to zrobić w mojej... oto sma
#2
Napisano 24.02.2013 19:15
Zamiast:
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+10.0<max_health? cur_health+10.0: max_health; set_pev(killer, pev_health, new_health); } return PLUGIN_CONTINUE;Daj:
if(ma_klase[killer]) { new Float: zycie_dodane=10.0; if(cod_get_user_level(killer)>=20) zycie_dodane+=10.0 new cur_health = pev(killer, pev_health); new Float:max_health = 100.0+cod_get_user_health(killer); new Float:new_health = cur_health+zycie_dodane<max_health? cur_health+zycie_dodane: max_health; set_pev(killer, pev_health, new_health); } return PLUGIN_CONTINUE;
Również z jednym lub większą ilością słów kluczowych: cod nowy
Paczka perkow.perki Napisany przez NAVIK, 24.03.2025 ![]() |
|
![]() |
|||
CoD Nowy
Plugin na małe mapy.Napisany przez NAVIK, 16.02.2025 ![]() |
|
![]() |
|||
CoD Nowy
Dodatkowe, osobne trzy linie opisu klasNapisany przez Rafii, 27.01.2025 ![]() |
|
![]() |
|||
CoD Nowy
problem z kompilacjaNapisany przez Anonimowy09, 21.01.2025 ![]() |
|
![]() |
|||
CoD Nowy
problem z HUDNapisany przez Anonimowy09, 10.01.2025 ![]() |
|
![]() |
Użytkownicy przeglądający ten temat: 1
0 użytkowników, 1 gości, 0 anonimowych