Problem: the timer should run every 30 minutes but it doesn't it runs after like 1-2 minutes :S
Код:
forward eat(playerid);
public eat(playerid)
{
if(PlayerInfo[playerid][pKasutajaK6htArv] > 0)
{
PlayerInfo[playerid][pKasutajaK6htArv]--;
}
if(PlayerInfo[playerid][pKasutajaK6htArv] == 0)
if(SisseLogitud[playerid] == 1)
{
PlayerInfo[playerid][pKasutajaK6ht] = 0;//paneb kхhu tьhjaks
new string2[256], pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, sizeof(pname));
format(string2, sizeof(string2), "* Kхht koriseb((%s))", pname);
SendLocalMessage(playerid, LILLA, 15, string2);
SendClientMessage(playerid,PUNANE,"Hoiatus! Sul on kхht tьhi, pead sццma muidu 20minuti pдrast satud haiglasse.");
K6htTyhiSatubHaiglasse[playerid] = 1;
}
if(K6htTyhiSatubHaiglasse[playerid] == 1)
{
K6htTyhiSatubHaiglasse[playerid] = 0;
new string2[256], pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, sizeof(pname));
format(string2, sizeof(string2), "* Kaotas teadvuse ((%s))", pname);
SendLocalMessage(playerid, LILLA, 15, string2);
format(string2, sizeof(string2), "* Kukkus pikali ((%s))", pname);
SendLocalMessage(playerid, LILLA, 15, string2);
format(string2, sizeof(string2), "* Kiirabi toimetab mehe haiglasse ((%s))", pname);
SendLocalMessage(playerid, LILLA, 15, string2);
PlayerInfo[playerid][pKasutajaHaiglas] = 1;
PlayerInfo[playerid][pKasutajaHaiglaAeg] = 300;//Haiglaaeg kui kaua peab haiglas olema,5 minutit hetkel
K6htTyhiSatubHaiglasse[playerid] = 1;
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid,0);
SetPlayerPos(playerid,1900.0356,-1658.0906,13.5820);
GetPlayerName(playerid, pname, sizeof(pname));
format(string2, sizeof(string2), "* Tuleb teadvusele ((%s))", pname);
SendLocalMessage(playerid, LILLA, 15, string2);
format(string2, sizeof(string2), "* %s tхuseb voodist pьsti", pname);
SendLocalMessage(playerid, LILLA, 15, string2);
}
}
i Dont understand :S, atleast can you tell me whats wrong?, my timers millisecound time is correct and fuction also please help
Thanks thanks Thanks thanks thanks thanks thanks thanks thanks and thanks again.