SA-MP Forums Archive
Engine/fuel system - 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: Engine/fuel system (/showthread.php?tid=529471)



Engine/fuel system - jackx3rx - 02.08.2014

Is there a tutorial on how to make an engine/fuel kind of system? I can't seem to find one. If not could somebody help me?

Thanks.


Re: Engine/fuel system - Stanford - 02.08.2014

I assume that you know what variable is ( to create a fuel system you need to know how to use timers and variables in general ).

About engine it's all about this function (SetVehicleParamsEx) for more details about it: https://sampwiki.blast.hk/wiki/SetVehicleParamsEx

And don't forget to add under OnGamemodeInit this:
pawn Код:
public OnGameModeInit()
{
    ManualVehicleEngineAndLights();
 
    return 1;
}
I hope I helped, any feedback would be appreciated.
Hint: I am on my phone I hope that I didn't type anything wrong.


Re: Engine/fuel system - jackx3rx - 02.08.2014

Still not quite sure how I would begin. I'd prefer a tutorial.


Re: Engine/fuel system - jackx3rx - 02.08.2014

I managed to make a working engine and lights system.

However I still need help with a fuel system, how would I make it so there is 100 fuel and -1 every minute the engine is on. But I don't want the fuel to lower whilst the engine is off. Any help is appreciated!


Re: Engine/fuel system - Steel_ - 02.08.2014

https://sampforum.blast.hk/showthread.php?tid=169284
also this
https://sampforum.blast.hk/showthread.php?tid=91977
and this
https://sampforum.blast.hk/showthread.php?tid=169134
and this
https://sampforum.blast.hk/showthread.php?tid=98249
you dont have to make one from scratch you can use a already made one to edit