Guest User

Untitled

a guest
Feb 20th, 2016
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.24 KB | None | 0 0
  1. if(newstate == PLAYER_STATE_WASTED)
  2. {
  3. StopAudioStreamForPlayer(playerid);
  4. if(PlayerInfo[playerid][pWanted] >= 1)
  5. {
  6. 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];
  7. if((PlayerInfo[playerid][pMember] != 1 && PlayerInfo[playerid][pMember] != 2))
  8. {
  9. for(new i = 0; i < MAX_PLAYERS; i++)
  10. {
  11. if(IsPlayerConnected(i))
  12. {
  13. if(IsACop(i) && CrimInRange(50.0, playerid,i) && OnDuty[i] == 1)
  14. {
  15. GetPlayerName(i, wakaname2, MAX_PLAYER_NAME);
  16. count++;
  17. //format(string3, sizeof(string3), "~w~Running Suspect bonus!~g~$%d", totalprice);
  18. //GameTextForPlayer(i, string3, 5000, 1);
  19. //ConsumingMoney[i] = 1;
  20. GivePlayerCash(i, price);
  21. Update(i, pCashx);
  22. PlayerPlaySound(i, 1058, 0.0, 0.0, 0.0);
  23. new streap[MAX_PLAYER_NAME];
  24. GetPlayerName(playerid, streap, sizeof(streap));
  25.  
  26. }
  27. }
  28. }
  29. if(count == 1)
  30. {
  31. GetPlayerName(playerid, wakaname, MAX_PLAYER_NAME);
  32. format(string3, sizeof(string3), "* %s is now in jail! Thanks to: %s!", wakaname, wakaname2);
  33. ProxDetector(50.0, playerid, string3,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  34. PlayerInfo[playerid][pJailTime] = (PlayerInfo[playerid][pWanted])*(300);
  35. format(string3, sizeof(string3), "* You were killed and arrested for %d and lost $%s.", PlayerInfo[playerid][pJailTime], FormatNumber(price));
  36. SendClientMessage(playerid, COLOR_LIGHTRED, string3);
  37. PlayerInfo[playerid][pJailed] = 1;
  38. PlayerInfo[playerid][pWanted] = 0;
  39. PlayerInfo[playerid][pWantedDeaths] += 1;
  40. SetPlayerWantedLevel(playerid,0);
  41. GivePlayerCash(playerid, - price);
  42. Update(playerid,pWantedx);
  43. Update(playerid,pJailedx);
  44. Update(playerid,pJailTimex);
  45. ClearCrimes(playerid);
  46. TogglePlayerControllable(playerid, 0);
  47. SetTimerEx("UnFreezeStation", 1000, false, "i", playerid);
  48. PlayerTextDrawHide(playerid, WantedTime[playerid]);
  49. }
  50. else if(count > 1)
  51. {
  52. GetPlayerName(playerid, wakaname, MAX_PLAYER_NAME);
  53. format(string3, sizeof(string3), "* %s is now in jail!", wakaname, wakaname2);
  54. ProxDetector(50.0, playerid, string3,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  55. PlayerInfo[playerid][pJailTime] = (PlayerInfo[playerid][pWanted])*(300);
  56. format(string3, sizeof(string3), "* You were killed and arrested for %d and lost $%s.", PlayerInfo[playerid][pJailTime], FormatNumber(price));
  57. SendClientMessage(playerid, COLOR_LIGHTRED, string3);
  58. PlayerInfo[playerid][pJailed] = 1;
  59. PlayerInfo[playerid][pWanted] = 0;
  60. PlayerInfo[playerid][pWantedDeaths] += 1;
  61. SetPlayerWantedLevel(playerid,0);
  62. GivePlayerCash(playerid, - price);
  63. Update(playerid,pWantedx);
  64. Update(playerid,pJailedx);
  65. Update(playerid,pJailTimex);
  66. ClearCrimes(playerid);
  67. TogglePlayerControllable(playerid, 0);
  68. SetTimerEx("UnFreezeStation", 1000, false, "i", playerid);
  69. PlayerTextDrawHide(playerid, WantedTime[playerid]);
  70. }
  71. }
  72. }
  73. }
Add Comment
Please, Sign In to add comment