Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(newstate == PLAYER_STATE_WASTED)
- {
- StopAudioStreamForPlayer(playerid);
- if(PlayerInfo[playerid][pWanted] >= 1)
- {
- new string2[512], wakaname[MAX_PLAYER_NAME], wakaname2[MAX_PLAYER_NAME], price = PlayerInfo[playerid][pWanted] * 5000, count, str23[MAX_STRING], wantedlost2 = PlayerInfo[playerid][pWanted], string3[256];
- if((PlayerInfo[playerid][pMember] != 1 && PlayerInfo[playerid][pMember] != 2))
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(IsACop(i) && CrimInRange(50.0, playerid,i) && OnDuty[i] == 1)
- {
- GetPlayerName(i, wakaname2, MAX_PLAYER_NAME);
- count++;
- //format(string3, sizeof(string3), "~w~Running Suspect bonus!~g~$%d", totalprice);
- //GameTextForPlayer(i, string3, 5000, 1);
- //ConsumingMoney[i] = 1;
- GivePlayerCash(i, price);
- Update(i, pCashx);
- PlayerPlaySound(i, 1058, 0.0, 0.0, 0.0);
- new streap[MAX_PLAYER_NAME];
- GetPlayerName(playerid, streap, sizeof(streap));
- }
- }
- }
- if(count == 1)
- {
- GetPlayerName(playerid, wakaname, MAX_PLAYER_NAME);
- format(string3, sizeof(string3), "* %s is now in jail! Thanks to: %s!", wakaname, wakaname2);
- ProxDetector(50.0, playerid, string3,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
- PlayerInfo[playerid][pJailTime] = (PlayerInfo[playerid][pWanted])*(300);
- format(string3, sizeof(string3), "* You were killed and arrested for %d and lost $%s.", PlayerInfo[playerid][pJailTime], FormatNumber(price));
- SendClientMessage(playerid, COLOR_LIGHTRED, string3);
- PlayerInfo[playerid][pJailed] = 1;
- PlayerInfo[playerid][pWanted] = 0;
- PlayerInfo[playerid][pWantedDeaths] += 1;
- SetPlayerWantedLevel(playerid,0);
- GivePlayerCash(playerid, - price);
- Update(playerid,pWantedx);
- Update(playerid,pJailedx);
- Update(playerid,pJailTimex);
- ClearCrimes(playerid);
- TogglePlayerControllable(playerid, 0);
- SetTimerEx("UnFreezeStation", 1000, false, "i", playerid);
- PlayerTextDrawHide(playerid, WantedTime[playerid]);
- }
- else if(count > 1)
- {
- GetPlayerName(playerid, wakaname, MAX_PLAYER_NAME);
- format(string3, sizeof(string3), "* %s is now in jail!", wakaname, wakaname2);
- ProxDetector(50.0, playerid, string3,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
- PlayerInfo[playerid][pJailTime] = (PlayerInfo[playerid][pWanted])*(300);
- format(string3, sizeof(string3), "* You were killed and arrested for %d and lost $%s.", PlayerInfo[playerid][pJailTime], FormatNumber(price));
- SendClientMessage(playerid, COLOR_LIGHTRED, string3);
- PlayerInfo[playerid][pJailed] = 1;
- PlayerInfo[playerid][pWanted] = 0;
- PlayerInfo[playerid][pWantedDeaths] += 1;
- SetPlayerWantedLevel(playerid,0);
- GivePlayerCash(playerid, - price);
- Update(playerid,pWantedx);
- Update(playerid,pJailedx);
- Update(playerid,pJailTimex);
- ClearCrimes(playerid);
- TogglePlayerControllable(playerid, 0);
- SetTimerEx("UnFreezeStation", 1000, false, "i", playerid);
- PlayerTextDrawHide(playerid, WantedTime[playerid]);
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment