-LeXuS-
Участник
- Сообщения
- 120
- Реакции
- 60
Привет всем, помогите пожалуйста сделать, чтобы при убийстве attacer'у засчитывалось killcount + 1
PHP:
new killcount[MAXPLAYERS];
public OnPluginStart()
{
HookEvent("player_death", OnPlayerDeath);
}
public Action:OnPlayerDeath(Handle:event, const String:name[], bool:dontBroadcast)
{
new client = GetClientOfUserId(GetEventInt(event, "userid"));
new attacker = GetClientOfUserId(GetEventInt(event, "attacker"));
new String:Weapon[32];
GetEventString(event, "weapon", Weapon, sizeof(Weapon));
if (client && attacker && GetClientTeam(client) != GetClientTeam(attacker))
{
killcount[attacker] += 1;
PrintToChatAll("Убийств: %d", killcount);
SetEntProp(attacker, Prop_Send, "m_iHealth", 150);
}
}