Speedo not working
#3

Quote:
Originally Posted by Codeah
Посмотреть сообщение
You are creating a Textdraw for the whole server while trying to show it to a specific player.
To fix this you need to do the following:

1.Instead of using TextDrawCreate, use CreatePlayerTextDraw
This does not only apply to TextDrawCreate but also all other Textdraw functions.

2.You will also need to change the new's:
Instead of new Text use new PlayerText

RECOMMENDATION:
I also recommend using a single variable for all text draws. For example
Instead of :
Код:
new Text:bg;
new Text:barsus;
new Text:viteza;
new Text:vitezakm;
new Text:tipmasina;
Simply create
Код:
new PlayerText:Speedo[4];
Keep in mind I set 4, since it starts from 0.

then change all the text draw settings etc.

Later on if you want to show the text draw to players, instead of creating 5 lines, use a loop.
Код:
for(new i=0; i < 4; i++){
      TextDrawShowForPlayer(playerid, Speedo[i]);
      return 1;
}
Same applies for hiding the textdraws.
Yea, but my problem is that it is not showing, I will change it with your suggestions but how can I make it actually show and update, where should I put your code to show, when the player enters the vehicle?
Reply


Messages In This Thread
Speedo warnings, help please - by AndreiWow - 02.01.2017, 13:48
Re: Speedo not working - by Codeah - 02.01.2017, 13:53
Re: Speedo not working - by AndreiWow - 02.01.2017, 14:01
Re: Speedo not working - by Codeah - 02.01.2017, 14:05
Re: Speedo not working - by SyS - 02.01.2017, 14:35
Re: Speedo not working - by Codeah - 02.01.2017, 14:42
Re: Speedo not working - by AndreiWow - 02.01.2017, 14:46
Re: Speedo not working - by AndreiWow - 02.01.2017, 14:58
Re: Speedo not working - by AndreiWow - 02.01.2017, 16:06

Forum Jump:


Users browsing this thread: 3 Guest(s)