SA-MP Forums Archive
Why won't this timer script work? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Why won't this timer script work? (/showthread.php?tid=104703)



Why won't this timer script work? - Battleskull - 25.10.2009

Код:
SetTimer("hackingdoor",1000,1);
SetTimer("Timer",100,1);
public Timer()
{		
         if(PlayerToPoint(3,playerid, 297.79, 1858.51, 6.77) && door3 == 0)
		{
   		GameTextForPlayer(playerid,"~g~HACKING DOOR(30 sec)",10,3);
   		hacking = 1;
		}
		else hacking = 0;
}

public hackingdoor()
{
	if(time >= 30)
	{
	  GameTextForPlayer(pilot,"~r~SECURITY BREACH!",3000,3);
	  MoveObject(gate2,297.79, 1858.51, 9.99,5);
		door3 = 1;
		time = 0;
		hacking = 0;
	}
	if(hacking == 1)
	{
	  time++;
	}
}
It says hacking door but the door never opens...