13.07.2012, 05:58
(
Последний раз редактировалось oblexive; 13.07.2012 в 09:44.
)
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?
This is the function. They didnt work. What do I need to do? Thanks!
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; }