OnPlayerKeyStateChange Open gate.. - 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: OnPlayerKeyStateChange Open gate.. (
/showthread.php?tid=176184)
OnPlayerKeyStateChange Open gate.. -
Ohad1 - 12.09.2010
Hey guys if sombody can help me i will be happy so this is the problem i want to do like this,to open my gate in the button like JUMP button so i hope you guys wiil help me thanks..
Re: OnPlayerKeyStateChange Open gate.. -
LarzI - 12.09.2010
Use OnPlayerKeyStateChange
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if( newkeys & KEY_JUMP && GetPlayerState( playerid ) == PLAYER_STATE_ONFOOT && IsPlayerInRangeOfPoint( playerid, 10.0, x, y, z )) //x y z = coords for the gate
{
// do stuff
}
return true;
}
Re: OnPlayerKeyStateChange Open gate.. -
Ohad1 - 12.09.2010
First of all tanku on your time, the second thing i was try what you said and it's shuting down all my pawn so you can help me tanks.
Re: OnPlayerKeyStateChange Open gate.. -
Ohad1 - 12.09.2010
Hey somebody can help me pleas it's not working but tanks man.