Check unjail
#6

Is it even updating the time remaining?

use to paste code. Otherwise all formatting is lost and it looks like dogshit.


Chuck me a PM with what script it is as well if you can.

Edit - Have you tried going back to the initial scripts code, and looked at what else you've changed from that?

It looks fine, but it's quite different to what you've brought out. I'd be looking at where '[JailTime]' is being set in the script, maybe also put a line, that when you get jailed, it then gives you the JailTime back to you in seconds without having it changed to mins/seconds. Just a SendClientMessage would do it.

Код:
public SetPlayerUnjail()
{
	foreach(Player, i)
	{
		if(Player[i][JailTime] != 0)
		{
			if(Player[i][LoggedIn] == 1)
			{
				Player[i][JailTime]--;
				PlayerTextDrawShow(i, Jailtime[i]);
				new string3[60];
				format(string3,sizeof(string3),"ELIBERAT IN: ~r~%d MINUTE", Player[i][JailTime]/60+1);
				StopAudioStreamForPlayer(i);
				PlayerTextDrawSetString(i, Jailtime[i], string3);
			}
		}
		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);
		    	Player[i][Jailed] = 0;
				SendClientMessage(i, COLOR_WHITE, "Ai fost eliberat din inchisoare,sa nu mai faci vreo boacana...");
				SetPlayerSpecialAction(i,SPECIAL_ACTION_NONE);
				PlayerTextDrawHide(i, Jailtime[i]);
				TogglePlayerControllable(i, 1);
				StopAudioStreamForPlayer(i);
			}
			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, "Ai fost eliberat din inchisoare,sa nu mai faci vreo boacana...");
				SetPlayerSpecialAction(i,SPECIAL_ACTION_NONE);
				PlayerTextDrawHide(i, Jailtime[i]);
				TogglePlayerControllable(i, 1);
				StopAudioStreamForPlayer(i);
			}
		}
	}
}
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: 1 Guest(s)