Engine/fuel system
#1

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.
Reply
#2

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.
Reply
#3

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

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!
Reply
#5

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)