09.03.2016, 19:40
PHP код:
new Float:fuelstat[10][3]={{0.0,0.0,0.0},{0.0,0.0,0.0},{0.0,0.0,0.0} etc};
CMD:repair(pid){
if(!IsPlayerInAnyVehicle(pid))return scm(pid,-1,"You're not in any vehicle!");
for(new i, i2=sizeof(fuelstat); i < i2; i2++){
if(!IsPlayerInRangeOfPoint(pid,10.0,fuelstat[i2][0],fuelstat[i2][1],fuelstat[i2][2]))continue;
RepairVehicle(GetPlayerVehicleID(pid));
return scm(pid,-1,"Vehicle successfully repaired.");
}
scm(pid,-1,"You're not in any fuel station!");
return 1;
}