PHP Code:
//==================================================================================================
// Kill upgrades:
// Gives upgrade: everytime a player kills 120 infected
HookEvent("infected_death", KillUpgrades);
public Action:KillUpgrades(Handle:event, String:ename[], bool:dontBroadcast)
{
new client = GetClientOfUserId(GetEventInt(event, "attacker"));
new bool:minigun = GetEventBool(event, "minigun");
new bool:blast = GetEventBool(event, "blast");
if(client)
{
// normal kills only
if (!minigun && !blast)
'// previously declared global'
killcount[client] += 1;
i.e: new killcount[MAXPLAYERS+1];
// Gives a upgrade everytime a player kills 120 infected
if ((killcount[client]%120) == 0 && killcount[client] > 1)
{
if(IsClientInGame(client)==true && GetClientTeam(client)==2)
{
decl String:name[64];
GetClientName(client, name, 64);
PrintToChatAll("\x05[ \x04%s\x01 won a upgrade for killing %d infected.",name, killcount[client]);
GiveClientUpgrades(client, 1);
}
}
}
return Plugin_Continue;
}
PHP Code:
/home/groups/sourcemod/upload_tmp/phpWoHpPb.sp(1068) : error 027: invalid character constant
/home/groups/sourcemod/upload_tmp/phpWoHpPb.sp(1068) : warning 217: loose indentation
/home/groups/sourcemod/upload_tmp/phpWoHpPb.sp(1068) : error 017: undefined symbol "declared"
/home/groups/sourcemod/upload_tmp/phpWoHpPb.sp(1068) : error 017: undefined symbol "global"
/home/groups/sourcemod/upload_tmp/phpWoHpPb.sp(1068) : fatal error 127: too many error messages on one line
Compilation aborted.
4 Errors.
Here is the part of the code for the kill feature , why it doesn't work?
Thx