Nie ma takiej potrzeby...
"Autorski" nie znaczy że super fajny, i wszystko w nim jest. Temat ma na celu funkcję pobierającą i ustawiającą skoki gracza.
Jeszcze raz; nie ma potrzeby na udostępnianie *.sma, i mówię to jako twórca sklepu.
chcialem troche ulatwic autorowi no ale coz ktos tu ma spore ego
a wiec autorze
na poczatek includujesz fakemete
#include <fakemeta>
nastepnie tworzysz 2 zmienne globalne
new skoki[33]
new skoki2[33]
dodajesz do plugin_init
register_forward(FM_CmdStart, "CmdStartPre")
potem wklejasz na koniec pluginu
public CmdStartPre(id,uc_handle)
{
if(is_user_alive(id))
{
new flags = pev(id, pev_flags);
if((get_uc(uc_handle, UC_Buttons) & IN_JUMP) && !(flags & FL_ONGROUND) && !(pev(id, pev_oldbuttons) & IN_JUMP) && skoki[id]>0){
--skoki[id];
new Float:velocity[3];
pev(id, pev_velocity,velocity);
velocity[2] = random_float(265.0,285.0);
set_pev(id,pev_velocity,velocity);
} else if(flags & FL_ONGROUND && skoki[id]!=-1){
skoki[id] = skoki2[id];
}
}
}
public get_user_skoki(index)
{
return skoki2[index]
}
public set_user_skoki(index,ammount)
{
skoki2[index]=ammount
}
wtedy mozesz dodac komus skoki takim samym sposobem jak przyklad u ciebie w poscie czyli set_user_skoki(id,get_user_skoki(id)+1)