SA:MP 0.3.7 SetVehicleParamsWindows arguments values?
#1

So I've tried to use new function SetVehicleParamsWindows and I don't know how arguments work (it's not specified on wiki). So when I want to close all windows, i need to set driver, passenger etc to 0? Or when I want to open all windows I need to set variables 1? I tried this:

pawn Код:
new vehicleid = GetPlayerVehicleID(playerid), driver, passenger, backleft, backright;

GetVehicleParamsWindows(vehicleid, driver, passenger, backleft, backright);

//Then I did:

printf("%i, %i, %i, %i", vehicleid, driver, passenger, backleft, backright);

//Output on closed windows -1, -1, -1, -1

//Why not 0??
Reply
#2

-1 - VEHICLE_PARAMS_UNSET
0 - VEHICLE_PARAMS_OFF
1 - VEHICLE_PARAMS_ON
Reply
#3

So after spawning vehicle do I need to set windows params to 0 and then I can open with 1?
Reply
#4

I believe 0 is open and 1 is closed. The thing is, if you haven't previously set the window state, it will give -1 ('unset'). Vehicles spawn with their windows closed, so you can say -1 and 1 are closed, leaving 0 meaning open.
Reply
#5

Quote:
Originally Posted by Riwerry
Посмотреть сообщение
So after spawning vehicle do I need to set windows params to 0 and then I can open with 1?
Obviously mate.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)