SA-MP Forums Archive
Stunt Plane - 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: Stunt Plane (/showthread.php?tid=586778)



Stunt Plane - SumX - 25.08.2015

Hello! In vehicle ID 513, stunt plane, if you press key [2], a red smoke will come from your vehicle.Is it possible to activate this function of this vehicle from pawn? Because if I use somehow OnPlayerKeyStateChange, it won't detect 100% exactly if the key is pressed.


Re: Stunt Plane - Toxik - 25.08.2015

hmm when I press the Key on stunt plane the smoke going out always .I don't know exacly what you trying to tell us


Re: Stunt Plane - SumX - 25.08.2015

For example, in my gamemode, at OnPlayerKeyStateChange, if you press KEY_FIRE in a vehicle, your engine will start.But you need to press very well and sometimes, even more times to press (2 or 3 times) to start the engine vehicle, it may be because of the lag?


Re: Stunt Plane - X337 - 25.08.2015

Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
	if((newkeys & KEY_SUBMISSION) && !(oldkeys & KEY_SUBMISSION))
	{
		// Code to start engine here
	}
}



Re: Stunt Plane - Variable™ - 25.08.2015

wiki.sa-mp.com