Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- COMMAND:bail(playerid,params[]) {
- new string[96], bailon;
- if(PlayerInfo[playerid][pJailTime] > 1)
- {
- if (PlayerInfo[playerid][pJailTime] <= 300) bailon = 100000;
- else if (ISBetween(PlayerInfo[playerid][pJailTime], 301, 600)) bailon = 200000;
- else if (ISBetween(PlayerInfo[playerid][pJailTime], 601, 1200)) bailon = 300000;
- else if (ISBetween(PlayerInfo[playerid][pJailTime], 1201, 1800)) bailon = 400000;
- else if (ISBetween(PlayerInfo[playerid][pJailTime], 1801, 2400)) bailon = 500000;
- else if (ISBetween(PlayerInfo[playerid][pJailTime], 2401, 3000)) bailon = 600000;
- else if (ISBetween(PlayerInfo[playerid][pJailTime], 3001, 3600)) bailon = 700000;
- else if (ISBetween(PlayerInfo[playerid][pJailTime], 3601, 4200)) bailon = 800000;
- else if (ISBetween(PlayerInfo[playerid][pJailTime], 4201, 4800)) bailon = 900000;
- else if (PlayerInfo[playerid][pJailTime] >= 4801) bailon = 1000000;
- if (BaniServerSide[playerid] > bailon )
- {
- format(string, sizeof(string),"Are you sure ?\n\nBail cost: $%s", FormatNumber( bailon, 0, '.' ) );
- ShowPlayerDialog(playerid, DIALOGID_BAILCONFIRM, DIALOG_STYLE_MSGBOX, "Bail", string, "Yes", "No");
- }
- else
- {
- format(string, sizeof(string),"You don't have enough money! You need: $%s", FormatNumber( bailon, 0, '.' ) );
- ShowPlayerDialog(playerid, DIALOGID_NO_ACTION, DIALOG_STYLE_MSGBOX, "Bail", string, "Yes", "");
- }
- } else SendClientMessage(playerid, COLOR_GRAD1, "You are not in jail!");
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement