Jump to content

SetVehicleColor


UAEpro

Recommended Posts

what's wrong with this..

i don't know why it's not working

  
addEventHandler("onPlayerSpawn",getRootElement(), 
function() 
local account = getPlayerAccount (source) 
  
local car1 = getAccountData ( account, "car1" ) 
local car2 = getAccountData ( account, "car2" ) 
local car3 = getAccountData ( account, "car3" ) 
local PVeh= getPlayerOccupiedVehicle (source) 
if ( PVeh ) then 
if car1 then 
outputChatBox("car1") 
setVehicleColor ( PVeh, car1, car2, car3, 0) 
else 
outputChatBox("ELSE") 
setVehicleColor(PVeh, 3, 3, 3, 3) 
setVehicleHeadLightColor(PVeh, 255, 0, 0) 
end 
end 
  
  
end) 
  

nothing show ... not car1 and not ELSE

if i remove ( " if ( PVeh ) then " )

everything is ok except setVehicleColor

o.O

Link to comment
addEventHandler("onPlayerSpawn",getRootElement(), 
function() 
local account = getPlayerAccount (source) 
local car1 = getAccountData ( account, "car1" ) 
local car2 = getAccountData ( account, "car2" ) 
local car3 = getAccountData ( account, "car3" ) 
local PVeh = getPedOccupiedVehicle (source) 
if ( PVeh ) then 
    if (car1 and car2 and car3) then 
        outputChatBox("car1") 
        setVehicleColor ( PVeh, car1, car2, car3, 0) 
    else 
        outputChatBox("ELSE") 
        setVehicleColor(PVeh, 3, 3, 3, 3) 
        setVehicleHeadLightColor(PVeh, 255, 0, 0) 
        end 
    end 
end) 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...