Hi, i'm a beginner in LUA scripting, i've made a code and i don't know what's wrong...?
function changeCar( player )
if ( getPlayerTeam ( player ) ) then
local r, g, b = getTeamColor ( getPlayerTeam ( player ) )
setVehicleColor ( source, r, g, b )
end
end
addEventHandler( "onVehicleEnter", root,changeCar)
the code is so simple it makes your car's color as same as your team's color.
BTW i make it only for race (DM)
this is the meta:
<meta>
<info name="CarCOLOR" description="blaBla" author="DarkRACER" type="script" version="1.0" />
<script scr="car.lua" />
</meta>
please if you noticed anything wrong in this code reply as soon as you can,
thanks.