04.10.2013, 16:43
Actually my post was wrong. I was typing fast and as a result, I wrote them opposite.
Your method checks for the oldkeys as well as my previous post which was wrong.
Anyways, thanks for replying and I found out my mistake!
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if((newkeys & KEY_CROUCH) && !(oldkeys & KEY_CROUCH))
{
// do your code here to open the gate
}
return 1;
}
Anyways, thanks for replying and I found out my mistake!