UAEpro Posted February 2, 2012 Posted February 2, 2012 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
HunT Posted February 2, 2012 Posted February 2, 2012 Majid use the event onPlayerVehicleEnter onPlayerSpawn is not good for set the color vehicle.
Castillo Posted February 2, 2012 Posted February 2, 2012 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)
UAEpro Posted February 2, 2012 Author Posted February 2, 2012 Majid use the event onPlayerVehicleEnter onPlayerSpawn is not good for set the color vehicle. nvm i didn't now what i did ... but it's worked now sometime i became stupid
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now