Breakcuffs bug
#1

I made a breakcuff command for stevo127's script , it autobreaks the cuff as soon as you get cuffed? You dont even need to type /breakcuffs , idk why .. Please help ..

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] =0;
    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
#2

Can you please use Code to keep tidy your command we cant read that
Reply
#3

Quote:
Originally Posted by aslan890
Посмотреть сообщение
Can you please use Code to keep tidy your command we cant read that
What you mean?
Reply
#4

[pawn]First
[ /pawn] end of the code.
Reply
#5

Done but can you please help me now !
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)