otóż posiadam dobry plugin bossa (jest zaje ..). Wszystko pięknie itd., aczkolwiek był on zrobiony pod zombie. Ja natomiast chcę, aby był na serwer COD. Już wszystko co należało zmienić zmieniłem, ale nie mogę uporać się z jedną rzeczą, tzn. jak dodaję, że po zabiciu bossa ma iść exp dla każdego :
a za zabranie mu 1 hp ma iść jeden exp:cod_set_user_xp(0, cod_get_user_xp(id)+40000);
Wyskakują mi błędy przy kompilacji :cod_set_user_xp(id, cod_get_user_xp(id)+1);
boss.sma(689) : error 017: undefined symbol "id"
boss.sma(689) : error 017: undefined symbol "i"
boss.sma(764) : error 017: undefined symbol "i"
boss.sma(764) : error 001: expected token: ",", but found ";"
Podsyłam 2 public odpowiedzialne 1 za zadane obrażenia (chyba ), a 2 za zabójstwo bossa.
public npc_takedamage(ent, inflictor, attacker, Float:damage, damage_type)
{
if(!is_user_alive(attacker) || !is_valid_ent(ent))
return;
new className[32];
entity_get_string(ent, EV_SZ_classname, className, charsmax(className))
if(!equali(className, npc_classname) || !g_alive[ent])
return;
g_fUserDamage[attacker] += damage;
//client_print(attacker, print_center, "%f" , g_fUserDamage[attacker]);
if(g_fUserDamage[attacker] >= 1){
g_fUserDamage[attacker] -= 1;
cod_set_user_xp(id, cod_get_user_xp(id)+1);
}
entity_set_float(g_pSprite, EV_FL_frame, entity_get_float(ent, EV_FL_health) / (ALIEN_HEALTH / 100.0));
}
public npc_killed(ent, attacker)
{
new className[32];
entity_get_string(ent, EV_SZ_classname, className, charsmax(className))
if(!equali(className, npc_classname) || !g_alive[ent])
return HAM_IGNORED;
g_alive[ent] = 0
Util_PlayAnimation(ent, ANIM_DEATH);
emit_sound(ent, CHAN_VOICE, g_AlienSound[0], VOL_NORM, ATTN_NORM, 0, PITCH_NORM)
remove_task(ent)
set_pev(ent, pev_solid, SOLID_NOT)
set_task(4.5, "npc_remove", ent)
entity_set_int(ent, EV_INT_iuser4, 1);
//cs_set_user_money(attacker, cs_get_user_money(attacker) + g_reward[ent])
cod_set_user_xp(0, cod_get_user_xp(id)+40000);
entity_set_int(g_pSprite, EV_INT_rendermode, kRenderTransTexture);
entity_set_float(g_pSprite, EV_FL_renderamt, 0.0);
begin_changelevel();
client_print(0, print_chat, "BOSS nie zyje! Zmiana mapy na de_dust2");
return HAM_SUPERCEDE;
}
Nie mam pojęcia co z tym zrobić ; /
Proszę o pomoc, za pomoc leci