Jump to content

Color picker problem in cars


Recommended Posts

Posted

Hello guys! So today I made a script which is about a marker and a garage. When you enter in the marker with a car it brings up color picker and you can select your car's color. But my problem is that I don't know how to make it appear only for the man, who is in the driver seat, because now it appears for everybody in the car. Can anybody help me please? I would be grateful. Thank you!

Just a bit of the code, this part is when the color picker appears. If it's needed I'll post the full code.

function openColorPicker(hitPlayer, matchingDimension, seat) 
    if localPlayer == hitPlayer then 
        editingVehicle = getPedOccupiedVehicle(hitPlayer) 
        seat = 0 
        if (editingVehicle) and seat then 
            colorPicker.openSelect(colors) 
            showCursor(true) 
        end 
    end 
end 
--addCommandHandler("color", openColorPicker) 
addEventHandler("onClientMarkerHit", marker, openColorPicker) 

Your signature image is too large.

Removed

Posted
if ( editingVehicle ) and ( getVehicleOccupant ( editingVehicle, 0 ) == hitPlayer ) then 

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

You're welcome.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

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...