textdraw?
#1

How can I get a Textdraw to get a player;

pawn Код:
new getplayer[MAX_PLAYER_NAME];
    format(getplayer, sizeof(getplayer), "%s");
    Textdraw1 = TextDrawCreate(530.000000, 10.000000, "");
    TextDrawBackgroundColor(Textdraw1, 255);
    TextDrawFont(Textdraw1, 1);
    TextDrawLetterSize(Textdraw1, 0.500000, 1.000000);
    TextDrawColor(Textdraw1, -16776961);
    TextDrawSetOutline(Textdraw1, 0);
    TextDrawSetProportional(Textdraw1, 1);
    TextDrawSetShadow(Textdraw1, 1);
How could i get that to say a players name?
Reply
#2

This should do it.
Код:
new name[MAX_PLAYER_NAME], string[128];
GetPlayerName(playerid,name,sizeof(name))
format(string, sizeof(string), "%s",name);
Textdraw1 = TextDrawCreate(530.000000, 10.000000,string);
TextDrawBackgroundColor(Textdraw1, 255);
TextDrawFont(Textdraw1, 1);
TextDrawLetterSize(Textdraw1, 0.500000, 1.000000);
TextDrawColor(Textdraw1, -16776961);
TextDrawSetOutline(Textdraw1, 0);
TextDrawSetProportional(Textdraw1, 1);
TextDrawSetShadow(Textdraw1, 1);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)