07.04.2012, 02:08
galera botei um system de hosp no meu hospital no meu servidor so tem um BUG qnd o player e procurado e morto por cop buga ele nao e preso vai pro hospital e a tela fica branca
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
gHospitalInfo[playerid][MorreuHospital] = 1;
if(concorrendoevento[playerid] == 1)
{
concorrendoevento[playerid] = 0;
DisablePlayerRaceCheckpoint(playerid);
if(corridainiciada) { checknumero[playerid] = 0; }
if(dirtiniciado) { checknumerodirt[playerid] = 0; }
}
if(TransportDuty[playerid] == 2)
{
DisablePlayerRaceCheckpoint(playerid);
checkonibus[playerid] = 0;
}
TextDrawHideForPlayer(playerid, horasdks[playerid]);
TextDrawHideForPlayer(playerid, datadks[playerid]);
TextDrawHideForPlayer(playerid, rodape[playerid]);
// TextDrawHideForPlayer(playerid, Parceria1[playerid]);
// TextDrawHideForPlayer(playerid, Parceria2[playerid]);
new name[MAX_PLAYER_NAME];
new string[256];
//new dmessage[128];
//new deathreason[20];
new playercash;
new victimteam;
new Float:px,Float:py,Float:pz;
new killerteam;
victimteam = gTeam[playerid];
killerteam = gTeam[killerid];
gPlayerSpawned[playerid] = 0;
GetPlayerName(playerid, name, sizeof(name));
PlayerInfo[playerid][pLocal] = 255;
GetPlayerPos(playerid, px, py, pz);
spawnado[playerid] = 0;
if(ProvocoMorro[playerid] == 1)
{
GangZoneStopFlashForAll(GZMorro);
GangZoneShowForAll(GZMorro, 0xFFFFFF96);
GuerranoMorro = 0;
ProvocoMorro[playerid] = 0;
donomorro = 0;
Dominando[playerid] = 0;
KillTimer(TempoGuerraMorro);
}
if(ProvocoSkate[playerid] == 1)
{
GangZoneStopFlashForAll(GZSkate);
GangZoneShowForAll(GZSkate, 0xFFFFFF96);
GuerranoSkate = 0;
ProvocoSkate[playerid] = 0;
donoskate = 0;
Dominando[playerid] = 0;
KillTimer(TempoGuerraSkate);
}
if(ProvocoShop[playerid] == 1)
{
GangZoneStopFlashForAll(GZShop);
GangZoneShowForAll(GZShop, 0xFFFFFF96);
GuerranoShop = 0;
ProvocoShop[playerid] = 0;
donoshop = 0;
Dominando[playerid] = 0;
KillTimer(TempoGuerraShop);
}
if(ProvocoAero[playerid] == 1)
{
GangZoneStopFlashForAll(GZAero);
GangZoneShowForAll(GZAero, 0xFFFFFF96);
GuerranoAero = 0;
ProvocoAero[playerid] = 0;
donoaero = 0;
Dominando[playerid] = 0;
KillTimer(TempoGuerraAero);
}
if(NathanInfo[playerid][pAssaltado] == 1 && killerid == NathanInfo[playerid][pAID])
{
GivePlayerMoneyEx(killerid,NathanInfo[playerid][pADinheiro] / 2);
NathanInfo[playerid][pADinheiro] = 0;
NathanInfo[playerid][pAssaltado] = 0;
SendClientMessage(playerid,COLOR_GRAD1,"Vocк foi morto pelo assaltante.");
SendClientMessage(NathanInfo[playerid][pAID],COLOR_GRAD1,"Vocк matou a vнtima e conseguiu metade do dinheiro no assalto");
NathanInfo[playerid][pAID] = 999;
KillTimer(tempoassalto[playerid]);
}
if(acontecendoguerra > 0 && IsPlayerInGuerra(playerid))
{
if(PlayerTerrorista(playerid) && PlayerTerrorista(killerid))
{
new numterror;
new terrorkill;
if(PlayerInfo[playerid][pMembro] > 0) { numterror = PlayerInfo[playerid][pMembro]; }
if(PlayerInfo[playerid][pLider] > 0) { numterror = PlayerInfo[playerid][pLider]; }
if(PlayerInfo[killerid][pMembro] > 0) { terrorkill = PlayerInfo[killerid][pMembro]; }
if(PlayerInfo[killerid][pLider] > 0) { terrorkill = PlayerInfo[killerid][pLider]; }
GuerraPontos[terrorkill] += 1;
GuerraMortes[numterror] += 1;
AbrirDrawGuerra();
}
}
if(WantedPoints[playerid] >= 1)
{
//if(gTeam[killerid] == 2 && CrimInRange(30.0, playerid,killerid))
//{
new price = WantedPoints[playerid] * 100;
if(PlayerInfo[killerid][pMembro] == 1 || PlayerInfo[killerid][pLider] == 1)
{
spawnado[playerid] = 1;
format(gstring, sizeof(gstring), "~w~Suspeito ~r~Morto~n~Bonus~g~R$%d", price);
GameTextForPlayer(killerid, gstring, 5000, 1);
ConsumingMoney[killerid] = 1;
GivePlayerMoneyEx(killerid, price / 2);
PlayerPlaySound(killerid, 1058, 0.0, 0.0, 0.0);
GivePlayerMoneyEx(playerid, - price);
PlayerInfo[playerid][pJailed] = 1;
PlayerInfo[playerid][pJailTime] = (WantedPoints[playerid])*(180);
format(gstring, sizeof(gstring), "* Vocк estб preso por %d Segundos na Policia Militar, e perdeu R$%d por trocar tiros e fugir dos policiais.", PlayerInfo[playerid][pJailTime], price);
SendClientMessage(playerid, COLOR_LIGHTRED, gstring);
WantedPoints[playerid] = 0;
SetPlayerWantedLevel(playerid, 0);
PlayerInfo[playerid][pDrogas] = 0;
PlayerInfo[playerid][pDrogas2] = 0;
PlayerInfo[playerid][pDrogas3] = 0;
PlayerInfo[playerid][pMats] = 0;
}
if(PlayerInfo[killerid][pMembro] == 22 || PlayerInfo[killerid][pLider] == 22)
{
spawnado[playerid] = 1;
format(gstring, sizeof(gstring), "~w~Suspeito ~r~Morto~n~Bonus~g~R$%d", price);
GameTextForPlayer(killerid, gstring, 5000, 1);
ConsumingMoney[killerid] = 1;
GivePlayerMoneyEx(killerid, price / 2);
PlayerPlaySound(killerid, 1058, 0.0, 0.0, 0.0);
GivePlayerMoneyEx(playerid, - price);
PlayerInfo[playerid][pJailed] = 1;
PlayerInfo[playerid][pJailTime] = (WantedPoints[playerid])*(180);
format(gstring, sizeof(gstring), "* Vocк estб preso por %d Segundos na Policia Militar, e perdeu R$%d por trocar tiros e fugir dos policiais.", PlayerInfo[playerid][pJailTime], price);
SendClientMessage(playerid, COLOR_LIGHTRED, gstring);
WantedPoints[playerid] = 0;
SetPlayerWantedLevel(playerid, 0);
PlayerInfo[playerid][pDrogas] = 0;
PlayerInfo[playerid][pDrogas2] = 0;
PlayerInfo[playerid][pDrogas3] = 0;
PlayerInfo[playerid][pMats] = 0;
}
if(PlayerInfo[killerid][pMembro] == 2 || PlayerInfo[killerid][pLider] == 2)
{
spawnado[playerid] = 1;
format(gstring, sizeof(gstring), "~w~Suspeito ~r~Morto~n~Bonus~g~R$%d", price);
GameTextForPlayer(killerid, gstring, 5000, 1);
ConsumingMoney[killerid] = 1;
GivePlayerMoneyEx(killerid, price / 2);
PlayerPlaySound(killerid, 1058, 0.0, 0.0, 0.0);
GivePlayerMoneyEx(playerid, - price);
PlayerInfo[playerid][pJailed] = 3;
PlayerInfo[playerid][pJailTime] = (WantedPoints[playerid])*(180);
format(gstring, sizeof(gstring), "* Vocк estб preso por %d Segundos na HQ BOPE, e perdeu R$%d por trocar tiros e fugir dos policiais.", PlayerInfo[playerid][pJailTime], price);
SendClientMessage(playerid, COLOR_LIGHTRED, gstring);
WantedPoints[playerid] = 0;
SetPlayerWantedLevel(playerid, 0);
PlayerInfo[playerid][pDrogas] = 0;
PlayerInfo[playerid][pDrogas2] = 0;
PlayerInfo[playerid][pDrogas3] = 0;
PlayerInfo[playerid][pMats] = 0;
}
if(PlayerInfo[killerid][pMembro] == 3 || PlayerInfo[killerid][pLider] == 3)
{
spawnado[playerid] = 1;
format(gstring, sizeof(gstring), "~w~Suspeito ~r~Morto~n~Bonus~g~R$%d", price);
GameTextForPlayer(killerid, gstring, 5000, 1);
ConsumingMoney[killerid] = 1;
GivePlayerMoneyEx(killerid, price / 2);
PlayerPlaySound(killerid, 1058, 0.0, 0.0, 0.0);
GivePlayerMoneyEx(playerid, - price);
PlayerInfo[playerid][pJailed] = 7;
PlayerInfo[playerid][pJailTime] = (WantedPoints[playerid])*(180);
format(gstring, sizeof(gstring), "* Vocк estб preso por %d Segundos no Exйrcito, e perdeu R$%d por trocar tiros e fugir dos policiais.", PlayerInfo[playerid][pJailTime], price);
SendClientMessage(playerid, COLOR_LIGHTRED, gstring);
WantedPoints[playerid] = 0;
SetPlayerWantedLevel(playerid, 0);
PlayerInfo[playerid][pDrogas] = 0;
PlayerInfo[playerid][pDrogas2] = 0;
PlayerInfo[playerid][pDrogas3] = 0;
PlayerInfo[playerid][pMats] = 0;
}
if(PlayerInfo[killerid][pMembro] == 16 || PlayerInfo[killerid][pLider] == 16)
{
spawnado[playerid] = 1;
format(gstring, sizeof(gstring), "~w~Suspeito ~r~Morto~n~Bonus~g~R$%d", price);
GameTextForPlayer(killerid, gstring, 5000, 1);
ConsumingMoney[killerid] = 1;
GivePlayerMoneyEx(killerid, price / 2);
PlayerPlaySound(killerid, 1058, 0.0, 0.0, 0.0);
GivePlayerMoneyEx(playerid, - price);
PlayerInfo[playerid][pJailed] = 4;
PlayerInfo[playerid][pJailTime] = (WantedPoints[playerid])*(180);
format(gstring, sizeof(gstring), "* Vocк estб preso por %d Segundos na Policia Civil, e perdeu R$%d por trocar tiros e fugir dos policiais.", PlayerInfo[playerid][pJailTime], price);
SendClientMessage(playerid, COLOR_LIGHTRED, gstring);
WantedPoints[playerid] = 0;
SetPlayerWantedLevel(playerid, 0);
}
if(PlayerInfo[killerid][pMembro] == 26 || PlayerInfo[killerid][pLider] == 26)
{
spawnado[playerid] = 1;
format(gstring, sizeof(gstring), "~w~Suspeito ~r~Morto~n~Bonus~g~R$%d", price);
GameTextForPlayer(killerid, gstring, 5000, 1);
ConsumingMoney[killerid] = 1;
GivePlayerMoneyEx(killerid, price / 2);
PlayerPlaySound(killerid, 1058, 0.0, 0.0, 0.0);
GivePlayerMoneyEx(playerid, - price);
PlayerInfo[playerid][pJailed] = 26;
PlayerInfo[playerid][pJailTime] = (WantedPoints[playerid])*(180);
format(gstring, sizeof(gstring), "* Vocк estб preso por %d Segundos na Policia Federal, e perdeu R$%d por trocar tiros e fugir dos policiais.", PlayerInfo[playerid][pJailTime], price);
SendClientMessage(playerid, COLOR_LIGHTRED, gstring);
WantedPoints[playerid] = 0;
SetPlayerWantedLevel(playerid, 0);
}
//}
}
if(GetPlayerState(killerid) == 2)
{
GetPlayerName(killerid,kickname,sizeof(kickname));
format(string,sizeof(string),"Atenзгo:[%d]%s cometeu DB em %s e serб kickado pelo administrador.",killerid,kickname,name);
SendClientMessageToAll(COLOR_LIGHTRED,string);
return 1;
}
if(reason == 38)
{
new kstring[128];
new DBNameYEAH[MAX_PLAYER_NAME];
if(IsPlayerConnected(killerid))
{
GetPlayerName(playerid, name, sizeof(name));
GetPlayerName(killerid, DBNameYEAH, sizeof(DBNameYEAH));
format(string, 256, "AdmAviso: [%d]%s usou minigun em %s.",killerid,DBNameYEAH,name);
ABroadCast(COLOR_YELLOW,string,1);
printf("%s", kstring);
}
}
if(reason == 35)
{
new kstring[128];
new DBNameYEAH[MAX_PLAYER_NAME];
if(IsPlayerConnected(killerid))
{
GetPlayerName(killerid, DBNameYEAH, sizeof(DBNameYEAH));
format(string, 256, "AdmAviso: [%d]%s usou Bazuka em %s.",killerid,DBNameYEAH,name);
ABroadCast(COLOR_YELLOW,string,1);
printf("%s", kstring);
}
}
if(reason == 36)
{
new kstring[128];
new DBNameYEAH[MAX_PLAYER_NAME];
if(IsPlayerConnected(killerid))
{
GetPlayerName(killerid, DBNameYEAH, sizeof(DBNameYEAH));
format(string, 256, "AdmAviso: [%d]%s usou Bazuka =2= em %s.",killerid,DBNameYEAH,name);
ABroadCast(COLOR_YELLOW,string,1);
printf("%s", kstring);
}
}
if(reason == 26)
{
new kstring[128];
new DBNameYEAH[MAX_PLAYER_NAME];
if(IsPlayerConnected(killerid))
{
GetPlayerName(killerid, DBNameYEAH, sizeof(DBNameYEAH));
format(string, 256, "AdmAviso: [%d]%s usou 12 Cano cerrado em %s.",killerid,DBNameYEAH,name);
ABroadCast(COLOR_YELLOW,string,1);
printf("%s", kstring);
}
}
if(reason == 32)
{
new kstring[128];
new DBNameYEAH[MAX_PLAYER_NAME];
if(IsPlayerConnected(killerid))
{
GetPlayerName(killerid, DBNameYEAH, sizeof(DBNameYEAH));
format(string, 256, "AdmAviso: [%d]%s usou TEC9 em %s.",killerid,DBNameYEAH,name);
ABroadCast(COLOR_YELLOW,string,1);
printf("%s", kstring);
}
}
if(MISSAO[playerid] == 1)
{
SetPlayerName(playerid, "[GT3]");
MISSAO[playerid] = 0;
}
if (gPlayerCheckpointStatus[playerid] > 4 && gPlayerCheckpointStatus[playerid] < 11)
{
DisablePlayerCheckpoint(playerid);
gPlayerCheckpointStatus[playerid] = CHECKPOINT_Nenhum;
}
new caller = Mobile[playerid];
if(caller != 255)
{
if(caller < 255)
{
SendClientMessage(caller, COLOR_GRAD2, "Morreram do outro lado da linha....");
CellTime[caller] = 0;
CellTime[playerid] = 0;
Mobile[caller] = 255;
}
Mobile[playerid] = 255;
CellTime[playerid] = 0;
}
ClearCrime(playerid);
if(PlayerPaintballing[playerid] != 0)
{
PlayerPaintballKills[killerid] ++;
if(PlayerPaintballKills[killerid] > PaintballWinnerKills)
{
new killer[MAX_PLAYER_NAME];
PaintballWinner = killerid;
PaintballWinnerKills = PlayerPaintballKills[killerid];
GetPlayerName(killerid, killer, sizeof(killer));
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerPaintballing[i] != 0)
{
format(string, sizeof(string), "* %s estб em 1є com %d Kills.",killer,PaintballWinnerKills);
SendClientMessage(i, COLOR_WHITE, string);
}
}
}
}
return 1;
}
if(GettingCK[playerid] < 999 || OnCK[playerid] < 999)
{
if(IsPlayerConnected(killerid))
{
if(GettingCK[killerid] < 999 || OnCK[playerid] < 999)
{
new killer[MAX_PLAYER_NAME];
new dier[MAX_PLAYER_NAME];
GetPlayerName(playerid, dier, sizeof(dier));
GetPlayerName(killerid, killer, sizeof(killer));
format(string, sizeof(string), "* %s Voce tomou um Char Kill, e nao podera mais jogar com este personagem.",killer);
SendClientMessage(playerid, COLOR_LIGHTRED, string);
format(string, sizeof(string), "** %s Char Morto Por %s **",killer,dier);
CKLog(string);
PlayerInfo[playerid][pCK] = 1;
if(GettingCK[playerid] < 999) { GettingCK[playerid] = 999; }
else if(OnCK[playerid] < 999) { OnCK[playerid] = 999; }
if(GettingCK[killerid] < 999) { GettingCK[killerid] = 999; }
else if(OnCK[killerid] < 999) { OnCK[killerid] = 999; }
KickPlayer[playerid] = 1;
}
}
}
if(PlayerInfo[playerid][pHeadValue] > 0)
{
if(IsPlayerConnected(killerid))
{
if(gTeam[killerid] == 10 || PlayerInfo[killerid][pLider] == 8 || PlayerInfo[killerid][pMembro] == 8)
{
if(GoChase[killerid] == playerid)
{
ConsumingMoney[killerid] = 1;
new killer[MAX_PLAYER_NAME];
GetPlayerName(killerid, killer, sizeof(killer));
GivePlayerMoneyEx(killerid, PlayerInfo[playerid][pHeadValue]);
format(string,128,"O mercenбrio %s cumpriu o contrato em %s e recebeu R$%d.",killer,name,PlayerInfo[playerid][pHeadValue]);
SendFamilyMessage(8, COLOR_YELLOW, string);
new pstr[256];
format(pstr,sizeof(pstr),"O mercenбrio %s cumpriu contrato em vocк. Sua morte nгo foi DM (Deatch Match).",pNome(killerid));
SendClientMessage(playerid,COLOR_GRAD1,pstr);
PlayerInfo[playerid][pHeadValue] = 0;
GotHit[playerid] = 0;
PlayerInfo[hitid][pMask] = 0;
GetChased[playerid] = 999;
GoChase[killerid] = 999;
}
}
}
}
if(victimteam >= 4)
{
if(IsPlayerConnected(killerid))
{
//new killer[MAX_PLAYER_NAME];
//GetPlayerName(killerid, killer, sizeof(killer));
new slice = 100; //R$100
playercash = GetPlayerMoneyEx(playerid);
if(gTeam[killerid] != 2) { WantedPoints[killerid] += 2; } //+ 2 wanted points
if(SafeTime[playerid] <= 0)
{
if(gTeam[killerid] != gTeam[playerid])
{
if(GetPlayerState(killerid) == 1)
{
PlayerInfo[killerid][pKills] = PlayerInfo[killerid][pKills] + 2;
}
else
{
PlayerInfo[killerid][pKills]++;
}
PlayerInfo[playerid][pKills]--;
}
}
/*if (strlen(deathreason) > 0)// patch
{
if (((gTeam[killerid]) == 1) || ((gTeam[killerid]) == 3 && civnokill) || gTeam[killerid] == gTeam[playerid])//med kill criminal
{
format(string, sizeof(string), ".: %s murdered %s. (%s) :.", killer, name, deathreason);
}
else
{
format(string, sizeof(string), ".: %s murdered %s. (%s) for R$%d :.", killer, name, deathreason, slice);
}
}
else
{
if (((gTeam[killerid]) == 1) || ((gTeam[killerid]) == 3 && civnokill || gTeam[killerid] == gTeam[playerid]))
{
format(string, sizeof(string), ".: %s murdered %s :.", killer, name);
}
else
{
format(string, sizeof(string), ".: %s murdered %s for R$%d :.", killer, name, slice);
}
}*/
if (((gTeam[killerid]) == 1) || ((gTeam[killerid]) == 3 && civnokill) || (gTeam[killerid] == gTeam[playerid] && gTeam[playerid] != 4))
{
slice = 0;
}
if (((gTeam[killerid]) != 4) && ((gTeam[killerid]) == gTeam[playerid]))//no team kill
{
slice = 0;
}
if (playercash > 0)
{
GivePlayerMoneyEx(playerid, -slice);
}
else
{
slice = slice+500;
}
GivePlayerMoneyEx(killerid, slice);
//GameTextForPlayer(playerid, dmessage, 5000, 2);
PlayerPlaySound(killerid, 1083, 0.0, 0.0, 0.0);
if(!IsACop(killerid))
{
WantedPoints[killerid] += 2; //+ 2 wanted points
if (((gTeam[killerid]) == 3) && reason != 49)
{
SetPlayerCriminal(killerid,255, "Homicнdio");
}
else if (((gTeam[killerid]) == 3) && reason == 49)
{
SetPlayerCriminal(killerid,255, "Assassinato, e fuga");
}
}
}
}
else if (victimteam == 2)
{
if(IsPlayerConnected(killerid))
{
//new killer[MAX_PLAYER_NAME];
//GetPlayerName(killerid, killer, sizeof(killer));
// Cop kill
PlayerInfo[playerid][pKills]--;
if (gTeam[killerid] == 2)//cops kill cop
{
//format(string,128,".: Officer %s murdered Officer %s (%s) and was sued for R$%d :.",killer,name,deathreason,suecost);
PlayerPlaySound(killerid, 1084, 0.0, 0.0, 0.0);
GivePlayerMoneyEx(killerid, -suecost);
GivePlayerMoneyEx(playerid, suecost+100);//+100pays hospital bill
}
else
{
//format(string,128,".: %s murdered Officer %s (%s) :.",killer,name,deathreason);
}
if (gTeam[killerid] >= 3)
{
if(!IsACop(killerid))
{
WantedPoints[killerid] += 2; //+ 2 wanted points
if(reason != 49)
{
SetPlayerCriminal(killerid,255, "Homicнdio");
}
else if (reason == 49)
{
SetPlayerCriminal(killerid,255, "Assassinato, e fuga");
}
}
}
if(gTeam[killerid] >= 5 && SafeTime[playerid] <= 0)
{
if(GetPlayerState(killerid) == 1)
{
PlayerInfo[killerid][pKills] = PlayerInfo[killerid][pKills]+2;
}
else
{
PlayerInfo[killerid][pKills]++;
}
WantedPoints[killerid]+=2;
}
//BroadCast(COLOR_RED, string);
}
}
else if (victimteam == 3)
{
if(IsPlayerConnected(killerid))
{
//new killer[MAX_PLAYER_NAME];
//GetPlayerName(killerid, killer, sizeof(killer));
// Civ kill
if ((gTeam[killerid]) == 2)//cops kill civ
{
if(WantedLevel[playerid] < 1)
{
//format(string,128,".: Officer %s murdered %s (%s) and was sued for R$%d :.",killer,name,deathreason,suecost);
PlayerPlaySound(killerid, 1084, 0.0, 0.0, 0.0);
GivePlayerMoneyEx(killerid, -suecost);
GivePlayerMoneyEx(playerid, suecost+100);//+100pays hospital bill
}
}
else
{
//format(string,128,".: %s murdered %s (%s) :.",killer,name,deathreason);
WantedPoints[killerid] += 2;
}
if(!IsACop(killerid))
{
WantedPoints[killerid] += 2; //+ 2 wanted points
if (((gTeam[killerid]) >= 3 || (gTeam[killerid]) == 1) && reason != 49)
{
SetPlayerCriminal(killerid,255, "Homicнdio");
}
else if (((gTeam[killerid]) >= 3 || (gTeam[killerid]) == 1) && reason == 49)
{
SetPlayerCriminal(killerid,255, "Assassinato, e fuga");
}
}
//BroadCast(COLOR_RED, string);
}
}
else if (victimteam == 1)
{
if(IsPlayerConnected(killerid))
{
//new killer[MAX_PLAYER_NAME];
//GetPlayerName(killerid, killer, sizeof(killer));
// Civ kill
if ((gTeam[killerid]) == 2)//cops kill civ
{
//format(string,128,".: Officer %s murdered SAMU %s (%s) and was sued for R$%d :.",killer,name,deathreason,suecost);
PlayerPlaySound(killerid, 1084, 0.0, 0.0, 0.0);
GivePlayerMoneyEx(killerid, -suecost);
GivePlayerMoneyEx(playerid, suecost+100);//+100pays hospital bill
}
else if ((gTeam[killerid]) == 1)//med kill civ
{
//format(string,128,".: SAMU %s murdered %s (%s) and was sued for R$%d :.",killer,name,deathreason,suecost);
PlayerPlaySound(killerid, 1084, 0.0, 0.0, 0.0);
GivePlayerMoneyEx(killerid, -suecost);
GivePlayerMoneyEx(playerid, suecost+100);//+100pays hospital bill
}
else
{
//format(string,128,".: %s murdered %s (%s) :.",killer,name,deathreason);
}
if(!IsACop(killerid))
{
WantedPoints[killerid] += 2; //+ 2 wanted points
if (((gTeam[killerid]) == 4) && reason != 49)
{
SetPlayerCriminal(killerid,255, "Homicнdio");
}
else if (((gTeam[killerid]) == 3) && reason == 49)
{
SetPlayerCriminal(killerid,255, "Assassinato, e fuga");
}
}
//BroadCast(COLOR_RED, string);
}
}
if (victimteam >= 3 && WantedPoints[playerid] > 0 && killerteam == 2)
{
SetPlayerFree(playerid,killerid, "Got Killed");
}
killerid = INVALID_PLAYER_ID;
SetPlayerColor(playerid,COLOR_GRAD2);
return 1;
}