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



Vehicle Gear. - Hanuman - 13.04.2014

Is there is anyway to know in which gear a vehicle is running?


Re: Vehicle Gear. - Flake. - 13.04.2014

No, the only way to detect it would be to match speed with the sound, when the vehicle gets to the speed you hear the gear shift you assume that's +1 gear so on and so forth.


Re: Vehicle Gear. - Hanuman - 13.04.2014

But, that will be useless for me. I want to show player that in which gear his vehicle is running.


Re: Vehicle Gear. - Flake. - 13.04.2014

Just make a system when the vehicle gets the 'x' speed (Where the engine sound changes) They're displayed with a message/textdraw saying gear '1 - 5'


Re: Vehicle Gear. - Hanuman - 13.04.2014

Hmmm... ok let me try to make that.

EDIT: But every vehicle has different velocity.


Re: Vehicle Gear. - Flake. - 13.04.2014

Quote:
Originally Posted by Hanuman
Посмотреть сообщение
Hmmm... ok let me try to make that.

EDIT: But every vehicle has different velocity.
Like I said, it's not the best way to do it since there is no real way to do it, just a thought.


Re: Vehicle Gear. - Hanuman - 13.04.2014

Noway for this, that is BULLSHIT!

Anyway thanks for trying


Re: Vehicle Gear. - Mriss - 13.04.2014

What about doing this
[pawn]new Gear0;
new Gear1;
new Gear2;
new Gear3;
new Gear4;
new Gear5;

OnPlayerConnect'

Gear0(playerid) = 0 //e.g

Sorry Im half asleep, hopefully u get what im doin


Re: Vehicle Gear. - Flake. - 13.04.2014

Quote:
Originally Posted by Mriss
Посмотреть сообщение
What about doing this
[pawn]new Gear0;
new Gear1;
new Gear2;
new Gear3;
new Gear4;
new Gear5;

OnPlayerConnect'

Gear0(playerid) = 0 //e.g

Sorry Im half asleep, hopefully u get what im doin
All you've done is defined a bunch of gears and set their gear to 0 on connect. What about detecting when their gear shifts up/down?


Re: Vehicle Gear. - Hanuman - 13.04.2014

Quote:
Originally Posted by Mriss
Посмотреть сообщение
What about doing this
[pawn]new Gear0;
new Gear1;
new Gear2;
new Gear3;
new Gear4;
new Gear5;

OnPlayerConnect'

Gear0(playerid) = 0 //e.g

Sorry Im half asleep, hopefully u get what im doin
This won't do anything because i want to know that when vehicle change his gear.
And u have done Gear(playerid) = 0 when player connect which show the player that vehicle is running at the 0 gear at every moment.