Witam mam pytanie jak zrobić 1 dodatkowy skok po osiągnięciu 150 LVL. Dodam, że chcę aby to działało dla każdej klasy, a jeśli ma już ona 2 skoki to żeby dodawało jej 1 kolejny. (Paczka deathrun+klasy by mentos)
Tutaj kod od skoków:
public CmdStart(id, uc_handle) { if(!is_user_alive(id)) return FMRES_IGNORED; new button = get_uc(uc_handle, UC_Buttons); new oldbutton = get_user_oldbutton(id); new flags = get_entity_flags(id); if(gClass[id] == Ninja || gClass[id] == Jumper || gClass[id] == Assassin) { if((button & IN_JUMP) && !(flags & FL_ONGROUND) && !(oldbutton & IN_JUMP) && gSkoki[id] > 0) { gSkoki[id]--; new Float:velocity[3]; entity_get_vector(id,EV_VEC_velocity,velocity); velocity[2] = random_float(265.0,285.0); entity_set_vector(id,EV_VEC_velocity,velocity); } else if(flags & FL_ONGROUND) gSkoki[id] = 1; } if(gClass[id] == Rambo || gClass[id] == Ghost) { if((button & IN_JUMP) && !(flags & FL_ONGROUND) && !(oldbutton & IN_JUMP) && gSkoki[id] > 0) { gSkoki[id]--; new Float:velocity[3]; entity_get_vector(id,EV_VEC_velocity,velocity); velocity[2] = random_float(265.0,285.0); entity_set_vector(id,EV_VEC_velocity,velocity); } else if(flags & FL_ONGROUND) gSkoki[id] = 2; } if(gClass[id] == Odrzutowiec) { if(button & IN_DUCK && flags & FL_ONGROUND && button & IN_JUMP) { if( get_gametime() > gfLastModulUse[id] + 5.0) { gfLastModulUse[id] = get_gametime(); new Float:velocity[3]; VelocityByAim(id, 500, velocity); velocity[2] = 230.0 entity_set_vector(id, EV_VEC_velocity, velocity); } } } return FMRES_IGNORED; }
A takie coś może się przyda
if(gLvl[id] > 149)
Sam próbowałem to zrobić ale mi nie wychodziło