always checking vehicle?
#9

I got it all working, thanks guys. Apreciate it alot.
Quick question though. I set up a new timer to be enabled when the trailer gets connected.
I want the timer to check wether theres a trailer attached or not. If there is then do nothing and keep checking
but if it disconects I want it to reset some variables and a message come up saying Youv lost your trailer.

I tried to do this but couldnt get it working. I setup the timer correctly. It enables when the trailer
is connected but I cant check wether the trailers disconected or not properly. Can anyone give me a hand?

Код:
forward IsTrailerOff(playerid);//detach trailer
public IsTrailerOff(playerid)
{
	new vehicleid = GetPlayerVehicleID(playerid);
        if(!IsTrailerAttachedToVehicle(vehicleid))
	{
		PlayerInfo[playerid][pTPackages] = 0;
		SendClientMessageToAll(COLOR_RED, "Trailer Disconected!");
		KillTimer(TrailerTimer[playerid]);
	}
	return 1;
}
This is the function. They didnt work. What do I need to do? Thanks!
Reply


Messages In This Thread
always checking vehicle? - by oblexive - 13.07.2012, 04:03
Re: always checking vehicle? - by Yuryfury - 13.07.2012, 04:08
Re: always checking vehicle? - by [MM]RoXoR[FS] - 13.07.2012, 04:30
Re: always checking vehicle? - by oblexive - 13.07.2012, 04:39
Re: always checking vehicle? - by [MM]RoXoR[FS] - 13.07.2012, 05:08
Re: always checking vehicle? - by oblexive - 13.07.2012, 05:35
Re: always checking vehicle? - by PrawkC - 13.07.2012, 05:48
Re: always checking vehicle? - by oblexive - 13.07.2012, 05:53
Re: always checking vehicle? - by oblexive - 13.07.2012, 05:58

Forum Jump:


Users browsing this thread: 1 Guest(s)