SA-MP Forums Archive
[timer quieston]rob bank - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [timer quieston]rob bank (/showthread.php?tid=200310)



[timer quieston]rob bank - propilot - 18.12.2010

Hey people! I would like to change my script to more time instead of two minutes. I am not sure how long is 10 mins
Код:
/*if(strcmp(cmd, "/robbank", true) == 0 || strcmp(cmdtext, "/ro", true) == 0)
{
    new suspect = GetClosestPlayer(playerid);
    if (!PlayerToPoint(5.0, playerid,  2309.8564,-13.7387,26.7422)) {
        SendClientMessage(playerid, COLOR_LIGHTRED, "You are not around the bank!");
        return 1;
    }
    if(robtime > 1) {
        format(string, sizeof(string), "The Bank has recently been robbed please wait [%d]", robtime);
        SendClientMessage(playerid,COLOR_LIGHTRED,string);
        return 1;
    }
    if (robbed == 1) {
        SendClientMessage(playerid, COLOR_YELLOW, "someone is already attempting to rob the bank please wait.");
        return 1;
    }
    if (playerrobbing[playerid] == 1) {
        SendClientMessage(playerid,COLOR_LIGHTRED, "You are already attempting to rob the bank please wait.");
        return 1;
    }
    if (GetPlayerWeapon(playerid) <= 1) {
        SendClientMessage(playerid, COLOR_LIGHTRED, "You must have a weapon to rob the bank");
        return 1;
    }
    GetPlayerName(playerid, sendername, sizeof(sendername));
    SendClientMessage(playerid,COLOR_LIGHTRED,"You need to stay in this area for atleast 2minutes.");
    format(string, sizeof(string), "HQ:(( %s is attempting to rob the bank get there as soon as you can ))", sendername);
    SendFamilyMessage(1, COLOR_DBLUE, string);
    robbed = 1;
    RobTimer[playerid] = 120;
    rob[playerid] =SetTimerEx("RobDone", 1000, 1, "d", playerid);
    playerrobbing[playerid] = 1;
    return 1;
}*/
changed too
Код:
/*if(strcmp(cmd, "/robbank", true) == 0 || strcmp(cmdtext, "/ro", true) == 0)
{
    new suspect = GetClosestPlayer(playerid);
    if (!PlayerToPoint(5.0, playerid,  2309.8564,-13.7387,26.7422)) {
        SendClientMessage(playerid, COLOR_LIGHTRED, "You are not around the bank!");
        return 1;
    }
    if(robtime > 1) {
        format(string, sizeof(string), "The Bank has recently been robbed please wait [%d]", robtime);
        SendClientMessage(playerid,COLOR_LIGHTRED,string);
        return 1;
    }
    if (robbed == 1) {
        SendClientMessage(playerid, COLOR_YELLOW, "someone is already attempting to rob the bank please wait.");
        return 1;
    }
    if (playerrobbing[playerid] == 1) {
        SendClientMessage(playerid,COLOR_LIGHTRED, "You are already attempting to rob the bank please wait.");
        return 1;
    }
    if (GetPlayerWeapon(playerid) <= 1) {
        SendClientMessage(playerid, COLOR_LIGHTRED, "You must have a weapon to rob the bank");
        return 1;
    }
    GetPlayerName(playerid, sendername, sizeof(sendername));
    SendClientMessage(playerid,COLOR_LIGHTRED,"You need to stay in this area for atleast 10 minutes.");
    format(string, sizeof(string), "HQ:(( %s is attempting to rob the bank get there as soon as you can ))", sendername);
    SendFamilyMessage(1, COLOR_DBLUE, string);
    robbed = 1;
    RobTimer[playerid] = 1000;
    rob[playerid] =SetTimerEx("RobDone", 1000, 1, "d", playerid);
    playerrobbing[playerid] = 1;
    return 1;
}*/



Re: [timer quieston]rob bank - Retardedwolf - 18.12.2010

6000


Re: [timer quieston]rob bank - propilot - 18.12.2010

thank you very much. But what do they call those timers? I mean like what do they use milliseconds or?
edit:
did the math it using seconds.
and you just told me 100 minutes xD it should be 600 thx for your help