Quote:
Originally Posted by Bacardi
Show your code... please.
|
HTML Code:
public void OnClientPutInServer(int client)
{
SDKHook(client, SDKHook_TraceAttack, OnTakeDamage);
}
public void OnClientDisconnect(int client)
{
SDKUnhook(client, SDKHook_TraceAttack, OnTakeDamage);
}
public Action OnTakeDamage(int victim, int &attacker, int &inflictor, float &damage, int &damagetype, int &ammotype, int hitbox, int hitgroup)
{
if (damage <= 0.0 || victim < 1 || victim > 2048 || attacker < 1 || attacker > MaxClients)
return Plugin_Continue;
damage = 100.0;
return Plugin_Changed;
}
This is the simplest example, even after such a change in damage, when hit in the leg, less than 100 will be taken away, and when hit in the head twice as much