Mam problem i pewnie go sam sobie go stworzyłem przy dodwaniu jakiejś funkcji lub usunięciu.
Chodzi o klase z mojego Diablomoda gdzie w klasie Merial jest skill Piorun.
Gdy dostanie pierwszy item skill działa.Jednak gdy się wyrzuci item i dostanie drugi (obojętnie jaki) to skill na tej klasie przestaje działać.
Czy możeie pomóc??
Spoiler
if (pev(id,pev_button) & IN_RELOAD) Uzyj_Przycisk_R(id)
if( get_user_button(id) & IN_USE && !(get_user_oldbutton(id) & IN_USE) && is_user_alive(id))
{
if (on_knife[id])
{
if((g_PreThinkDelay[id] + 0.28) < get_gametime())
{
switch(player_class[id])
{
case Merial:piorun(id)
case Bard:kula1(id)
case Pred:predator1(id)
}
}
}
}
case 1:
{
player_class[id] = Merial
g_piorun[id] = 1
c_jump[id] = 2
c_lecz[id] = 14
LoadXP(id, player_class[id])
set_task(4.0, "dajuzdrow", id)
}
public piorun(id)
{
if (g_piorun[id]>0 && freeze_ended && is_user_alive(id))
{
new xd = floatround(halflife_time()-wait1[id])
new czas = 15-xd
if (halflife_time()-wait1[id] <= 15)
{
client_print(id, print_center, "Za %d sek mozesz uzyc mocy!", czas)
return PLUGIN_CONTINUE;
}
else {
//Target nearest non-friendly player
new target = Find_Best_Angle(id,650.0+player_intelligence[id],false)
if (!is_valid_ent(target))
{
client_print(id, print_center, "Brak celu.")
return PLUGIN_HANDLED
}
if (pev(target,pev_rendermode) == kRenderTransTexture || player_b_inv[target] < 20 && player_b_inv[target] != 0|| player_class[target] == Ninja || invisible_cast[target] == 1||!fm_is_ent_visible(id,target))
{
hudmsg(id,2.0,"Nie mozna wyczarowac Pioruna ")
return PLUGIN_CONTINUE
}
new iEnd[3], iStart[3]
get_user_origin(target,iEnd)
get_user_origin(id,iStart)
new Float:fDamage = 40.0+player_intelligence[id]*2.3
Create_TE_BEAMPOINTS(iStart, iEnd, 0, 0, 6, 50, 60, 200, 160, 40, 255, 0,sprite_beam)
Display_Fade(target,2600,2600,0,255,0,0,15)
TakeDamage(target, id, fDamage, DMG_SHOCK, "piorun");
emit_sound (id, 0, "diablosound/merial.wav", 0.5, 0.8,0, 100 )
wait1[id]=floatround(halflife_time())
if(player_misja[id] == 1) player_expstat[id] ++
Display_Icon(id,ICON_HIDE,"dmg_shock",0,0,0)
set_task(15.0, "dajuzdrow", id)
}
}
return PLUGIN_HANDLED
}