Thanks all....
like this ?
PHP Code:
if((GetClientTeam(target) == 2) && (StrEqual(weapon, "jockey_claw")) && (GetClientTeam(Jockey) == 3) && Jockey > 0 && Jockey <= MaxClients && IsClientInGame(Jockey))
OR like this
PHP Code:
if((GetClientTeam(target) == 2) && (StrEqual(weapon, "jockey_claw")) && (GetClientTeam(Jockey) == 3) && IsClientInGame(Jockey))
And thanks
GsiX
Is the core like this?
PHP Code:
public Action:Event_PlayerHurt(Handle:event, const String:name[], bool:dontBroadcast)
{
new Jockey = GetClientOfUserId(GetEventInt(event, "attacker"));
new target = GetClientOfUserId(GetEventInt(event, "userid"));
decl String:weapon[64];
GetEventString(event, "weapon", weapon, sizeof(weapon));
if((GetClientTeam(target) == 2) && (StrEqual(weapon, "jockey_claw")) && (GetClientTeam(Jockey) == 3) && IsClientInGame(Jockey))
{
new Jockey_Victim = GetEntPropEnt(Jockey, Prop_Send, "m_jockeyVictim");
if (IsValidEntity(Jockey_Victim) && Jockey_Victim != 0)
{
return Plugin_Continue;
} else
{
new duration = GetConVarInt(FindConVar("sm_Jockey_acidswipe_duration"));
new stack = GetConVarInt(FindConVar("sm_Jockey_acidswipe_stack"));
attacker[target] = Jockey;
if(hurtsLeft[target] <= 0)
{
hurtsLeft[target] = duration;
CreateTimer(1.0, Acid_Damage, target);
} else
{
if(stack == -1)
{
hurtsLeft[target] = duration;
} else
{
if(stack >= 0)
{
hurtsLeft[target] += stack;
} else
{
//sm_Jockey_acidswipe_stack has invalid value so log error
LogError("sm_Jockey_acidswipe_stack has an invalid value. Accepted values are -1 and higher.");
}
}
}
}
}
return Plugin_Continue;
}