SA-MP Forums Archive
GetVehicleParamsCarDoors - 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: GetVehicleParamsCarDoors (/showthread.php?tid=580494)



GetVehicleParamsCarDoors - Muted - 05.07.2015

Код:
GetVehicleParamsCarDoors(vehicleid, driver, passenger, backleft, backright);
driver, passenger, backleft, backright are returned as -1, but they should be returned as 0 or 1.


Re: GetVehicleParamsCarDoors - Threshold - 06.07.2015

-1 means they have not been set.

-1 = UNSET
0 = CLOSED
1 = OPEN


Re: GetVehicleParamsCarDoors - Muted - 06.07.2015

I spawned a vehicle and then closed all the doors, but all values were returned as -1. I assume that maybe I should use this & symbol in every value like in the wiki, but when I do I get errors:

Код:
warning 215: expression has no effect
error 029: invalid expression, assumed zero



Re: GetVehicleParamsCarDoors - Lynn - 06.07.2015

SetVehicleParamsCarDoors(VEHICLE_ID, 0,0,0,0); // All Closed.
SetVehicleParamsCarDoors(VEHICLE_ID, 1, 1, 1, 1);// All Opened
SetVehicleParamsCarDoors(VEHICLE_ID, -1, -1, -1, -1);// All unset


Re: GetVehicleParamsCarDoors - Muted - 06.07.2015

I need GetVehicleParamsCarDoors to return correct values, not -1. I already said that I've tried closing all the doors, but it still returned -1 for all doors.


Re: GetVehicleParamsCarDoors - Threshold - 06.07.2015

Then you are not locking them properly.


Re: GetVehicleParamsCarDoors - Muted - 06.07.2015

SetVehicleParamsCarDoors(vehicleid, 0, 0, 0, 0);

How is that not closing (I kept saying locked instead of closed) properly.