SA-MP Forums Archive
Robbank Tiny Problem! - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Robbank Tiny Problem! (/showthread.php?tid=522204)



Robbank Tiny Problem! - Akcent_Voltaj - 26.06.2014

fixed!(Thanks)!


Re: Robbank Tiny Problem! - RedFusion - 26.06.2014

It is in milliseconds (ms)
1 second =1000 ms


Re: Robbank Tiny Problem! - Don_Cage - 26.06.2014

This should work. And the timer goes in milliseconds, example: 1000 is 1 second. So for 5 min you will need to set 300000(I allready done that in this code)
pawn Код:
if(strcmp(cmd, "/robbank", true) == 0)
{
    new success = random(2);
    if(BankRobbedRecently == 1)
    {
        SendClientMessage(playerid, COLOR_GREY, "* Ai deja incercat sau jefuit recent, va rugam sa asteptati !");
        return 1;
    }
    if(PlayerInfo[playerid][pRobTime] >= 1)
    {
        SendClientMessage(playerid, COLOR_GREY, "* Ai deja incercat sau jefuit recent, va rugam sa asteptati !");
        return 1;
    }
    if(IsPlayerInRangeOfPoint(playerid, 2, 345.7633,111.9576,1008.1844))
    {
        if(success == 1)
        {
            SendClientMessage(playerid, COLOR_ORANGE, "Jefuiti acum banca, va rugam sa ramaneti in punctul rosu 95 secunde!");
            RobbingTime[playerid] = 95;
            RobBankTimer = SetTimerEx("RobBank",1000,true,"i",playerid);
            SetPlayerCriminal(playerid,9,255, "Jefuirea Bancii");
            PlayerInfo[playerid][pRobTime] = 900;
            BankRobbedRecently = 1;
            SetTimer("UnsetBankRob",300000,false);
            ApplyAnimation(playerid, "BOMBER","BOM_Plant_Loop",4.0,1,0,0,1,0);
        }
        else
        {
            SendClientMessage(playerid, COLOR_ORANGE, "* Nu ai reusit sa jefuiesti Banca!");
            SetPlayerCriminal(playerid,9,255, "Incercarea de a jefui Banca");
            PlayerInfo[playerid][pRobTime] = 500;
        }
    }
    else
    {
        SendClientMessage(playerid, COLOR_GREY, "*Nu esti in Banca!");
        return 1;
    }
    return 1;
}