Advertisement
Guest User

Untitled

a guest
Dec 22nd, 2014
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.47 KB | None | 0 0
  1. COMMAND:bail(playerid,params[]) {
  2.     new string[96], bailon;
  3.     if(PlayerInfo[playerid][pJailTime] > 1)
  4.     {
  5.         if (PlayerInfo[playerid][pJailTime] <= 300) bailon = 100000;
  6.         else if (ISBetween(PlayerInfo[playerid][pJailTime], 301, 600)) bailon = 200000;
  7.         else if (ISBetween(PlayerInfo[playerid][pJailTime], 601, 1200)) bailon = 300000;
  8.         else if (ISBetween(PlayerInfo[playerid][pJailTime], 1201, 1800)) bailon = 400000;
  9.         else if (ISBetween(PlayerInfo[playerid][pJailTime], 1801, 2400)) bailon = 500000;
  10.         else if (ISBetween(PlayerInfo[playerid][pJailTime], 2401, 3000)) bailon = 600000;
  11.         else if (ISBetween(PlayerInfo[playerid][pJailTime], 3001, 3600)) bailon = 700000;
  12.         else if (ISBetween(PlayerInfo[playerid][pJailTime], 3601, 4200)) bailon = 800000;
  13.         else if (ISBetween(PlayerInfo[playerid][pJailTime], 4201, 4800)) bailon = 900000;
  14.         else if (PlayerInfo[playerid][pJailTime] >= 4801) bailon = 1000000;
  15.        
  16.         if (BaniServerSide[playerid] > bailon )
  17.         {
  18.             format(string, sizeof(string),"Are you sure ?\n\nBail cost: $%s", FormatNumber( bailon, 0, '.' ) );
  19.             ShowPlayerDialog(playerid, DIALOGID_BAILCONFIRM, DIALOG_STYLE_MSGBOX, "Bail", string, "Yes", "No");
  20.         }
  21.         else
  22.         {
  23.             format(string, sizeof(string),"You don't have enough money! You need: $%s", FormatNumber( bailon, 0, '.' ) );
  24.             ShowPlayerDialog(playerid, DIALOGID_NO_ACTION, DIALOG_STYLE_MSGBOX, "Bail", string, "Yes", "");
  25.         }
  26.        
  27.     } else SendClientMessage(playerid, COLOR_GRAD1, "You are not in jail!");
  28.     return 1;
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement