Auto Car Repair?
#3

Код:
if(!Autorepair[i])
            {
                return 0;
            }
This will stop the whole callback if AutoRepair isn't allowed for a player.
Replace "return 0" with "continue", this will jump to the next ID if AutoRepair is disabled for a player.

If you set the timer correctly, it should then work as expected.

Troydere's solution is still better, since it will not require a timer. You can also use OnPlayerWeaponShot to restore any health that a vehicle lost by shooting.

PS: You can use GetPlayerVehicleID to determine if a player is in any vehicle (will return 0 if player is not in a vehicle), also RepairVehicle also restores the health, no need to set it seperately.
Reply


Messages In This Thread
Auto Car Repair? - by BlackbirdXd - 10.03.2017, 09:40
Re: Auto Car Repair? - by Toroi - 10.03.2017, 09:45
Re: Auto Car Repair? - by NaS - 10.03.2017, 10:55
Re: Auto Car Repair? - by BlackbirdXd - 10.03.2017, 15:01
Re: Auto Car Repair? - by TitanX - 10.03.2017, 15:09
Re: Auto Car Repair? - by BlackbirdXd - 10.03.2017, 18:12
Re: Auto Car Repair? - by TitanX - 10.03.2017, 18:22
Re: Auto Car Repair? - by BlackbirdXd - 10.03.2017, 18:26
Re: Auto Car Repair? - by NaS - 10.03.2017, 18:37
Re: Auto Car Repair? - by Toroi - 10.03.2017, 20:35

Forum Jump:


Users browsing this thread: 1 Guest(s)