#include a_samp#include <zcmd>new vehrept;public OnFilterScriptInit() return KillTimer(vehrept);public Arep();public Arep(){for(new playerid = 0; playerid < MAX_PLAYERS; playerid++){ if(IsPlayerInAnyVehicle(playerid)) { new Float: VHealth; GetVehicleHealth(GetPlayerVehicleID(playerid), VHealth); if(VHealth != 1000) { RepairVehicle(GetPlayerVehicleID(playerid)); } }}return 1;}public OnPlayerExitVehicle(playerid, vehicleid){KillTimer(vehrept);return 1;}CMD:autorep(playerid) {vehrept = SetTimer(\"Arep\", 300, true);SendClientMessageToAll(COLOR_LIGHTBLUE, \"Autód automatikus javitása bekapcsolva\");return 1;}CMD:autounrep(playerid) {KillTimer(vehrept);SendClientMessageToAll(COLOR_RED, \"Az autód többet nem fog automatikusan megjavulni!\");return 1;}
#include a_samp#include <zcmd>new vehrept[MAX_PLAYERS];forward Arep(playerid);public Arep(playerid) {if(!IsPlayerInAnyVehicle(playerid)) return 1;new Float: VHealth;GetVehicleHealth(GetPlayerVehicleID(playerid), VHealth);if(VHealth < 1000) RepairVehicle(GetPlayerVehicleID(playerid));}return 1;}public OnPlayerExitVehicle(playerid, vehicleid) {KillTimer(vehrept);return 1;}CMD:autorep(playerid) {if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1, \"Nem ülsz jármûben\");vehrept[playerid] = SetTimerEx(\"Arep\", 300, true, \"d\", playerid);SendClientMessageToAll(COLOR_LIGHTBLUE, \"Autód automatikus javitása bekapcsolva\");return 1;}CMD:autounrep(playerid) { if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1, \"Nem ülsz jármûben\");KillTimer(vehrept[playerid]);SendClientMessageToAll(COLOR_RED, \"Az autód többet nem fog automatikusan megjavulni!\");return 1;}