Jump to content

WindowState only show to GUIClicking Player


Recommended Posts

Hello someone please help me to fix this

Quote

 -- Client Side Script -- 

local function open_event(wndid)
    local playerVehicle = getPedOccupiedVehicle ( source )
    if ( playerVehicle ) then
        if setVehicleWindowOpen( playerVehicle, wndid, not isVehicleWindowOpen( playerVehicle, wndid ) ) then
            outputChatBox( "Driver Window Switched" )
        else
            outputChatBox( "You don't have window!" )
        end
    end
end
local function open_request()
    triggerServerEvent("onVehicleWindowOpenRequest", root, seatWindows[0]);
end
addCommandHandler("open", open_request)
addEvent("open", true)
addEventHandler( "open", localPlayer, open_event )
addEventHandler ( "onClientGUIClick", GUIEditor.button[13], open_request, false )

-- Server Side Script --

addEvent("onVehicleWindowOpenRequest", true);
addEventHandler("onVehicleWindowOpenRequest", root,
    function(wndid)
        triggerClientEvent("open", client, wndid);
    end
);

When I use this or when I click GUI Button of shutter open/close (switch shutter) it will only showing to the player who click GUI and other players around him do not show WindowState on my GUIClick.

Need help to fix this

Thank you.

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