Vehicle::repair

From RAGE Multiplayer Wiki
Revision as of 13:44, 5 January 2017 by Niks (talk | contribs)

This function repairs a vehicle.

Syntax

vehicle.repair()

Example

This example repairs a vehicle, in which the player sits.

mp.events.add('playerCommand', (player, cmd) => {
	let arr = cmd.split(' ');
	if (arr[0] == 'repair' && player.vehicle) {
		player.vehicle.repair();
	}
});