how to make breakcuff command?
#9

Quote:
Originally Posted by Vanter
Посмотреть сообщение
it is realistic, you're requesting something long.. okay,
pawn Код:
new CuffTimer[MAX_PLAYERS];
new CuffBreakFailed[MAX_PLAYERS];
//OnGameModeInIt
    SetTimer("PlayerOneSecondVariables",1000,1);
   
forward PlayerOneSecondVariables();
public PlayerOneSecondVariables()
{
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        if(CuffTimer[i] >= 1)
        {
           CuffTimer[i] --;
        }
        if(CuffTimer[i] == 0)
        {
           new frand =random(10);
           if(frand < 6)
           {
              SendClientMessage(i, -1,"You've succefully broken your cuffs!");
              IsCuffed[i] =0;
              ClearAnimations(i);
           }
           if(frand > 5)
           {
              SendClienrMessage(i, -1,"You've failed to break your cuffs!");
              CuffBreakFailed[i] =30;
           }
        }
        if(CuffBreakFailed[i] >= 1)
        {
           CuffBreakFailed[i] --;
        }
     }
     return 1;
}

dcmd_breakcuff(playerid,params[])
{
    #pragma unused params
    new string[128];
    new ID;
    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_RED, "You're not currently cuffed.");
        return 1;
    }
    if(CuffBreakFailed[i] > 1)
    {
        SendClientMessage(playerid, COLOR_RED, "You've recently tried but failed, please wait.");
        return 1;
    }
    CuffTimer[playerid] =10;
    SendClientMessage(playerid, -1,"You are breaking cuffs, please wait 10 seconds.");
    return 1;
}
Wtf it keeps spamming ''You've succesfully break your cuffs'' you failed to break your cuffs etc. Now what?
Reply


Messages In This Thread
how to make breakcuff command? - by Uberanwar - 17.08.2013, 12:41
Re: how to make breakcuff command? - by JimmyCh - 17.08.2013, 12:54
Re: how to make breakcuff command? - by Uberanwar - 17.08.2013, 13:02
Re: how to make breakcuff command? - by JimmyCh - 17.08.2013, 13:07
Re: how to make breakcuff command? - by Uberanwar - 17.08.2013, 13:12
Re: how to make breakcuff command? - by Vanter - 17.08.2013, 13:18
Re: how to make breakcuff command? - by Kells - 17.08.2013, 13:24
Re: how to make breakcuff command? - by Vanter - 17.08.2013, 13:35
Re: how to make breakcuff command? - by Uberanwar - 17.08.2013, 16:00
Re: how to make breakcuff command? - by dominik523 - 17.08.2013, 17:16

Forum Jump:


Users browsing this thread: 1 Guest(s)