Witam klasa nie chce się przekompilować gdzie są błędy ?
Spoiler
#include
#include
#include
#include
#include
#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "Wach"
#define DMG_BULLET (1<<1)
new const nazwa[] = "Koxu[Premium]";
new const opis[] = "Famas +20 dmg z 1/3 na zadanie potrojnych obrazen 1/5 na oslepienie wroga 2 skoki";
new const bronie = (1<new const zdrowie = 0;
new const kondycja = 20;
new const inteligencja = 0;
new const wytrzymalosc = 0;
new skoki[33];
new g_msg_screenfade;
new bool: ma_klase[33];
new ma_klase[33];
public plugin_init()
{
register_plugin(nazwa, "1.0", "amxx.pl");
cod_register_class(nazwa, opis, bronie, zdrowie, kondycja, inteligencja, wytrzymalosc);
register_forward(FM_CmdStart, "fwCmdStart_MultiJump");
RegisterHam(Ham_TakeDamage, "player", "TakeDamage");
RegisterHam(Ham_TakeDamage, "player", "DMG");
register_event("Damage", "Damage", "b", "2!=0");
g_msg_screenfade = get_user_msgid("ScreenFade");
register_plugin(PLUGIN, VERSION, AUTHOR)
}
public cod_class_enabled(id)
{
if(!(get_user_flags(id) & ADMIN_LEVEL_H))
{
client_print(id, print_chat, "[Koxu[Premium]] 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 fwCmdStart_MultiJump(id, uc_handle)
{
if(!is_user_alive(id) || !ma_klase[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] = 2;
return FMRES_IGNORED;
}
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_FAMAS && damagebits & DMG_BULLET)
cod_inflict_damage(idattacker, this, 20.0, 0.0, idinflictor, damagebits);
return HAM_IGNORED;
public DMG(this, idinflictor, idattacker, Float:damage, damagebits,wartosc){
if(!is_user_connected(idattacker))
return HAM_IGNORED;
if(!ma_klase[idattacker])
return HAM_IGNORED;
if(!is_user_connected(this))
return HAM_IGNORED;
if(get_user_team(this)==get_user_team(idattacker))
return HAM_IGNORED;
if(damage<=0)
return HAM_IGNORED;
if(random_num(1, 3)!=1)
return HAM_IGNORED;
cod_inflict_damage(idattacker, this, damage*3.0, 0.0, idinflictor, damagebits);
return HAM_IGNORED;
}
public Damage(id)
{
new attacker = get_user_attacker(id);
if(!is_user_alive(attacker) || !is_user_connected(attacker) || id == attacker)
return PLUGIN_CONTINUE;
if(ma_klase[attacker] && !random(5))
Display_Fade(id,1<<14,1<<14 ,1<<16,0,155,0,245);
return PLUGIN_CONTINUE;
}
stock Display_Fade(id,duration,holdtime,fadetype,red,green,blue,alpha)
{
message_begin( MSG_ONE, g_msg_screenfade,{0,0,0},id );
write_short( duration ); // Duration of fadeout
write_short( holdtime ); // Hold time of color
write_short( fadetype ); // Fade type
write_byte ( red ); // Red
write_byte ( green ); // Green
write_byte ( blue ); // Blue
write_byte ( alpha ); // Alpha
message_end();
}
Użytkownik KosiKledki edytował ten post 17.01.2015 16:09