17.09.2018, 15:34
Hi. I have a timer set which shows when you enter in admin jail.
But the problem is that if I admin jail a player for 61 minutes, the countdown it shows for 60:00
If I admin jail a player for 300 minutes, countdown it shows for 60:00
can someone explain me why?
But the problem is that if I admin jail a player for 61 minutes, the countdown it shows for 60:00
If I admin jail a player for 300 minutes, countdown it shows for 60:00
can someone explain me why?
PHP код:
forward AjailCount(playerid);
public OnPlayerConnect(playerid)
playertimer[playerid] = SetTimerEx("AjailCount", 1000, true, "i", playerid);
PHP код:
public AjailCount(playerid)
{
if(--pInfo[playerid][pJailed] < 1)
{
KillTimer(playertimer[playerid]);
SendClientMessage(playerid, COLOR_RED, "Ai iesit din AdminJail..");
SetPlayerInterior(playerid, 0);//You can change interior
SetPlayerVirtualWorld(playerid, 0); //You can change virtual world
SetPlayerPos(playerid, 1529.6,-1691.2,13.3);
SaveStats(playerid);
}
else
{
new str[32];
format(str,sizeof(str),"%02d:%02d",((pInfo[playerid][pJailed]/60)%60),pInfo[playerid][pJailed]%60);
if(!GameTextForPlayer(playerid, str, 1200, 5))
KillTimer(playertimer[playerid]);
}
return 1;
}