Help Barrier Rotation Include
#1

Hi, well i've found this include that will allow barrier rotation(opening) and it works, but the problem is, when the barrier is going up when you press C or H(which is a key to start rotating) the timer will do something and the barrier will rotate in the other direction and by that you can rotate it 360°, and i've fixed that when it goes up by adding the variable that will block opening it untill the timer loads, but when it's rotating down and if i press H/C while rotation is in progress something happens with the timer and it rotates in the ground next time.



1: Include link: http://pastebin.com/GPACjJzJ

2. Opening barrier

pawn Код:
if(PRESSED(KEY_CROUCH))
    {
        if(IsPlayerInRangeOfPoint(playerid, 7.0, 1544.7000000,-1630.9000000,13.1000000)) //PD
        {
            if(PI[playerid][Clan] == 1 && PDOtvorena == 0)
            {
                PDOtvorena = 1;
                ActivateRamp(rampapd, 2);
                SetTimerEx("PDRampa", 7000, false, "i", playerid);
            }
        }
    }
3. Timer for closing:

pawn Код:
public PDRampa()
{
    if(PDOtvorena == 1)
    {
        PDOtvorena = 0;
        ActivateRamp(rampapd, 1);
    }
    return 1;
}
Please help me idk what to do, thanks..
Reply


Messages In This Thread
Help Barrier Rotation Include - by ShoortyFl - 15.06.2015, 21:36
Re: Help Barrier Rotation Include - by Virtual1ty - 16.06.2015, 10:27

Forum Jump:


Users browsing this thread: 1 Guest(s)