#include <engine>
2) Dodajemy pod includami:
#define FL_WATERJUMP (1<<11) // popping out of the water #define FL_ONGROUND (1<<9) // not moving on the ground
3) Na koniec sma dodajemy:
public client_PreThink(id)
{
if(!ma_klase[id])
return PLUGIN_CONTINUE
if (entity_get_int(id, EV_INT_button) & 2) {
new flags = entity_get_int(id, EV_INT_flags)
if (flags & FL_WATERJUMP)
return PLUGIN_CONTINUE
if ( entity_get_int(id, EV_INT_waterlevel) >= 2 )
return PLUGIN_CONTINUE
if ( !(flags & FL_ONGROUND) )
return PLUGIN_CONTINUE
new Float:velocity[3]
entity_get_vector(id, EV_VEC_velocity, velocity)
velocity[2] += 250.0
entity_set_vector(id, EV_VEC_velocity, velocity)
entity_set_int(id, EV_INT_gaitsequence, 6)
}
return PLUGIN_CONTINUE
}


Dodatki SourceMod















