/oprison doesn't work
#4

Код:
forward PrisonTimer();
public PrisonTimer()
{
	foreach(Player, playerid)
	{
		new string[128];
	    if(Player[playerid][pPrisonTime] <=0)
	    {
	        if(Player[playerid][pPrison] == 1) // NG Prison
			{
			    Player[playerid][pPrison] = 0;
				Player[playerid][pPrisonTime] = 0;
				SetPlayerInterior(playerid, 0);
				SetPlayerFacingAngle(playerid, 87.1763);
				SetPlayerColor(playerid, TRANSPARENT_WHITE);
				SetPlayerPos(playerid, 1546.1428,-1675.4786,13.5617);
				SetCameraBehindPlayer(playerid);
				SendClientMessage(playerid, COLOR_LIGHTBLUE, "You have served your prison time, try to be a better citizen.");
				format(string, sizeof(string), "Prison: %s has been released as they served their prison time.", GetName(playerid));
				foreach(Player, i)
				{
				    if(IsACop(i) && IsFBI(i) && IsDOC(i))
				    {
				        SendClientMessage(i, COLOR_BLUE, string);
				    }
				}
			}
	        else if(Player[playerid][pPrison] == 2) // Admin Prison
			{
			    Player[playerid][pPrison] = 0;
				Player[playerid][pPrisonTime] = 0;
				format(Player[playerid][pPrisonReason], 64, "");
				format(Player[playerid][pPrisonBy], 32, "");
				SetPlayerInterior(playerid, 0);
				SetPlayerVirtualWorld(playerid, 0);
				SetPlayerFacingAngle(playerid, 87.1763);
				SetPlayerColor(playerid, TRANSPARENT_WHITE);
				SetPlayerPos(playerid, 1546.1428,-1675.4786,13.5617);
				SetCameraBehindPlayer(playerid);
				SendClientMessage(playerid, COLOR_LIGHTBLUE, "You have served your prison time, try to be a better player.");
			}
	    }
	    else
	    {
            if(!IsAFK[playerid])
            {
        	   	Player[playerid][pPrisonTime] --;
	          	format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n~~n~~r~Prison Time Left: ~w~%d ~r~seconds", Player[playerid][pPrisonTime]);
	     		GameTextForPlayer(playerid, string,1500, 3);
	     	}
		}
	}
	return 1;
}
There's prisonTimer functions. Yes, directly from ini.

Quote:
Originally Posted by ATGOggy
Посмотреть сообщение
Add this: dini_Close(file);
Where?
Reply


Messages In This Thread
/oprison doesn't work - by iKevin - 17.03.2016, 17:08
Re: /oprison doesn't work - by introzen - 17.03.2016, 17:14
Re: /oprison doesn't work - by ATGOggy - 17.03.2016, 17:19
Re: /oprison doesn't work - by iKevin - 17.03.2016, 17:22
Re: /oprison doesn't work - by ATGOggy - 17.03.2016, 17:25
Re: /oprison doesn't work - by introzen - 17.03.2016, 17:27
Re: /oprison doesn't work - by iKevin - 17.03.2016, 17:37
Re: /oprison doesn't work - by introzen - 17.03.2016, 17:51
Re: /oprison doesn't work - by iKevin - 17.03.2016, 17:56
Re: /oprison doesn't work - by introzen - 17.03.2016, 17:58

Forum Jump:


Users browsing this thread: 1 Guest(s)