14.03.2011, 16:41
pawn Код:
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;
}
When i kill someone it says: "(MURDER) Wanted level 0"
but i get Stars and ill get wanted =/
And i want it to say when i kill someone "(MURDER) Wanted level 10"
If you want to join the server and see the bug with your own eyes then look in my sing for server IP