#pragma newdecls required
#define JUMP_GRAVITY 0.8
#define TIME_GRAVITY 1.0
public void OnPluginStart()
{
HookEvent("player_jump", Event_PlayerJump);
}
public void Event_PlayerJump(Event event, const char[] Name, bool dontBroadcast)
{
int client = GetClientOfUserId(event.GetInt("userid"));
CreateTimer(TIME_GRAVITY, DefaultGravity, client, TIMER_FLAG_NO_MAPCHANGE);
SetEntityGravity(client, JUMP_GRAVITY);
}
public Action DefaultGravity(Handle timer, any client)
{
if (IsClientInGame(client)) SetEntityGravity(client, 1.0);
return Plugin_Stop;
}