17.04.2017, 19:42
Quote:
You guys are not getting the issue at hand, the issue is the timer wont count down the players jailed time to release them, thats the issue...
And the enterexittimer freezes players cause i used a mapped prison so it load the objects then unfreeze the players |
PHP код:
public PrisonTimer()
{
for(new i;i<MAX_PLAYERS;i++)
{
if(pInfo[i][Jailed] > 0)
{
if(pInfo[i][JailedTime] == 0)
{
pInfo[i][Jailed] = 0;
SetPlayerInterior(i, 0);
SetPlayerVirtualWorld(i, 0);
SetPlayerFacingAngle(i, 88.5042);
SetPlayerColor(i, error);
SetPlayerPos(i, 1548.8394,-1669.6111,13.5656);
SetCameraBehindPlayer(i);
SendClientMessage(i, jblue, " Time Served. Be on your best behaviour now :) .");
}
else
{
new string[128];
pInfo[i][JailedTime] --;
format(string,sizeof(string),"~r~Jailed Time Left: ~w~%d ~r~seconds", pInfo[i][JailedTime]);
GameTextForPlayer(i, string, 1500, 3);
}
}
}
return 1;
}