public cod_class_enabled(id)
{
if(!(get_user_flags(id) & ADMIN_LEVEL_G))
{
client_print(id, print_chat, "[Medyk+] Nie masz uprawnien, aby uzywac tej klasy.")
return COD_STOP;
}
ColorChat(id, GREEN, "Klasa stworzona przez www.***");
ilosc_apteczek_gracza[id] = 2;
ma_klase[id] = true
}
public cod_class_disabled(id)
{
ma_klase[id] = false
}
public cod_class_skill_used(id)
{
if (!ilosc_apteczek_gracza[id])
{
client_print(id, print_center, "Masz tylko 2 apteczki na runde!");
return PLUGIN_CONTINUE;
}
else if (get_user_buttons(id) & IN_ATTACK)
{
client_print(id, print_center, "Przestan strzelac aby postawic apteczke!");
return PLUGIN_CONTINUE;
}
else
{
ilosc_apteczek_gracza[id]--;
new Float:origin[3];
entity_get_vector(id, EV_VEC_origin, origin);
new ent = create_entity("info_target");
entity_set_string(ent, EV_SZ_classname, "medkit");
entity_set_edict(ent, EV_ENT_owner, id);
entity_set_int(ent, EV_INT_solid, SOLID_NOT);
entity_set_vector(ent, EV_VEC_origin, origin);
entity_set_float(ent, EV_FL_ltime, halflife_time() + 7 + 0.1);
entity_set_model(ent, "models/w_medkit.mdl");
set_rendering ( ent, kRenderFxGlowShell, 255,0,0, kRenderFxNone, 255 ) ;
drop_to_floor(ent);
entity_set_float(ent, EV_FL_nextthink, halflife_time() + 0.1);
return PLUGIN_CONTINUE;
}
}
Coś takiego, bo nie wiem czy dobrze zrozumiałem?