Wywala w gorę.
GoldeN
11.02.2011
set_pev(id,pev_velocity,Float:{0.0,0.0,0.0}); // stop motion
engfunc(EngFunc_SetClientMaxspeed,id,0.00001); // keep immobile
new Float:gravity;
pev(id,pev_gravity,gravity);
// remember any gravity changes
if(gravity != 0.000000001 && gravity != 999999999.9)
oldGravity[id] = gravity;
// if are on the ground and about to jump, set the gravity too high to really do so
if((pev(id,pev_button) & IN_JUMP) && !(pev(id,pev_oldbuttons) & IN_JUMP) && (pev(id,pev_flags) & FL_ONGROUND))
set_pev(id,pev_gravity,999999999.9);
// otherwise, set the gravity so low that they don't fall
else set_pev(id,pev_gravity,0.000000001);
Jak zrobić, gdy jesteśmy na ziemi i podskoczymy, aby nas nie wywalało w kosmos? Bo jak podskoczę, to wywala bardzo wysoko.
LUBIE KASZKE
11.02.2011
Hmm...Nie znam się z tym za bardzo ale spróbuj tak:
Użytkownik LUBIE KASZKE edytował ten post 11.02.2011 17:28
set_pev(id,pev_velocity,Float:{0.0,0.0,0.0}); // stop motion engfunc(EngFunc_SetClientMaxspeed,id,0.00001); // keep immobile new Float:gravity; pev(id,pev_gravity,gravity); // remember any gravity changes if(gravity != 800 && gravity != 999999999.9) oldGravity[id] = gravity; // if are on the ground and about to jump, set the gravity too high to really do so if((pev(id,pev_button) & IN_JUMP) && !(pev(id,pev_oldbuttons) & IN_JUMP) && (pev(id,pev_flags) & FL_ONGROUND)) set_pev(id,pev_gravity,999999999.9); // otherwise, set the gravity so low that they don't fall else set_pev(id,pev_gravity,800);
Użytkownik LUBIE KASZKE edytował ten post 11.02.2011 17:28