PDA

View Full Version : What's wrong with it.


STONEGOLD
27/06/2015, 09:07 PM
if(gTeam{killerid} == CIVILIANS)
{
new string[256], copmsg[256], ID;
SetPlayerWantedLevelEx(killerid, GetPlayerWantedLevel(killerid) + 6);
format(string, sizeof(string), "Comitted A Crime: Murder - Wanted Level %d", GetPlayerWantedLevel(killerid));
SendClientMessage(killerid, RED, string);
format(copmsg, sizeof(copmsg), "Suspect %s (%d) has committed 'Murder' near %s", GetName(playerid), playerid, ReturnPlayerZone(ID));
SendRadioMessageToCops(copmsg);
pInfo[killerid][pKills] ++;
pInfo[playerid][pDeaths] ++;
pInfo[playerid][pCrimes] ++;
pInfo[killerid][pWantedLevel] = pInfo[killerid][pWantedLevel] + 6;
return 1;
}
if(GetPlayerWantedLevel(playerid) >= 4)
{
if(gTeam{killerid} == COPS)
{
new string[356];
SetPlayerScore(killerid, GetPlayerScore(killerid)+1);
SetPlayerScore(playerid, GetPlayerScore(playerid)-1);
format(string, sizeof(string), "%s (%d) has been taken down by Officer %s (%d)!",GetName(playerid),playerid,GetName(killerid),kill erid);
SendClientMessageToAll(COLOR_CYAN,string);
GoToJail{playerid} = true;
GivePlayerCashEx(killerid, 1000);
pInfo[killerid][pKills] ++;
pInfo[playerid][pDeaths] ++;
pInfo[killerid][pArrest] ++;
SetPlayerWantedLevelEx(playerid, 0);
return 1;
}
}


Well, Im using this. Well, I want if civilian killed a player so he gets 6 star and if a cop killed criminals who has more than 4 stars so he shouldn't get 6 stars . But it gives to cop 6 stars for murdering. What's wrng here. i don't see anything

Evocator
27/06/2015, 09:13 PM
That doesn't seem to be the full code under OnPlayerDeath...