Speedo Help again :/
#10

Yeh what RealCop said ^

Although that is a more efficient way to do it (and is something you should do!), it won't actually fix the current problems you are having. You haven't shown us the creation of the Speedo variable, which is quite important regarding the problem you are having with this line:
pawn Код:
//TextDrawHideForPlayer(playerid, Speedo[playerid]);
You have referenced Speedo as an array here (which I believe should be correct), but in all other cases you do not refer to Speedo as an array. Your initial creation of the Speedo variable should be at the top of your script and look something like this:
pawn Код:
new Text:Speedo[MAX_PLAYERS];
Once that is done, you can uncomment the line that I previously quoted, and then you will need to go back and change all other references to Speedo. So for example:
pawn Код:
TextDrawSetString(Speedo, string);
TextDrawShowForPlayer(playerid, Speedo);
will become:
pawn Код:
TextDrawSetString(Speedo[playerid], string);
TextDrawShowForPlayer(playerid, Speedo[playerid]);
Once you have changed all references to Speedo, your speedo should display to the correct player when in a vehicle driver, and hide itself otherwise.

The next problem you mention is that it only shows 0mph or 4mph. That sounds like a problem with the maths to me, and is unfortunately something I can't assist with! I'd suggest looking around other available speedo scripts to see exactly how the maths works there.

Good luck!
Reply


Messages In This Thread
Speedo Help again :/ - by futuretrucker - 12.06.2011, 16:08
Re: Speedo Help again :/ - by Benjo - 12.06.2011, 16:42
Re: Speedo Help again :/ - by Iphone1234g - 12.06.2011, 16:45
Re: Speedo Help again :/ - by futuretrucker - 12.06.2011, 18:40
Re: Speedo Help again :/ - by alpha500delta - 12.06.2011, 19:16
Re: Speedo Help again :/ - by futuretrucker - 12.06.2011, 19:25
Re: Speedo Help again :/ - by alpha500delta - 12.06.2011, 19:53
Re: Speedo Help again :/ - by futuretrucker - 12.06.2011, 22:51
Re: Speedo Help again :/ - by Scenario - 12.06.2011, 23:18
Re: Speedo Help again :/ - by Benjo - 12.06.2011, 23:40

Forum Jump:


Users browsing this thread: 1 Guest(s)