Galera й o seguinte, с sei oq tem de errado aki, mas quando o player с tem nenhuma procura, e um policial mata ele, ele vai preso.
pawn Код:
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)
{
format(gstring, sizeof(gstring), "~w~Suspeito ~r~Morto~n~Bonus~g~R$%d", price);
GameTextForPlayer(killerid, gstring, 5000, 1);
ConsumingMoney[killerid] = 1;
GivePlayerMoney(killerid, price / 2);
PlayerPlaySound(killerid, 1058, 0.0, 0.0, 0.0);
GivePlayerMoney(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)
{
format(gstring, sizeof(gstring), "~w~Suspeito ~r~Morto~n~Bonus~g~R$%d", price);
GameTextForPlayer(killerid, gstring, 5000, 1);
ConsumingMoney[killerid] = 1;
GivePlayerMoney(killerid, price / 2);
PlayerPlaySound(killerid, 1058, 0.0, 0.0, 0.0);
GivePlayerMoney(playerid, - price);
PlayerInfo[playerid][pJailed] = 3;
PlayerInfo[playerid][pJailTime] = (WantedPoints[playerid])*(180);
format(gstring, sizeof(gstring), "* Vocк estб preso por %d Segundos na HQ ROTA, 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)
{
format(gstring, sizeof(gstring), "~w~Suspeito ~r~Morto~n~Bonus~g~R$%d", price);
GameTextForPlayer(killerid, gstring, 5000, 1);
ConsumingMoney[killerid] = 1;
GivePlayerMoney(killerid, price / 2);
PlayerPlaySound(killerid, 1058, 0.0, 0.0, 0.0);
GivePlayerMoney(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)
{
format(gstring, sizeof(gstring), "~w~Suspeito ~r~Morto~n~Bonus~g~R$%d", price);
GameTextForPlayer(killerid, gstring, 5000, 1);
ConsumingMoney[killerid] = 1;
GivePlayerMoney(killerid, price / 2);
PlayerPlaySound(killerid, 1058, 0.0, 0.0, 0.0);
GivePlayerMoney(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);
PlayerInfo[playerid][pDrogas] = 0;
PlayerInfo[playerid][pDrogas2] = 0;
PlayerInfo[playerid][pDrogas3] = 0;
PlayerInfo[playerid][pMats] = 0;
}
if(PlayerInfo[killerid][pMembro] == 11 || PlayerInfo[killerid][pLider] == 11)
{
format(gstring, sizeof(gstring), "~w~Suspeito ~r~Morto~n~Bonus~g~R$%d", price);
GameTextForPlayer(killerid, gstring, 5000, 1);
ConsumingMoney[killerid] = 1;
GivePlayerMoney(killerid, price / 2);
PlayerPlaySound(killerid, 1058, 0.0, 0.0, 0.0);
GivePlayerMoney(playerid, - price);
PlayerInfo[playerid][pJailed] = 5;
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);
PlayerInfo[playerid][pDrogas] = 0;
PlayerInfo[playerid][pDrogas2] = 0;
PlayerInfo[playerid][pDrogas3] = 0;
PlayerInfo[playerid][pMats] = 0;
}
if(PlayerInfo[killerid][pMembro] == 26 || PlayerInfo[killerid][pLider] == 26)
{
format(gstring, sizeof(gstring), "~w~Suspeito ~r~Morto~n~Bonus~g~R$%d", price);
GameTextForPlayer(killerid, gstring, 5000, 1);
ConsumingMoney[killerid] = 1;
GivePlayerMoney(killerid, price / 2);
PlayerPlaySound(killerid, 1058, 0.0, 0.0, 0.0);
GivePlayerMoney(playerid, - price);
PlayerInfo[playerid][pJailed] = 8;
PlayerInfo[playerid][pJailTime] = (WantedPoints[playerid])*(180);
format(gstring, sizeof(gstring), "* Vocк estб preso por %d Segundos na Interpol, 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;
}
}
pawn Код:
public SetPlayerCriminal(playerid,declare,reason[])
{
if(IsPlayerConnected(playerid) && !IsACop(playerid))
{
if(WantedPoints[playerid] < 1500) WantedPoints[playerid] += 1;
PlayerInfo[playerid][pCrimes] += 1;
new turned[MAX_PLAYER_NAME];
new turner[MAX_PLAYER_NAME];
new location[MAX_ZONE_NAME];
GetPlayer2DZone(playerid, location, MAX_ZONE_NAME);
strmid(PlayerCrime[playerid][pAccusedof], reason, 0, strlen(reason), 255);
GetPlayerName(playerid, turned, sizeof(turned));
if (declare == 255)
{
format(turner, sizeof(turner), "Cвmeras de Seguranзa");
strmid(PlayerCrime[playerid][pVictim], turner, 0, strlen(turner), 255);
}
else
{
if(IsPlayerConnected(declare))
{
GetPlayerName(declare, turner, sizeof(turner));
strmid(PlayerCrime[playerid][pVictim], turner, 0, strlen(turner), 255);
strmid(PlayerCrime[declare][pBplayer], turned, 0, strlen(turned), 255);
strmid(PlayerCrime[declare][pAccusing], reason, 0, strlen(reason), 255);
}
}
format(gstring, sizeof(gstring), "Vocк cometeu um crime ( %s ). Relato: %s.",reason,turner);
SendClientMessage(playerid, COLOR_LIGHTRED, gstring);
SetPlayerWantedLevel(playerid, WantedPoints[playerid]);
format(gstring, sizeof(gstring), "Nнvel de procurado: %d", WantedPoints[playerid]);
SendClientMessage(playerid, COLOR_YELLOW, gstring);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(IsACop(i))
{
format(gstring, sizeof(gstring), "Todas as unidades:");
SendClientMessage(i, COLOR_LIGHTRED, gstring);
format(gstring, sizeof(gstring), "HQ - Denunciante: %s | Suspeito:{FF0000} %s",turner,turned);
SendClientMessage(i, TEAM_BLUE_COLOR, gstring);
format(gstring, sizeof(gstring), "HQ - Crime: {FF0000}%s | Localizaзгo: %s",reason,location);
SendClientMessage(i, TEAM_BLUE_COLOR, gstring);
if(GetPlayerInterior(playerid) == 0)
{
format(gstring, sizeof(gstring), "Interior: Nгo");
SendClientMessage(i, TEAM_BLUE_COLOR, gstring);
}
else
{
format(gstring, sizeof(gstring), "Interior: Sim");
SendClientMessage(i, TEAM_BLUE_COLOR, gstring);
}
}
}
}
}//not connected
}