Advertisement
Guest User

Untitled

a guest
Aug 16th, 2011
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.69 KB | None | 0 0
  1. else if(strcmp(cmd,"jail",true) == 0)
  2. {
  3. if(PlayerInfo[playerid][Cop] == 1)
  4. {
  5. new plr;
  6. tmp = strtok(cmdtext, idx), plr = FindPlayerIDFromString(tmp);
  7. if (!strlen(tmp)) SendClientMessage(playerid,COLOR_YELLOW,"USAGE: /c jail [Nick/ID]");
  8. else if (plr == INACTIVE_PLAYER_ID) SendClientMessage(playerid,COLOR_YELLOW,"Error: Unknown player");
  9. else {
  10. if(nj == 0)
  11. {
  12. if(PlayerInfo[plr][Wanted] >= 1)
  13. {
  14. if(PlayerToPoint(40.0,playerid,390.9685,-507.1411,9.3956))
  15. {
  16. if(PlayerToPoint(40.0,plr,390.9685,-507.1411,9.3956))
  17. {
  18. new string[256];
  19. SendClientMessageToAll(COLOR_YELLOW,string);
  20. new surmsg[256];
  21. format(surmsg,sizeof(surmsg),"You Have Been Jailed by Officer:%s",gPlayers[playerid]);
  22. TogglePlayerControllable(playerid,0);
  23. new hisw;
  24. hisw = PlayerInfo[plr][Wanted];
  25. format(string,sizeof(string),"Officer: %s jailed suspect: %s for %d minutes!!",gPlayers[playerid],gPlayers[plr],hisw);
  26. SendClientMessage(plr,COLOR_YELLOW,surmsg);
  27. jailedname = gPlayers[plr];
  28. new thecash;
  29. thecash = PlayerInfo[plr][Wanted];
  30. new value;
  31. value = PlayerInfo[plr][Wanted] * 1000;
  32. new value2;
  33. value2 = value / 2;
  34. IncPlayerHandCash(playerid,value2);
  35. SetTimer("unjail",thecash * 35000,0);
  36. nj == 1;
  37. PlayerInfo[plr][Wanted] = 0;
  38. }
  39. else
  40. {
  41. SendClientMessage(playerid,COLOR_YELLOW,"The Suspect is not in Jail!");
  42. }
  43. }
  44.  
  45. else
  46. {
  47. SendClientMessage(playerid,COLOR_YELLOW,"You Cannnot Jail a Suspect without bieng in VCPD");
  48. }
  49. }
  50.  
  51. else
  52. {
  53. SendClientMessage(playerid,COLOR_YELLOW,"The Suspect is Not Wanted");
  54. }
  55. }
  56.  
  57. else if(nj == 1)
  58. {
  59. new string[256];
  60. format(string,sizeof(string),"Officer: %s jailed suspect: %s for 2 minutes!!",gPlayers[playerid],gPlayers[plr]);
  61. SendClientMessageToAll(COLOR_YELLOW,string);
  62. new surmsg[256];
  63. format(surmsg,sizeof(surmsg),"%s Jailed you!!!",gPlayers[plr]);
  64. TogglePlayerControllable(plr,0);
  65. SendClientMessage(plr,COLOR_YELLOW,surmsg);
  66. ajailname = gPlayers[plr];
  67. SetTimer("unjail2",200000,0);
  68. dj == 1;
  69. }
  70. }
  71. }
  72.  
  73. else
  74. {
  75. (PlayerInfo[playerid][Cop] != 1); SendClientMessage(playerid, COLOR_RED, "You are not a Police officer");
  76. }
  77. return 1;
  78. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement