[Help]Horn
#1

Hello Everyone i need that when the cop pd , horn close to the gate the gate will open and when he horn again the
gate closed , i've this OnPlayerKeyStateChange but without horn can you help me ??

Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
        if(!gPlayerUsingLoopingAnim[playerid]) return;
        if(IsKeyJustDown(KEY_SPRINT,newkeys,oldkeys))
		{
  			StopLoopingAnim(playerid);
        	TextDrawHideForPlayer(playerid,txtAnimHelper);
        	animation[playerid] = 0;
    	}
}
Reply
#2

answer!!!
Reply
#3

Wow dude, bumping after 22 minutes is just unnecessary. Well, I can see that you are using a gf edit which can make it a bit messy. Well you need a variable checking if the gate is open. For example,
Код:

if (Policedata[gate] == 1)
Then add in the horn key in OnPlayerKeyStatsChange beneath the variable.
Then you need to make it move which is the MoveObject function. 
After that you should also put the variable as.
Policedata[gate] = 0; which mean's it's closed.

then finnish that one and next 

if(Policedata[gate]  == 0)
{
bla bla etc. almost the same
Reply
#4

dude can you make it ?
Reply
#5

some help!!!!!!!!!!!!!!
Reply
#6

Lol, don't spam like that..

i'll make you one.. but stop this spamming it's just unnecessary.
Reply
#7

OK Thank you!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)