Check unjail
#3

Quote:
Originally Posted by Sew_Sumi
Посмотреть сообщение
It's because that segment of code is shown because it's out of the loops, and you aren't excluding it.

Код:
}
	Player[i][Jailed] = 0;
	SendClientMessage(i, COLOR_WHITE, "Ti-ai ispasit pedeapsa,sa nu mai faci vreo boacana.");----Line 9442
	SetPlayerSpecialAction(i,SPECIAL_ACTION_NONE);
	PlayerTextDrawHide(i, Jailtime[i]);
	TogglePlayerControllable(i, 1);
All of that, should be in the previous loop where it's checking if the jailtime is up, not outside the loop.

Код:
if(Player[i][JailTime] <= 0)
	{
		Player[i][JailTime] = 0;
		if(Player[i][Jailed] == 1)
		 	{
				SetPlayerInterior(i, 6);
		    	SetPlayerPos(i, 268.7461,76.8184,1001.0391);
			}
		if(Player[i][Jailed] == 2)
			{
			SetPlayerInterior(i, 0);
			SetPlayerVirtualWorld(i, 0);
			SetPlayerPos(i, 1800.1581,-1865.7731,13.5722);
			}
        Player[i][Jailed] = 0;
        SendClientMessage(i, COLOR_WHITE, "Ti-ai ispasit pedeapsa,sa nu mai faci vreo boacana.");----Line 9442
        SetPlayerSpecialAction(i,SPECIAL_ACTION_NONE);
        PlayerTextDrawHide(i, Jailtime[i]);
        TogglePlayerControllable(i, 1);
	}
	
	}
You will need to test this thoroughly as it's a blind paste, but it's likely to be that, that the reason it was showing is because it's in the wrong section of the loop.
Sorry but 10 minutes ago i'm edited code in:
Код:
public SetPlayerUnjail()
{
 	foreach(Player, i)
 	{
	if(Player[i][Jailed] > 0)
 	{
		if(Player[i][JailTime] > 0)
		{
			Player[i][JailTime]--;
			PlayerTextDrawShow(i, Jailtime[i]);
			new string3[60];
			format(string3,sizeof(string3),"ELIBERAT IN: ~r~%d MINUTE", Player[i][JailTime]/60+1);
			PlayerTextDrawSetString(i, Jailtime[i], string3);
		}
	}
	else if(Player[i][JailTime] <= 0)
	{
		Player[i][JailTime] = 0;
		if(Player[i][Jailed] == 1)
		 	{
		 	    Player[i][Jailed] = 0;
				SendClientMessage(i, COLOR_WHITE, "Ti-ai ispasit pedeapsa,sa nu mai faci vreo boacana.");
				SetPlayerSpecialAction(i,SPECIAL_ACTION_NONE);
				PlayerTextDrawHide(i, Jailtime[i]);
				TogglePlayerControllable(i, 1);
				SetPlayerInterior(i, 6);
		    	SetPlayerPos(i, 268.7461,76.8184,1001.0391);
			}
		if(Player[i][Jailed] == 2)
			{
			Player[i][Jailed] = 0;
			SendClientMessage(i, COLOR_WHITE, "Ti-ai ispasit pedeapsa,sa nu mai faci vreo boacana.");
			SetPlayerSpecialAction(i,SPECIAL_ACTION_NONE);
			PlayerTextDrawHide(i, Jailtime[i]);
			TogglePlayerControllable(i, 1);
			SetPlayerInterior(i, 0);
			SetPlayerVirtualWorld(i, 0);
			SetPlayerPos(i, 1800.1581,-1865.7731,13.5722);
			}
	}
	}
}
and now not work
Reply


Messages In This Thread
Check unjail - by Longover - 23.01.2018, 13:54
Re: Check unjail - by Sew_Sumi - 23.01.2018, 14:18
Re: Check unjail - by Longover - 23.01.2018, 14:43
Re: Check unjail - by Sew_Sumi - 23.01.2018, 14:55
Re: Check unjail - by Longover - 23.01.2018, 15:20
Re: Check unjail - by Sew_Sumi - 23.01.2018, 15:40

Forum Jump:


Users browsing this thread: 2 Guest(s)