SA-MP Forums Archive
Gate commands - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Gate commands (/showthread.php?tid=80055)



Gate commands - JoeDaDude - 01.06.2009

I dont like commands alot :P
Is it possible if a player is stood infront of the gate
and pressed the up_key, The gate would go up, The same for down?
I could get the codes im just not saw if its possible




Re: Gate commands - silvan - 01.06.2009

well you need to find the function for " oldkeys_newkeys " i'm not sure how it is exactly but i'm sure its something like that


Re: Gate commands - wijnkamp - 01.06.2009

yes it is...

Код:
IsKeyJustDown(key, newkeys, oldkeys)
{
	if((newkeys & key) && !(oldkeys & key)) return 1;
	return 0;
}
and use PlayerToPoint to make it work for players thats close enough