Valahonann elõtúrom
Ez nem olyan, de így sem sebzõdik szinte a kocsi.
[pawn]forward Javitas();
public Javitas() for(new i=0; i < GetMaxPlayers(); i++) if(IsPlayerConnected(i)) if(IsPlayerInAnyVehicle(i)) RepairVehicle(GetPlayerVehicleID(i));
public OnGameModeInit()
{
SetTimer(\"Javitas\", 2000, 1);
return 1;
}[/pawn]
Vagy itt egy ugyan ilyen komplett script-be.
[pawn]#include <a_samp>
forward AutoRepair(playerid);
new RepairTimer;
public OnFilterScriptInit()
{
print(\" Auto Reapir by Matrix\");
return 1;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
RepairTimer = SetTimer(\"AutoRepair\",1000,1);
return 1;
}
public OnPlayerExitVehicle(playerid, vehicleid)
{
KillTimer(RepairTimer);
return 1;
}
public AutoRepair(playerid)
{
RepairVehicle(GetPlayerVehicleID(playerid));
return 1;
}[/pawn]