- Documentation
- Server functions
- setVehicleWindowOpen
Function
setVehicleWindowOpen
Stores whether a vehicle window is rolled down. Window numbers 0-3.
Syntax
bool setVehicleWindowOpen(vehicle vehicle, int window, bool open)Arguments
vehiclevehicle- The vehicle.
windowint- Window number 0-3.
openbooltrue= rolled down.
Returns
true on success.
Example
addCommandHandler("szyba", function(player)
local vehicle = getPedOccupiedVehicle(player)
local seat = getPedOccupiedVehicleSeat(player)
if vehicle and seat and seat <= 3 then
setVehicleWindowOpen(vehicle, seat, not isVehicleWindowOpen(vehicle, seat))
end
end)
Notes
State for scripts. The game does not show rolled-down windows yet; the value is for script logic (e.g. whether a conversation inside can be heard).