Код:
if(strcmp(cmdtext, "/robbank", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pRank] < 5)
{
SendClientMessage(playerid, COLOR_GREY, " Morate da ste Rank 5 za da ja ograbite bankata !");
return 1;
}
if(RobStart2[playerid] == 1)
{
if (!PlayerToPoint(30, playerid, -482.10000610,-183.69999695,972.29998779))
{
SendClientMessage(playerid, COLOR_GREY, "Ne ste vo blizina na banka!");
return 1;
}
GetPlayerName(playerid, sendername, sizeof(sendername));
SendClientMessage(playerid,COLOR_WHITE,"||| VESTI NA DENOT |||");
format(string, sizeof(string), "BANK ALARM: %s go zapocna grabezot BANK ALARM !!!.", sendername);
SendTeamMessage(1, COLOR_YELLOW, string);
SendTeamMessage(2, COLOR_YELLOW, string);
SendTeamMessage(3, COLOR_YELLOW, string);
SendTeamMessage(1, COLOR_YELLOW, string);
SendTeamMessage(2, COLOR_YELLOW, string);
SendTeamMessage(3, COLOR_YELLOW, string);
SendTeamMessage(1, COLOR_YELLOW, string);
SendTeamMessage(2, COLOR_YELLOW, string);
SendTeamMessage(3, COLOR_YELLOW, string);
SendClientMessage(playerid,COLOR_WHITE,"** Ve molimo pocekajte 3 minuti dodeka parite se prefrluvaat vo kombeto");
SetTimerEx("RobDone",60000, false, "i", playerid);
}
else
{
SendClientMessage(playerid, COLOR_RED, "* Ne,Nemoze taka ! ");
}
}
}
and i want to add a timer so once they rob the bank it can't be robed again for an hour i tryed many thing i didnt suceed can anyone help me?
It is much better to use the gettime() function to block an event for a specific amount of time, instead of using timers.
I was about to make you a timer, but Jeffry gave you the best solution for this.