Textdraw help
#1

I've got a pretty bad eye here, is there something unusual in these statements that makes the textdraw automatically shown when player is connected?

PHP код:
Toolbar TextDrawCreate(642.0000001.000000"");
    
TextDrawBackgroundColor(Toolbar255);
    
TextDrawFont(Toolbar1);
    
TextDrawLetterSize(Toolbar0.5000002.299998);
    
TextDrawColor(Toolbar, -1);
    
TextDrawSetOutline(Toolbar0);
    
TextDrawSetProportional(Toolbar1);
    
TextDrawSetShadow(Toolbar1);
    
TextDrawUseBox(Toolbar1);
    
TextDrawBoxColor(Toolbar0xB1B5B8FF);
    
TextDrawTextSize(Toolbar, -5.0000000.000000);
    
TextDrawSetSelectable(Toolbar1); 
The code is placed on OnFilterscriptInit, and OnPlayerConnect and OnPlayerSpawn is empty
Reply
#2

Nope. i dont see anything wrong in your code. Try Re-compiling your script and then connecting.
Reply
#3

Great, now it doesn't show up. I moved the code above to OnPlayerConnect, and created a cmd to show it.
PHP код:
CMD:test(playeridparams[])
{
    
TextDrawShowForPlayer(playeridToolbar);
    
SelectTextDraw(playerid0xA3B4C5FF);
    return 
1;

Reply
#4

You cant create Global Textdraws in OnPlayerConnect. Thats the Problem.
Use it on OnFilterScriptInit or OnGameModeInit what ever you are using. then use in testcmd to show the textdraw.

Try and tell what's the result.

EDIT:

If the TextDraw is shown to the player he connects, show us OnPlayerConnect and if it is shown to the player when he spawns, Show us OnPlayerSpawn code.
Reply
#5

It never shows again. Even with the command called.

PHP код:
Toolbar TextDrawCreate(642.0000001.000000"");
    
TextDrawBackgroundColor(Toolbar255);
    
TextDrawFont(Toolbar1);
    
TextDrawLetterSize(Toolbar0.5000002.299998);
    
TextDrawColor(Toolbar, -1);
    
TextDrawSetOutline(Toolbar0);
    
TextDrawSetProportional(Toolbar1);
    
TextDrawSetShadow(Toolbar1);
    
TextDrawUseBox(Toolbar1);
    
TextDrawBoxColor(Toolbar0xB1B5B8FF);
    
TextDrawTextSize(Toolbar, -5.0000000.000000);
    
TextDrawSetSelectable(Toolbar1); 
Reply
#6

Tell me about that TextDraw.. is it a box or what?
if possible show me a SS.
Reply
#7

Well, to simplify it, I borrowed the hud from [this] gm, and editted it.
Reply
#8

When it was showing, was it showing properly?
and now, it is not showing at all?

Try the original one on OnFilterScriptInit and add it in testcmd and check if it is shown.
Reply
#9

Somehow fixed it, but it doesnt show when the cmd is used

PHP код:
CMD:test(playeridparams[])
{
    
TextDrawShowForPlayer(playeridToolbar);
    return 
1;

Reply
#10

I just discovered that a textdraw won't show without any string assigned to.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)