SA-MP Forums Archive
need help with TextDraw - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: need help with TextDraw (/showthread.php?tid=120804)



need help with TextDraw - rs2fun111 - 13.01.2010

can someone please say what is wrong with this code when i compiled then was no errors but when i go oto game then i dont see any TextDraws at screen

pawn Код:
forward textdrawshow(playerid);
public textdrawshow(playerid)
{
new str[128];
new PR = PInfo[playerid][Rank];
format(str, 128, "Rank: %d %s", PR, RankInfo[PR][RName]);
TextDrawCreate(str,2.000000, 432.000000);
TextDrawBackgroundColor(Textdraw0, 255);
TextDrawFont(Textdraw0, 1);
TextDrawLetterSize(Textdraw0, 0.500000, 1.000000);
TextDrawColor(Textdraw0, -1);
TextDrawSetOutline(Textdraw0, 0);
TextDrawSetProportional(Textdraw0, 1);
TextDrawSetShadow(Textdraw0, 1);
}



Re: need help with TextDraw - Naruto4 - 13.01.2010

you forgot : ShowTextDrawForPlayer


Re: need help with TextDraw - Correlli - 13.01.2010

https://sampwiki.blast.hk/wiki/TextDrawShowForPlayer


Re: need help with TextDraw - rs2fun111 - 13.01.2010

error
Код:
D:\GTA San Andreas\filterscripts\textdraw.pwn(13) : error 017: undefined symbol "ShowTextDrawForPlayer"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.



Re: need help with TextDraw - Correlli - 13.01.2010

Quote:
Originally Posted by Don Correlli



Re: need help with TextDraw - rs2fun111 - 13.01.2010

still nothing

pawn Код:
public OnPlayerConnect(playerid)
{
    TextDrawShowForPlayer(playerid, Textdraw0);
    new str[128];
  new PR = PInfo[playerid][Rank];
  format(str, 128, "Your Rank: %d %s", PR, RankInfo[PR][RName]);
    Textdraw0 = TextDrawCreate(0.000000, 430.000000,str); // , "Rank: %d %s"
    TextDrawBackgroundColor(Textdraw0, 255);
    TextDrawFont(Textdraw0, 1);
    TextDrawLetterSize(Textdraw0, 0.500000, 1.400000);
    TextDrawColor(Textdraw0, 65535);
    TextDrawSetOutline(Textdraw0, 0);
    TextDrawSetProportional(Textdraw0, 1);
    TextDrawSetShadow(Textdraw0, 1);
    for(new i; i < MAX_PLAYERS; i ++)
    {
    if(IsPlayerConnected(i))
    {
    TextDrawShowForPlayer(i, Textdraw0);
    }
    }
    return 1;
}



Re: need help with TextDraw - Ironboy500 - 13.01.2010

You need to put it under OnGameModeInit
Код:
Textdraw0 = TextDrawCreate(0.000000, 430.000000,str); // , "Rank: %d %s"
	TextDrawBackgroundColor(Textdraw0, 255);
	TextDrawFont(Textdraw0, 1);
	TextDrawLetterSize(Textdraw0, 0.500000, 1.400000);
	TextDrawColor(Textdraw0, 65535);
	TextDrawSetOutline(Textdraw0, 0);
	TextDrawSetProportional(Textdraw0, 1);
	TextDrawSetShadow(Textdraw0, 1);



Re: need help with TextDraw - rs2fun111 - 13.01.2010

i cant use (playerid) at ongamemodeinit thats why i put it to onplayerconnect


Re: need help with TextDraw - Ironboy500 - 13.01.2010

You only need to put this under ongamemodeinit

Код:
Textdraw0 = TextDrawCreate(0.000000, 430.000000,str); // , "Rank: %d %s"
	TextDrawBackgroundColor(Textdraw0, 255);
	TextDrawFont(Textdraw0, 1);
	TextDrawLetterSize(Textdraw0, 0.500000, 1.400000);
	TextDrawColor(Textdraw0, 65535);
	TextDrawSetOutline(Textdraw0, 0);
	TextDrawSetProportional(Textdraw0, 1);
	TextDrawSetShadow(Textdraw0, 1);



Re: need help with TextDraw - rs2fun111 - 13.01.2010

but im using rank system and this needs a

pawn Код:
new str[128];
  new PR = PInfo[playerid][Rank];
  format(str, 128, "Your Rank: %d %s", PR, RankInfo[PR][RName]);