public OnPlayerDeath(playerid, killerid, reason)
{
new gunname[32];
GetWeaponName(reason, gunname, 32);
if(killerid == INVALID_PLAYER_ID)
{
new string[128];
SendDeathMessage(INVALID_PLAYER_ID, playerid, reason);
PlayerData[playerid][Deaths] ++;
format(string, sizeof(string), "%s(%d) Has died: %s", PlayerName(playerid), playerid, gunname);
ServerLog(string);
}
else
{
new string[128];
SendDeathMessage(killerid, playerid, reason);
PlayerData[playerid][Deaths] ++;
PlayerData[killerid][Kills] ++;
format(string, sizeof(string), "%s(%d) Has killed %s(%d) with a %s", PlayerName(killerid), killerid, PlayerName(playerid), playerid, gunname);
ServerLog(string);
if(gTeam[killerid] > 6 && gTeam[playerid] > 0)
{
new wantedlevel = GetPlayerWantedLevel(killerid);
SetPlayerWantedLevel(killerid, wantedlevel +10);
SendClientMessage(killerid, COLOR_RED, "Crime Committed");
format(string, sizeof(string), "(MURDER) Wanted Level %d", wantedlevel);
SendClientMessage(killerid, GetPlayerColor(killerid), string);
return 1;
}
else
{
if(IsPlayerCop(killerid) || IsPlayerArmy(killerid) || IsPlayerSwat(killerid) && IsPlayerCop(playerid) || IsPlayerArmy(playerid) || IsPlayerSwat(playerid))
{
SendClientMessage(killerid, COLOR_ERROR, "(TEAM KILLER) Do NOT team kill, futher teamkilling will end to a kick/ban");
PlayerData[killerid][TeamKills] ++;
}
else
{
if(PlayerData[killerid][TeamKills] > 2)
{
format(string, sizeof(string), "%s(%d) Has been Auto-Kicked for teamkilling", PlayerName(killerid), killerid);
SendClientMessageToAll(COLOR_ADMIN, string);
PlayerData[killerid][TeamKills] = 0;
Kick(killerid);
return 1;
}
}
}
}
//Other things 'v'
return 1;
}
if(gTeam[killerid] > 6 && gTeam[playerid] > 0)
{
new wantedlevel = GetPlayerWantedLevel(killerid)+10;
SetPlayerWantedLevel(killerid, wantedlevel);
SendClientMessage(killerid, COLOR_RED, "Crime Committed");
format(string, sizeof(string), "(MURDER) Wanted Level %d", wantedlevel);
SendClientMessage(killerid, GetPlayerColor(killerid), string);
return 1;
}
Could you come with me ingame and test it? xD i have noone who can help me
|
PM me with the server IP and I'll test it for you.
I can't do anything now since >> my f*cking bug << xD |