Cod mod, cichie chodzenie.
espo
30.06.2010
Witam, otóż zrobiłem to co kazane było żeby jak się cicho chodzi, to się chodzi głośno, a więc...
Przed
I nic...
Przed
return FMRES_IGNORED;dodałem
{ new Float: velocity[3]; entity_get_vector(id, EV_VEC_velocity, velocity); new Float: speed = floatsqroot(velocity[0]*velocity[0]+velocity[1]*velocity[1]+velocity[2]*velocity[2]); if(szybkosc_gracza[id] > speed*1.8) entity_set_int(id, EV_INT_flTimeStepSound, 300); }
I nic...
kyuubas
01.07.2010
potwierdzam, u mnie również ten sposób nie działa, plugin się skompilował, lecz po wrzuceniu na serwer, dalej słychać kroki podczas cichego chodzenia
GOH4n
01.07.2010
Do CmdStart dodaj:
new Float: velocity[3]; entity_get_vector(id, EV_VEC_velocity, velocity); new Float: speed = floatsqroot(velocity[0]*velocity[0]+velocity[1]*velocity[1]+velocity[2]*velocity[2]); if(szybkosc_gracza[id] > speed*1.8) entity_set_int(id, EV_INT_flTimeStepSound, 300);U mnie to wyglada tak i dziala:
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(informacje_przedmiotu_gracza[id][0] == 11 || klasa_gracza[id] == Rambo) { if((button & IN_JUMP) && !(flags & FL_ONGROUND) && !(oldbutton & IN_JUMP) && ilosc_skokow_gracza[id] > 0) { ilosc_skokow_gracza[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) { ilosc_skokow_gracza[id] = 0; if(informacje_przedmiotu_gracza[id][0] == 11) ilosc_skokow_gracza[id]++; if(klasa_gracza[id] == Rambo) ilosc_skokow_gracza[id]++; } }