Problems with binding the HORN button.
#1

Hey!
I've been trying to bind the HORN button with my gate so whenever I horn it would open.
But it doesn't work while I'm driving or so. [You must stop before you horn in order it to open]

Code:

PHP код:
        if(GetPlayerFaction(playerid) == COPS && newkeys == && IsPlayerInAnyVehicle(playerid) && IsPlayerDriver(playerid))
                {
                        if(
IsPlayerInRangeOfPoint(playerid,20,1588.5000000,-1638.3000000,14.1000000))
                        {
                                switch(
Gate1)
                                {
                                        case 
true:
                                        {
                                                
MoveObject(Gate[0],1598.5000000,-1638.3000000,14.1000000,5);
                                                
Gate1 false;
                                        }
                                        case 
false:
                                        {
                                                
MoveObject(Gate[0],1588.5000000,-1638.3000000,14.1000000,5);
                                                
Gate1 true;
                                        }
                                }
                        }
                        if(
IsPlayerInRangeOfPoint(playerid,10,1544.7000000,-1630.8000000,13.1000000))
                        {
                                switch(
Gate2)
                                {
                                        case 
true:
                                        {
                                                
                                                
SetTimer("pdcubegate7"100false);
                                                
SetTimer("ResetPD1",10000,0);
                                        }
                                        case 
false:
                                        {
                                                
                                                
SetTimer("pdcubegate15"100false);
                                        }
                                }
                        }
                } 
Thanks in advance!
Reply


Messages In This Thread
Problems with binding the HORN button. - by Amit1998 - 28.06.2014, 11:42
Re: Problems with binding the HORN button. - by mahardika - 28.06.2014, 12:30
Re: Problems with binding the HORN button. - by Amit1998 - 28.06.2014, 12:57

Forum Jump:


Users browsing this thread: 1 Guest(s)