toll gate problem...
#8

Well, not only you do a loop but plants it under OnPlayerUpdate? That is the reason why it keeps taking cash a lot of times. Do this;
pawn Код:
public OnGameModeInit()
{
    SetTimer( "TollTimer", 500, true );

    return 1;
}
pawn Код:
forward TollTimer();
public TollTimer()
{
    for( new a; a < MAX_PLAYERS; a++ )
    {
        if( IsPlayerInRangeOfPoint( a, 0.0, 0.0, 0.0, 10.0 ) )
        {
            // Open the gate and take money.
        }
       
        return;
    }
}
This part was taken from Hiddos' tutorial; https://sampforum.blast.hk/showthread.php?tid=279757
Reply


Messages In This Thread
toll gate problem... - by niels44 - 20.02.2012, 18:59
Re: toll gate problem... - by niels44 - 21.02.2012, 14:51
Re: toll gate problem... - by Toreno - 21.02.2012, 15:11
Re: toll gate problem... - by Hoborific - 21.02.2012, 15:14
Re: toll gate problem... - by niels44 - 21.02.2012, 15:18
Re: toll gate problem... - by Toreno - 21.02.2012, 15:28
Re: toll gate problem... - by niels44 - 21.02.2012, 15:31
Re: toll gate problem... - by Toreno - 21.02.2012, 15:39
Re: toll gate problem... - by YoungWildFree - 21.02.2012, 15:41
Re: toll gate problem... - by niels44 - 21.02.2012, 16:03

Forum Jump:


Users browsing this thread: 2 Guest(s)