21.02.2012, 15:39
(
Последний раз редактировалось Toreno; 22.02.2012 в 14:39.
)
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;
This part was taken from Hiddos' tutorial; https://sampforum.blast.hk/showthread.php?tid=279757
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;
}
}