Code:
public APLRes:AskPluginLoad2(Handle:myself, bool:late, String:error[], err_max)
{
for(new i = 1; i <= MaxClients; i++)
{
if(IsClientInGame(i))
SDKHook(i, SDKHook_OnTakeDamage, OnTakeDamage);
}
return APLRes_Success;
}
public OnClientPutInServer(client)
{
SDKHook(client, SDKHook_OnTakeDamage, OnTakeDamage);
}
public Action:OnTakeDamage(victim, &attacker, &inflictor, &Float:damage, &damagetype, &weapon, Float:damageForce[3], Float:damagePosition[3])
{
if(damagetype & DMG_BULLET == 0 || attacker < 1 || attacker > MaxClients || !IsClientInGame(attacker) || !IsClientInGame(victim))
return Plugin_Continue;
else // Put stop damage conditions here
{
damage = 0.0;
return Plugin_Changed;
}
}
__________________