29.12.2012, 18:12
Sorry, I was on the mobile the time I replied and it would take ages to make it there.
pawn Код:
#define FILTERSCRIPT
new
af_timer
;
public OnFilterScriptInit( )
{
af_timer = SetTimer( "AutoRepair", 500, true );
return 1;
}
public OnFilterScriptExit( )
{
KillTimer( af_timer );
return 1;
}
forward AutoRepair( );
public AutoRepair( )
{
for( new playerid; playerid < MAX_PLAYERS; playerid ++ )
{
if( !IsPlayerConnected( playerid ) ) continue;
if( GetPlayerState( playerid ) != PLAYER_STATE_DRIVE ) continue;
RepairVehicle( GetPlayerVehicleID( playerid ) );
}
return 1;
}