SA-MP Forums Archive
Car help. - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Car help. (/showthread.php?tid=237752)



Car help. - iGetty - 10.03.2011

Is there a way that I can get my car where when the GM starts, they are all off?
Also, is there a way to turn off the vehicles engine, and not let it turn on, when the fuel runs out?
Thanks.



Re: Car help. - Riddick94 - 10.03.2011

https://sampwiki.blast.hk/wiki/GetVehicleParamsEx
https://sampwiki.blast.hk/wiki/SetVehicleParamsEx


Re: Car help. - iGetty - 10.03.2011

Quote:
Originally Posted by Riddick94
Посмотреть сообщение
I looked at it, makes no sense? :S could you help me please?


Re: Car help. - Riddick94 - 10.03.2011

If you wan't to GetVehicle Doors (state is locked or opened) you're using this like:
pawn Код:
new engine, lights, alarm, doors, bonnet, boot, objective;
    GetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective);
    if(doors) // If doors, are opened.
    {
        SetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, VEHICLE_PARAMS_ON, bonnet, boot, objective);
    }