SA-MP Forums Archive
Error with gate open on "H" - 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: Error with gate open on "H" (/showthread.php?tid=571540)



Error with gate open on "H" - danielpalade - 19.04.2015

For some reason my gate won't open when pressing the HORN key.
My command /swipecard works, but the H key won't..
This is my code.
Код:
	if(newstate & KEY_CROUCH)
	{
		if(IsPlayerInRangeOfPoint(playerid, 3, 2850.5952,2613.0771,10.8203))
		{
			MoveObject(Truck1Gate, 2857.20068, 2612.86646, 7.01409, 1);
			SendClientMessage(playerid, COLOR_ADMIN, "Poarta sa deschis pentru 6 secunde.");
			SetTimerEx("CloseGate", 10000, false, "i", playerid);
		}
	}



Re: Error with gate open on "H" - Sellize - 19.04.2015

PHP код:
if(newstate == KEY_CROUCH



Re: Error with gate open on "H" - ikkentim - 19.04.2015

What is newstate? You need keys. GetPlayerKeys

https://sampwiki.blast.hk/wiki/GetPlayerKeys