[HELP]: TextDraws!
#1

Hello SAMP!

I have a problem with my TextDraw! It doesn't show for a player

Code:

At top of the script, under defines:
pawn Код:
new Text:Textdraw0;

new StatsString[200];
At OnGameModeInit:
pawn Код:
Textdraw0 = TextDrawCreate(2.000000, 436.000000, StatsString);
    TextDrawBackgroundColor(Textdraw0, 255);
    TextDrawFont(Textdraw0, 3);
    TextDrawLetterSize(Textdraw0, 0.500000, 1.100000);
    TextDrawColor(Textdraw0, -65281);
    TextDrawSetOutline(Textdraw0, 1);
    TextDrawSetProportional(Textdraw0, 1);
    TextDrawUseBox(Textdraw0, 1);
    TextDrawBoxColor(Textdraw0, 255);
    TextDrawTextSize(Textdraw0, 640.000000, -345.000000);
At OnPlayerSpawn:
pawn Код:
TextDrawShowForPlayer(playerid, Textdraw0);
At OnPlayerUpdate:
pawn Код:
format(StatsString, sizeof(StatsString), "Name: %s Score: %d Money: %d Admin Level: %s", GetName(playerid), GetPlayerScore(playerid), GetPlayerMoney(playerid), pInfo[playerid][Adminlevel]);
What's wrong ?

Thanks
Reply
#2

Im not sure but it might have something to do with the color.

it looks like you used a textdraw editor, did you?
Reply
#3

Yea, i did.
Reply
#4

How about return 1?

Make sure its return 1 instead of return 0, can you explain more?

Is the textdraw used in any command?

Please give more details.
Reply
#5

Quote:
Originally Posted by HyDrAtIc
Посмотреть сообщение
How about return 1?

Make sure its return 1 instead of return 0, can you explain more?

Is the textdraw used in any command?

Please give more details.
return 1, where?

Textdraw should show when player spawns, it's a stats textdraw with name, score, money and admin level...
Reply
#6

Bump (Sorry for that)!
Reply
#7

Bump
Reply
#8

pawn Код:
OnPlayerUpdate(playerid)
{
format(StatsString, sizeof(StatsString), "Name: %s Score: %d Money: %d Admin Level: %s", GetName(playerid), GetPlayerScore(playerid), GetPlayerMoney(playerid), pInfo[playerid][Adminlevel]);

TextDrawSetString(Textdraw0, StatsString);
TextDrawShowForPlayer(playerid ,Textdraw0);
return 1;
}
Tell me if this works.
Reply
#9

Works, thanks.
Reply
#10

Quote:
Originally Posted by Areax
Посмотреть сообщение
Works, thanks.
Glad I could help PM me if you want anything else.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)