SA:MP 0.3.7 SetVehicleParamsWindows arguments values? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: SA:MP 0.3.7 SetVehicleParamsWindows arguments values? (
/showthread.php?tid=573163)
SA:MP 0.3.7 SetVehicleParamsWindows arguments values? -
Riwerry - 05.05.2015
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??
Re: SA:MP 0.3.7 SetVehicleParamsWindows arguments values? - Emmet_ - 05.05.2015
-1 - VEHICLE_PARAMS_UNSET
0 - VEHICLE_PARAMS_OFF
1 - VEHICLE_PARAMS_ON
Re: SA:MP 0.3.7 SetVehicleParamsWindows arguments values? -
Riwerry - 05.05.2015
So after spawning vehicle do I need to set windows params to 0 and then I can open with 1?
Re: SA:MP 0.3.7 SetVehicleParamsWindows arguments values? -
MP2 - 05.05.2015
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.
Re: SA:MP 0.3.7 SetVehicleParamsWindows arguments values? -
Beckett - 05.05.2015
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.