Toggle Tyres Burst

Revision as of 14:48, 14 August 2018 by Mex (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Description

This code allows anyone who types the command /tyres whilst in a vehicle, to have all their vehicle's tyres toggled between burst and inflated.

Code

Lua, Client-Side, GTAC versions 1.0.72 and newer:

addCommandHandler("tyres",function(commandName,arguments)
	if not localPlayer.vehicle then return end
	local popped = localPlayer.vehicle:getWheelStatus(0) ~= 1
	local status = popped and 1 or 3
	for wheel=0,3,1 do
		localPlayer.vehicle:setWheelStatus(wheel, status)
	end
end)