I have a little problem with the plugin that asks dmg after entering molotova from his team
PHP Code:
#include <sourcemod>
#include <sdktools>
#include <sdkhooks>
#define PLUGIN_AUTHOR "f0re4ch"
#define PLUGIN_VERSION "1.0"
public Plugin:myinfo =
{
name = "Competitive Anti-FF",
author = PLUGIN_AUTHOR,
description = "Protects Players from Friendly-Fire but enable molotov damage",
version = PLUGIN_VERSION,
url = "http://kpservidores.com"
};
public OnClientPutInServer(int client)
{
SDKHook(client, SDKHook_OnTakeDamage, OnTakeDamage);
}
public Action OnTakeDamage(int victim, int &attacker, int &inflictor, float &damage, int &damagetype, int &weapon, float damageForce[3], float damagePosition[3])
{
int attackerUserId = attacker;
int victimUserId = victim;
char WeaponCallBack[32];
GetEdictClassname(inflictor, WeaponCallBack, sizeof(WeaponCallBack));
if ((!IsValidEntity(victimUserId)) || (!IsValidEntity(attackerUserId)))
return Plugin_Continue;
if ((strlen(WeaponCallBack) <= 0) || (attackerUserId == victimUserId) || (GetClientTeam(victimUserId) != GetClientTeam(attackerUserId)) )
return Plugin_Continue;
if (StrEqual(WeaponCallBack, "inferno", false))
return Plugin_Continue;
return Plugin_Handled;
}
Quote:
[SM] Exception reported: Client index 306 is invalid
[SM] Blaming: no_ff_molotov.smx
[SM] Call stack trace:
[SM] [0] GetClientTeam
[SM] [1] Line 21, no_ff_molotov.sp::OnTakeDamage
[SM] Exception reported: Client index 306 is invalid
|