Megírtam neked!
#define FILTERSCRIPT
#include <a_samp>
#include <zcmd>
public OnFilterScriptInit() {
SetTimer(\"AutoFix\", 2000, true);
return 1;
}
forward AutoFix();
public AutoFix() {
for(new i; i < MAX_PLAYERS; i++) {
if(!IsPlayerInAnyVehicle(i) || !GetPVarInt(i, \"autorepair\")) continue;
RepairVehicle(GetPlayerVehicleID(i));
SetVehicleHealth(GetPlayerVehicleID(i), 1000.00);
}
return 1;
}
CMD:autorep(playerid) {
SetPVarInt(playerid, \"autorepair\", !GetPVarInt(playerid, \"autorepair\"));
new str[128];
format(str, sizeof(str), \"Autoómata jármû javító %skapcsolva!\", GetPVarInt(playerid, \"autorepair\")?(\"be\")\"ki\"));
SendClientMessage(playerid, -1, str);
return 1;
}