Quote:
Originally Posted by kmal2t
just use an if(!(pev(id, pev_flags) & FL_ONGROUND)) with a bool in a prethink that goes to a function that then turns off the bool and has a 4 sec set task to your grav with the bool resetting once on ground.
|
Could you explain this to me a bit more...if I semi-understand you...I should change the way that i have this coded to...
Code:
new bool:haslowgrav[33];
public client_PreThink(id)
{
if(haslowgrav[id])
{
if(FL_ONGROUND);
set_pev(id,pev_gravity,1.0);
}
return PLUGIN_CONTINUE;
}
public fwdTouch(ent, id)
{
static szClassname[33];
pev(ent, pev_classname, szClassname, 32);
(...)
else if(equali(szClassname, "lowgrav"))
{
set_pev(id,pev_gravity,0.20);
client_cmd(id, "+jump");
haslowgrav[id] = true;
return PLUGIN_HANDLED_MAIN;
}
return PLUGIN_HANDLED_MAIN;
}
What about something like this...or should i use Post think ?