11.10.2017, 12:03
Don't use OnPlayerUpdate
Код:
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ) { if(hittype == BULLET_HIT_TYPE_VEHICLE) { new p = GetVehicleOwner(vehicleid); if(IsPlayerConnected(p) && AutoFix[p] == 1) { RepairVehicle(p); } } return 1; } public GetVehicleOwner(vehicleid) { for(new i = 0; i < MAX_PLAYERS; i++) { if(vehicleid == GetPlayerVehicleID(i) && IsPlayerConnected(i)) return i; } return -1; }