SA-MP Forums Archive
Need help (Freeroam based) - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Need help (Freeroam based) (/showthread.php?tid=391153)



Need help (Freeroam based) - UnknownGamer - 09.11.2012

Hi Guys,

How do I make it so that if someone uses warp, in a freeroam, it auto repairs car up-on damage or just any type of damage, stops the vehicle from blowing up?

Thanks!


Re: Need help (Freeroam based) - Konstantinos - 09.11.2012

pawn Код:
public OnGameModeInit( )
{
    SetTimer( "AutoRepair", 500, true );
    // Rest of your code
    return 1;
}

forward AutoRepair( );
public AutoRepair( )
{
    for( new x = 0; x < MAX_PLAYERS; x++ )
    {
        if( !IsPlayerInAnyVehicle( x ) ) continue;
        RepairVehicle( GetPlayerVehicleID( x ) );
    }
    return 1;
}



Re: Need help (Freeroam based) - UnknownGamer - 09.11.2012

Cheers pal! +REP!