SA-MP Forums Archive
Timer Help - 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)
+--- Thread: Timer Help (/showthread.php?tid=398687)



Timer Help - KP2 - 10.12.2012

Hey guys,
I add this ferry timer for a test but when i go to the place the game freezes and then i have to terminate via task manager. Please point out the problems.
Thank You,
Code:
Код:
#include <a_samp>
new obj1;
new obj2;
new obj3;

public OnFilterScriptInit()
{
	obj1 = CreateObject(300,1,1,1,1,1,1,100);
	obj2 = CreateObject(300,1,1,1,1,1,1,100);
	obj3 = CreateObject(300,1,1,1,1,1,1,100);
	
	SetTimer("FerryStart", 120000, true);//Timer that goes every 2 mins
	return 1;
}
forward FerryStart();
public FerryStart()
{
	MoveObject(obj1,2,2,2,3.0,2,2,2);
	MoveObject(obj2,2,2,2,3.0,2,2,2);
	MoveObject(obj3,2,2,2,3.0,2,2,2);
	SetTimer("FerryBack", 1200000, true);//Timer that goes every 2 mins
	return 1;
}

forward FerryBack();
public FerryBack()
{
	MoveObject(obj1,1,1,1,3.0,1,1,1);
	MoveObject(obj2,1,1,1,3.0,1,1,1);
	MoveObject(obj3,1,1,1,3.0,1,1,1);
	return 1;
}



Re: Timer Help - Red_Dragon. - 10.12.2012

I suggest using streamer plugin, it may work


Re: Timer Help - iggy1 - 10.12.2012

I don't think 300 is a valid object model.