pawn Код:
if(EscapedConvict[giveplayerid] == 1 && GetPlayerWantedLevel(giveplayerid) >=10){
for(new i=0; i < MAX_PLAYERS; i++)
{
arrestrank[i] +=1;//here you're looping through every player and giving every player +1 arrestrank, so you might want to add some check to see if they are a cop, not sure what you actually want.
}
SetPlayerInterior(giveplayerid,10);
SetPlayerPos(giveplayerid, 219.7640,110.4339,999.0156);
SetPlayerFacingAngle(giveplayerid,2.2339);
format(szstring, sizeof(szstring), "Escaped Convict %s(%d) has been re-arrested and sent to Alcatraz by Officer %s(%d) ",pname,giveplayerid,oname,playerid);
SendClientMessageToAll(0x00C7FFAA, szstring);
SendClientMessage(giveplayerid, 0xA9A9A9AA, "|_You Have Been Arrested_|");
format(szstring, sizeof(szstring), "You have been sent to Alcatraz by Officer %s(%d)",oname,playerid);
SendClientMessage(giveplayerid,0x00C7FFAA, szstring);
SendClientMessage(giveplayerid,0x00C7FFAA,"You will be auto-released from Alcatraz once you have served your sentence");
SendClientMessage(giveplayerid,0x00C7FFAA,"If Alcatraz life sucks for you... Why not ask a friend to visit you? /reqvisit (id)");
SendClientMessage(playerid, 0xA9A9A9AA, "|_Suspect Arrested_|");
format(szstring, sizeof(szstring), "You have sent escaped prisoner %s(%d) to Alcatraz - you receive a $4000 re-capture bonus",pname,giveplayerid);
SendClientMessage(playerid,0x00C7FFAA, szstring);
GameTextForPlayer(playerid,"~b~Suspect Arrested",5000,3);
format(szstring, sizeof(szstring), "Escaped Convict %s(%d) has been re-arrested and sent to Alcatraz by Officer %s(%d)",pname,giveplayerid,oname,playerid);
printf("%s", szstring);
SendClientMessage(giveplayerid,0xFF7F50AA,"If you leave the server while you are in jail you WILL be banned");
GivePlayerMoney(playerid,4000);
Jailed[giveplayerid] =1;
InAlcatraz[giveplayerid] =1;
StoleCopCarRecent[giveplayerid] =0;
triedtoescaperecent[giveplayerid] =1;
ResetPlayerWeapons(giveplayerid);
JailTime[giveplayerid] =320;
JailTimeServed[giveplayerid] =0;
EscapedConvict[giveplayerid] =0;
SetPlayerWantedLevel(giveplayerid,0);
oscore = GetPlayerScore(playerid);
SetPlayerScore(playerid, oscore +1);
return 1;
}