SA-MP Forums Archive
[Help]Horn - 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: [Help]Horn (/showthread.php?tid=157899)



[Help]Horn - KJ1 - 08.07.2010

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;
    	}
}



Re: [Help]Horn - KJ1 - 08.07.2010

answer!!!


Re: [Help]Horn - Mystique - 08.07.2010

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



Re: [Help]Horn - KJ1 - 08.07.2010

dude can you make it ?


Re: [Help]Horn - KJ1 - 08.07.2010

some help!!!!!!!!!!!!!!


Re: [Help]Horn - Cameltoe - 08.07.2010

Lol, don't spam like that..

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


Re: [Help]Horn - KJ1 - 08.07.2010

OK Thank you!