A problem with SetTimerEx (again :|)
#6

Quote:
Originally Posted by DJDhan
Посмотреть сообщение
It's probably because you are not returning 1 at the end of the function "HiddenTrailerMissions".

EDIT: I am guessing you want to detect if the vehicle the player is in is one of the hidden trailers.

Instead of running a timer, you can use OnPlayerEnterVehicle callback like so:
Код:
public OnPlayerEnterVehicle(playerid,vehicleid)
{
	if(GetVehicleModel(GetVehicleTrailer(vehicleid)) == 591)
	{
		SetPlayerCheckpoint(playerid, -1073.4313, -1306.4890, 129.2188, 15);
		SendClientMessage(playerid, HIDDEN, "You have found a hidden trailer!");
		SendClientMessage(playerid, HIDDEN, "Deliver it to 'The Den'");
	}
	return 1;
}

Hmm thanks? But, there are 25 "hidden" trailers scattered round my map, and a truck would be driven to find them, so i need the timer to check (every 5 seconds) whether the trailer has connected, but when the timer has found the trailer connected, it needs to stop running.

Thanks
Ash
Reply


Messages In This Thread
A problem with SetTimerEx (again :|) - by Ash. - 24.07.2010, 19:01
Re: A problem with SetTimerEx (again :|) - by Ash. - 24.07.2010, 19:33
Re: A problem with SetTimerEx (again :|) - by Grim_ - 24.07.2010, 20:05
Re: A problem with SetTimerEx (again :|) - by Vince - 24.07.2010, 20:08
Re: A problem with SetTimerEx (again :|) - by DJDhan - 24.07.2010, 20:17
Re: A problem with SetTimerEx (again :|) - by Ash. - 25.07.2010, 08:54

Forum Jump:


Users browsing this thread: 1 Guest(s)