You might know the zombieshop/item buy system. In this code here the player gets points every xx player_hurt events. I set the value to 3.
Thatīs ok for all except spitter. Just think of Sugarmill elevator arriving below.This is a joke as everytime all survivors get spitted on, become incapped and spitter collects a tremendous amount of points. I was thinking of something like this: If attacker == spitter --> every 5th player_hurt event give spitter 1 point. Is that possible anyway O_O ? How would the code for that look like ? I am no programmer
Code:
public Action:HurtPoints(Handle:event, String:event_name[], bool:dontBroadcast)
{
new client = GetClientOfUserId(GetEventInt(event, "userid"));
new attacker = GetClientOfUserId(GetEventInt(event, "attacker"));
if (attacker > 0 && attacker <= MaxClients)
{
if (pointsteam[attacker] != SURVIVORTEAM)
{
if (pointsteam[client] == SURVIVORTEAM)
{
if(pointson)
{
pointshurtcount[attacker] += 1;
if(pointshurtcount[attacker] >= 3)
{
PrintToChat(attacker, "[SM] Multiple damage! + %d %s",GetConVarInt(pointshurt),"point.");
points[attacker] += GetConVarInt(pointshurt);
pointshurtcount[attacker] -= 3;
}
}
}
}
}
}