22.04.2012, 18:22
Serб q o Erro pode Ser aaqui ?
pawn Код:
if(newstate == PLAYER_STATE_WASTED)
{
if(WantedPoints[playerid] >= 1 )
{
//new price = WantedPoints[playerid] * 50;
//new price = 500;
new deadprice = 500;
new count;
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pMember] == 1 || PlayerInfo[i][pMember] == 14 || PlayerInfo[i][pMember] == 7 || PlayerInfo[i][pMember] == 29 && CrimInRange(30.0, playerid,i))
{
count = 1;
format(string, sizeof(string), "~w~Suspeito Procurado ~r~MORTO ~n~");
GameTextForPlayer(i, string, 5000, 1);
ConsumingMoney[i] = 1;
PlayerPlaySound(i, 1058, 0.0, 0.0, 0.0);
//if(GetPlayerMoney(playerid) >= price) { GivePlayerMoney(playerid, - price); GivePlayerMoney(i,price);
//}
}
/*else
{
SendClientMessage(i, COLOR_YELLOW, "<< O suspeito nгo teve como pagar a dнvida aos oficiais >>");
}*/
if(PlayerInfo[i][pMember] == 21 && CrimInRange(30.0, playerid,i)) //Bope prender
{
count = 3;
format(string, sizeof(string), "~w~Suspeito Procurado ~r~MORTO ~n~");
GameTextForPlayer(i, string, 5000, 1);
ConsumingMoney[i] = 1;
PlayerPlaySound(i, 1058, 0.0, 0.0, 0.0);
//if(GetPlayerMoney(playerid) >= price) { GivePlayerMoney(playerid, - price); GivePlayerMoney(i,price);
//}
//else { SendClientMessage(i, COLOR_YELLOW, "<< O suspeito nгo teve como pagar a dнvida aos oficiais >>"); }
}
/*else
{
SendClientMessage(i, COLOR_YELLOW, "<< O suspeito nгo teve como pagar a dнvida aos oficiais >>");
}*/
if(PlayerInfo[i][pMember] == 31 || PlayerInfo[i][pMember] == 3 && CrimInRange(30.0, playerid,i)) //Marinha prender
{
count = 4;
format(string, sizeof(string), "~w~Suspeito Procurado ~r~MORTO ~n~");
GameTextForPlayer(i, string, 5000, 1);
ConsumingMoney[i] = 1;
PlayerPlaySound(i, 1058, 0.0, 0.0, 0.0);
//if(GetPlayerMoney(playerid) >= price) { GivePlayerMoney(playerid, - price); GivePlayerMoney(i,price);
//}
//else { SendClientMessage(i, COLOR_YELLOW, "<< O suspeito nгo teve como pagar a dнvida aos oficiais >>"); }
}
/*else
{
SendClientMessage(i, COLOR_YELLOW, "<< O suspeito nгo teve como pagar a dнvida aos oficiais >>");
}*/
if(PlayerInfo[i][pMember] == 2 && CrimInRange(30.0, playerid,i)) //Policia Federal prender
{
count = 5;
format(string, sizeof(string), "~w~Suspeito Procurado ~r~MORTO ~n~");
GameTextForPlayer(i, string, 5000, 1);
ConsumingMoney[i] = 1;
PlayerPlaySound(i, 1058, 0.0, 0.0, 0.0);
//if(GetPlayerMoney(playerid) >= price) { GivePlayerMoney(playerid, - price); GivePlayerMoney(i,price);
//}
//else { SendClientMessage(i, COLOR_YELLOW, "<< O suspeito nгo teve como pagar a dнvida aos oficiais >>"); }
}
/*else
{
SendClientMessage(i, COLOR_YELLOW, "<< O suspeito nгo teve como pagar a dнvida aos oficiais >>");
}*/
if(PlayerInfo[i][pMember] == 32 && CrimInRange(30.0, playerid,i)) //G.A.T.E prender
{
count = 6;
format(string, sizeof(string), "~w~Suspeito Procurado ~r~MORTO ~n~");
GameTextForPlayer(i, string, 5000, 1);
ConsumingMoney[i] = 1;
PlayerPlaySound(i, 1058, 0.0, 0.0, 0.0);
//if(GetPlayerMoney(playerid) >= price) { GivePlayerMoney(playerid, - price); GivePlayerMoney(i,price);
//}
//else { SendClientMessage(i, COLOR_YELLOW, "<< O suspeito nгo teve como pagar a dнvida aos oficiais >>"); }
}//else { SendClientMessage(i, COLOR_YELLOW, "<< O suspeito nгo teve como pagar a dнvida aos oficiais >>"); }
}
}
if(count == 1)
{
PlayerInfo[playerid][pWantedDeaths] += 1;
PlayerInfo[playerid][pJailed] = 1;
PlayerInfo[playerid][pJailTime] = (WantedPoints[playerid])*(240);
PlayerInfo[playerid][pJailTimeTotal] = (WantedPoints[playerid])*(240);
format(string, sizeof(string), "Vocк estб preso na DP por %d segundos e perdeu R$ %d por cometer crimes.", PlayerInfo[playerid][pJailTime], deadprice);
SendClientMessage(playerid, COLOR_OOC, string);
WantedPoints[playerid] = 0;
SetPlayerWantedLevel(playerid, WantedPoints[playerid]);
}
if(count == 3)
{
PlayerInfo[playerid][pWantedDeaths] += 1;
PlayerInfo[playerid][pJailed] = 4;
PlayerInfo[playerid][pJailTime] = (WantedPoints[playerid])*(240);
PlayerInfo[playerid][pJailTimeTotal] = (WantedPoints[playerid])*(240);
format(string, sizeof(string), "Vocк estб preso por %d segundos e perdeu R$ %d por cometer crimes.", PlayerInfo[playerid][pJailTime], deadprice);
SendClientMessage(playerid, COLOR_OOC, string);
WantedPoints[playerid] = 0;
SetPlayerWantedLevel(playerid, WantedPoints[playerid]);
}
if(count == 4)
{
PlayerInfo[playerid][pWantedDeaths] += 1;
PlayerInfo[playerid][pJailed] = 99;
PlayerInfo[playerid][pJailTime] = (WantedPoints[playerid])*(240);
PlayerInfo[playerid][pJailTimeTotal] = (WantedPoints[playerid])*(240);
format(string, sizeof(string), "Vocк estб preso por %d segundos e perdeu R$ %d por cometer crimes.", PlayerInfo[playerid][pJailTime], deadprice);
SendClientMessage(playerid, COLOR_OOC, string);
WantedPoints[playerid] = 0;
SetPlayerWantedLevel(playerid, WantedPoints[playerid]);
}
if(count == 5)
{
PlayerInfo[playerid][pWantedDeaths] += 1;
PlayerInfo[playerid][pJailed] = 3;
PlayerInfo[playerid][pJailTime] = (WantedPoints[playerid])*(240);
PlayerInfo[playerid][pJailTimeTotal] = (WantedPoints[playerid])*(240);
format(string, sizeof(string), "Vocк estб preso por %d segundos e perdeu R$ %d por cometer crimes.", PlayerInfo[playerid][pJailTime], deadprice);
SendClientMessage(playerid, COLOR_OOC, string);
WantedPoints[playerid] = 0;
SetPlayerWantedLevel(playerid, WantedPoints[playerid]);
}
if(count == 6)
{
PlayerInfo[playerid][pWantedDeaths] += 1;
PlayerInfo[playerid][pJailed] = 32;
PlayerInfo[playerid][pJailTime] = (WantedPoints[playerid])*(240);
PlayerInfo[playerid][pJailTimeTotal] = (WantedPoints[playerid])*(240);
format(string, sizeof(string), "Vocк estб preso por %d segundos e perdeu R$ %d por cometer crimes.", PlayerInfo[playerid][pJailTime], deadprice);
SendClientMessage(playerid, COLOR_OOC, string);
WantedPoints[playerid] = 0;
SetPlayerWantedLevel(playerid, WantedPoints[playerid]);
}
}