need help with TextDraw
#1

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);
}
Reply
#2

you forgot : ShowTextDrawForPlayer
Reply
#3

https://sampwiki.blast.hk/wiki/TextDrawShowForPlayer
Reply
#4

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.
Reply
#5

Quote:
Originally Posted by Don Correlli
Reply
#6

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;
}
Reply
#7

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);
Reply
#8

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

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);
Reply
#10

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]);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)