Auto Repair
#1

This is my Script for Autorepair:

Код:
public AutoRepair(){
for(new i=0; i<GetMaxPlayers(); i++)
{
  if(IsPlayerConnected(i)) if(IsPlayerInAnyVehicle(i)){
	new Float:fVehicleHealth;
	GetVehicleHealth(GetPlayerVehicleID(i),fVehicleHealth);
  	if(fVehicleHealth < 900) SetVehicleHealth(GetPlayerVehicleID(i),1000.0);
  }
}
}
So if the VehicleHealth is under 900 my Vehicle has again 1000 but it is not repaired.
I want to add this in the Script : RepairVehicle
Reply


Messages In This Thread
Auto Repair - by AwokenNeoX - 01.11.2015, 14:57
Re: Auto Repair - by prineside - 01.11.2015, 15:01
Re: Auto Repair - by YouServ - 01.11.2015, 15:50
AW: Auto Repair - by AwokenNeoX - 01.11.2015, 15:55

Forum Jump:


Users browsing this thread: 1 Guest(s)