Breakcuffs bug
#1

I made this command so you can do /breakcuffs if you get cuffed but somehow it auto breaks the cuff the second someone gets cuffed it automaticly removes the cuff ..

pawn Код:
dcmd_breakcuffs(playerid,params[])
{
    new string[128];
    #pragma unused params
    if(IsSpawned[playerid] != 1)
    {
        SendClientMessage(playerid,COLOR_ERROR,"You must be alive and spawned in order to be able to use this command.");
        return 1;
    }
    if(IsCuffed[playerid] == 0)
    {
        SendClientMessage(playerid,COLOR_ERROR,"You are not Cuffed. You cannot use this command.");
        return 1;
    }
    if(IsFrozen[playerid] == 1)
    {
        SendClientMessage(playerid,COLOR_ERROR,"You have been frozen by a Server Administrator. You cannot use this command.");
        return 1;
    }
   
        if(AttemptedToBreakCuffsRecently[playerid] >= 1)
    {
        SendClientMessage(playerid,COLOR_ERROR,"You are too tired from your last break attempt. Please wait before trying to break your cuffs again.");
        return 1;
       
       
    }
    SendClientMessage(playerid,COLOR_DEADCONNECT,"[[_Cuffs Breaked_]]");
    SendClientMessage(playerid,COLOR_LIGHTBLUE,"You have successfully broke the cuffs, run before the cop see's it!");
    IsCuffed[playerid] =1;
    TogglePlayerControllable(playerid,1);
    TextDrawSetString(MessageTD[playerid],"ESCAPED");
    TextDrawShowForPlayer(playerid,MessageTD[playerid]);
    MessageTDTime[playerid] =5;
   

    format(string,sizeof(string),"[Cuff ESCAPE] %s(%d) Has broke his cuffs to escape from the cops.",PlayerName(playerid),playerid);
    SendClientMessageToAll(COLOR_LIGHTBLUE,string);
    return 1;
   

}
Reply


Messages In This Thread
Breakcuffs bug - by maho422 - 05.01.2013, 18:20
Re: Breakcuffs bug - by Riddy - 05.01.2013, 18:22
Re: Breakcuffs bug - by maho422 - 05.01.2013, 18:26
Re: Breakcuffs bug - by maho422 - 05.01.2013, 20:37

Forum Jump:


Users browsing this thread: 1 Guest(s)