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=117670)



need help with textdraw - rs2fun111 - 01.01.2010

i have a question.

how i can make this text to TextDraw ?

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

like:
pawn Код:
forum = TextDrawCreate(4.000000,435.000000,"Your Rank Is: %d: \"%s\"");
  TextDrawFont(forum,3);
  TextDrawColor(forum,0x33AA33AA);
  TextDrawLetterSize(forum,0.599999,1.000000);
  TextDrawSetOutline(forum,1);
  TextDrawSetShadow(forum,1);
  TextDrawSetProportional(forum,1);
  TextDrawBackgroundColor(forum,0x000000ff);
if i go to game then there is text like this :




Re: need help with textdraw - KnooL - 01.01.2010

pawn Код:
forum = TextDrawCreate(4.000000,435.000000,str);
?


Re: need help with textdraw - rs2fun111 - 01.01.2010

im using textdraw creator to do these


Re: need help with textdraw - KnooL - 01.01.2010

keep this
pawn Код:
new str[128];
new PR = PInfo[playerid][Rank];
format(str, 128, "Your Rank: %d: \"%s\"", PR, RankInfo[PR][RName]);
change
pawn Код:
TextDrawCreate(4.000000,435.000000,"Your Rank Is: %d: \"%s\""
to
pawn Код:
TextDrawCreate(4.000000,435.000000,str);
I think that should work


Re: need help with textdraw - WackoX - 01.01.2010

Quote:
Originally Posted by KnooL
pawn Код:
forum = TextDrawCreate(4.000000,435.000000,str);
?



Re: need help with textdraw - rs2fun111 - 01.01.2010

damn cant use playerid at onplayerconnect :S

Код:
C:\Users\kalvi\Desktop\sa-mp\gamemodes\kfsr2.pwn(1044) : error 021: symbol already defined: "str"
C:\Users\kalvi\Desktop\sa-mp\gamemodes\kfsr2.pwn(1045) : error 021: symbol already defined: "PR"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
Код:
public OnPlayerConnect(playerid)
{
  new str[128];
  new PR = PInfo[playerid][Rank];
  format(str, 128, "Your Rank: %d: \"%s\"", PR, RankInfo[PR][RName]);
  TextDrawCreate(4.000000,435.000000,str);
  TextDrawFont(forum,3);
  TextDrawColor(forum,0x33AA33AA);
  TextDrawLetterSize(forum,0.599999,1.000000);
  TextDrawSetOutline(forum,1);
  TextDrawSetShadow(forum,1);
  TextDrawSetProportional(forum,1);
  TextDrawBackgroundColor(forum,0x000000ff);



Re: need help with textdraw - rs2fun111 - 01.01.2010

got errors fixed but when i go to game then i see nothing there .

pawn Код:
new str[128];
  new PR = PInfo[playerid][Rank];
  format(str, 128, "Your Rank: %d: \"%s\"", PR, RankInfo[PR][RName]);
  TextDrawCreate(4.000000,435.000000,str);
  TextDrawFont(forum,3);
  TextDrawColor(forum,0x33AA33AA);
  TextDrawLetterSize(forum,0.599999,1.000000);
  TextDrawSetOutline(forum,1);
  TextDrawSetShadow(forum,1);
  TextDrawSetProportional(forum,1);
  TextDrawBackgroundColor(forum,0x000000ff);



Re: need help with textdraw - KnooL - 10.01.2010

OnPlayerConnect or When A Player Logins (/login):
pawn Код:
TextDrawShowForPlayer(playerid,forum);



Re: need help with textdraw - Peep - 11.01.2010

Quote:
Originally Posted by KnooL
OnPlayerConnect or When A Player Logins (/login):
pawn Код:
TextDrawShowForPlayer(playerid,forum);
Or on OnPlayerSpawn