I have written a plugin to stop fall damage, but the problem I have now, is by disabling damage from client 0, not only does fall damage stop, but all world damage, thus breaking trigger_hurts, etc. With the help of Pred and a few others, this is what I have come up with. According to Voogru though, he said it really needs to be done with the player_hurt damage bits instead of the clients. This isn't possible as the player_hurt doesn't have damage. He mentioned setting it to ignore the second call, but anyays here is the code. Any help would rock.
Code:
#include <sourcemod>
public OnPluginStart()
{
HookEvent("player_hurt",Event_PlayerHurt);
}
public Event_PlayerHurt(Handle:event,const String:name[],bool:dontBroadcast)
{
new client = GetClientOfUserId(GetEventInt(event, "userid"));
new offsDmgType = FindDataMapOffs(client, "m_bitsDamageType");
new newDmgType = GetEntData(client, offsDmgType);
if (newDmgType & 1<<5) {
PrintToChatAll("The Player Just Took Fall Damage");
SetEntData(client, offsDmgType, (newDmgType^=1<<5), 4, true); //remove the fall damage bits?
}
else {
PrintToChatAll("The Player Just Took Some other kind of damage");
}
}
Before I put the SetEntData line in there, you would rocket jump, it would say other type of damage. After you fell, which it recognized as fall damage, it would say all types of damage were fall damage. After putting the SetEntData line, now it detects WHEN you take fall damage, but then the next damage taken immediately after is also detected as fall damage, then it goes back to normal.