Bail someone..
#1

Hi How To I can make /bail [ID] Example: If there someone his time of jail is finished and he don't have engouh money to pay the bail.. And someone bail him they message send to All players a messages a Example: Tracking(5) has bailed the jail amount of the player Track(1) How? I've creating a command but I don't even know how to creating this factions...

PHP код:
CMD:bail(playeridparams[])
{
    new 
pName[MAX_PLAYER_NAME],targetid;
    
GetPlayerName(playeridpNamesizeof(pName));
    if(
sscanf(params"u"playerid)) return SendClientMessage(playeridCOLOR_WHITE"{FF0000}Error: /Bail <playerid>");
    if(!
IsPlayerConnected(targetid)) return SendClientMessage(playeridRED"Player not found.");
    if(
PlayerInfo[playerid][pJailed] == 0) return SendClientMessage(playeridred"{FF0000}Error: This player is not in jail.");
    if(
BailPlayer[playerid] == 1)
    {
         
MoneyForBail[playerid] = random(7000) + 1000;
           if(
MoneyForBail[playerid] > GetPlayerCash(playerid))
        {
            if(
GetPlayerMoney(playerid) < MoneyForBail[playerid]) return SendClientMessage(playeridCOLOR_RED"{FF0000}Error: {FFFFFF}You don't have engouh money to bail yourself.");
            
BailPlayer[playerid] = 0;
            
format(fstrsizeof(fstr), "[DISPATCH]: Suspect %s[%d) has bail himself."pNameplayerid);
            
CopRadio(COLOR_DODGERBLUEfstr);
            
format(fstr2sizeof(fstr2), "{FFFFFF}[JAIL RELEASE]: {FFD700}%s(%d) {FFFFFF}has been released from {33FF33}Jail{FFFFFF}. Bail paid ({33FF33}$%d{FFFFFF})!"pName,playeridMoneyForBail[playerid]);
            
SendClientMessageToAll(COLOR_DODGERBLUEfstr2);
            
            
TextDrawHideForPlayer(playeridTextdraw0);
            
TextDrawHideForPlayer(playeridTextdraw1);
               
TextDrawHideForPlayer(playeridTextdraw2);
            
TextDrawHideForPlayer(playeridTextdraw3);
            
TextDrawHideForPlayer(playeridTextdraw9);
            
            
KillTimer(pJailTimerID[playerid]);
            
KillTimer(SendToJail[playerid]);
            
KillTimer(pJailCount[playerid]);
            
BeginArrested[playerid] = 0;
            
MoneyForBail[playerid] = 0;
            
SetPlayerInterior(playerid3);
            
PlayerInfo[playerid][pJailed] = 0;
            
SetPlayerPos(playerid199.4501,169.1128,1003.0234);
            
SetPlayerHealth(playerid100);
            
GivePlayerMoney(playerid, -MoneyForBail[playerid]);
        }
    }
    return 
1;

Reply
#2

Someone help me?
Reply
#3

GUYS HELP ME! None replying? I just want..

Example: If someone bail the player they must say : Rocking(53) has payed player Jackson(12)! Bail Amount: $3432
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)