Please Help me
#1

<Removed> I FIXED
Reply
#2

pawn Код:
dcmd_usebcard(playerid,params[])
{
    #pragma unused params
    new string[128];
    if(BailCards[playerid] <= 0)
    {
        SendClientMessage(playerid, COLOR_ERROR, "You don't have any Bail Cards!");
        return 1;
    }
    if(JailTime[playerid] == 0)
    {
       SendClientMessage(playerid,COLOR_ERROR,"You aren't in jail , From where can you escape ?!");
       return 1;
    }
    if(AttemptedToEscapeFromJail[playerid] >= 1)
    {
        SendClientMessage(playerid,COLOR_ERROR,"You are tired from the last try to escape from jail. Please wait..");
        return 1;
    }
    if(JailedByAdmin[playerid] == 1)
    {
        SendClientMessage(playerid,COLOR_ERROR,"You can't use this command because you are jailed by an Admin.");
        return 1;
    }
    BailCards[playerid]--;
    format(string,sizeof(string),"%s(%d) has used one of his Bail Cards and went out from jail.",PlayerName(playerid),playerid);
    SendClientMessageToAll(COLOR_ADMIN,string);
    TotalJailTime[playerid] =0;
    JailTime[playerid] =0;
    SetPlayerPos(playerid, 1545.2606,-1674.9889,13.5600);
    SetPlayerInterior(playerid, 0);
    return 1;
}
You aren't checking whether they have a bail card..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)