i am trying to make a code so when i type /carhelp a message goes into the chatbox and says
"Type /(vehiclename)-off To Turn The Custom Model Off"
"Or Type /(vehiclename)-on To Turn The Custom Model On"
ofcourse i am trying to use the GetVehicleName function and the GetVehicleId Function but seem to be having no luck at all. If anyone could help me to get this working it would be greatly appreciated.
heres the script
function carhelp ( )
local id = getVehicleID ( )
if id = 451 then
local vehiclename = getVehicleName ( )
outputChatBox ( "Type /" .. vehiclename .. "-off To Turn The Custom Model Off", 0, 255, 0, true )
outputChatBox ( "Type /" .. vehiclename .. "-on To Turn The Custom Model On", 0, 255, 0, true )
else
outputChatBox ( "This Vehicle Does Not Have A Custom Model." ,255,0,0 )
end
end
addCommandHandler ( "carhelp", carhelp )
and my Meta.xml
<meta>
<info author="Smallo" name="carhelp" version="1" type="script" />
<script src="carhelp.lua" type="client" />
</meta>