[pawn]
#include a_samp
#include zcmd
new bool:autorep[MAX_PLAYERS];
CMD:autorep(playerid)
{
if(autorep[playerid])
{
SendClientMessage(playerid, 0x00FF00FF, \"Automata javítás bekapcsolva!\");
autorep[playerid] = true;
} else {
SendClientMessage(playerid, 0x00FF00FF, \"Automata javítás kikapcsolva!\");
autorep[playerid] = false;
}
return 1;
}
public OnPlayerUpdate(playerid)
{
if(IsPlayerInAnyVehicle(playerid) && autorep[playerid])
{
RepairVehicle(GetPlayerVehicleID(playerid));
}
return 1;
}[/pawn]