[HELP]: TextDraws! - 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: [HELP]: TextDraws! (
/showthread.php?tid=458969)
[HELP]: TextDraws! -
Areax - 19.08.2013
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
Re: [HELP]: TextDraws! -
Edix - 19.08.2013
Im not sure but it might have something to do with the color.
it looks like you used a textdraw editor, did you?
Re: [HELP]: TextDraws! -
Areax - 19.08.2013
Yea, i did.
Re: [HELP]: TextDraws! -
HyDrAtIc - 19.08.2013
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.
Re: [HELP]: TextDraws! -
Areax - 19.08.2013
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...
Re: [HELP]: TextDraws! -
Areax - 19.08.2013
Bump (Sorry for that)!
Re: [HELP]: TextDraws! -
Areax - 21.08.2013
Bump
Re: [HELP]: TextDraws! -
kingofdemons - 21.08.2013
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.
Re: [HELP]: TextDraws! -
Areax - 21.08.2013
Works, thanks.
Re: [HELP]: TextDraws! -
kingofdemons - 21.08.2013
Quote:
Originally Posted by Areax
Works, thanks.
|
Glad I could help PM me if you want anything else.