Textdraw help
#1

This is just a simple textdraw that show when a player is ig but if i put it under ongamemodeinit there is no 'playerid' definition there so it will come errors and i've also tried doing this
pawn Код:
for(new i = 0; i < MAX_PLAYERS; ++i)
on ongamemodeinit but it dosent show and then i've also tried putting it under onplayerconnect but if 2 players is connected it will show the textdraw above eachother so its unreadable any idea of what i can do?
pawn Код:
format(string, sizeof(string), "User Account: %s", GetPlayerNameEx(playerid));
        useracc = TextDrawCreate(450.000000, 428.000000, string);
        TextDrawAlignment(useracc , 3);
        TextDrawBackgroundColor(useracc , 255);
        TextDrawFont(useracc , 1);
        TextDrawLetterSize(useracc , 0.529999, 1.400000);
        TextDrawColor(useracc , -1);
        TextDrawSetOutline(useracc , 1);
        TextDrawSetProportional(useracc , 1);
Reply
#2

https://sampwiki.blast.hk/wiki/TextDrawCreate
It's well explained on the wiki. Try it.
Reply
#3

I know how to create a textdraw smartass re read my post..
Reply
#4

Use textdraw editor
Reply
#5

This should work place dis Under OnplayerSpawn or Onplayerconnect
pawn Код:
TextDrawShowForPlayer(playerid, useracc); // Show the TextDraw
                format(string, sizeof(string), "User Account: %s", GetPlayerNameEx(playerid)); // Seting the string
                TextDrawSetString(useracc, string); // Update the string
Reply
#6

Quote:
Originally Posted by thomaswilliams
Посмотреть сообщение
Use textdraw editor
Seriously? what the fuck is this you imbecil read before posting
Reply
#7

Quote:
Originally Posted by Wizza
Посмотреть сообщение
Seriously? what the fuck is this you imbecil read before posting
If you do it the way as explained on the wiki you won't have multiple textdraws.
And calm your tits with calling people imbecil and stuff, even if he misunderstood what you were trying to say. It's not nice, he is just trying to help.
Reply
#8

For showing textdraw for all the players, you have to define textdraw in the following ways,

new Text:Textdrawname[MAX_PLAYERS];

then add [playerid],

E.g: Textdrawname[playerid] = TextDrawCreate(x, y, " ");
TextDrawColor(Textdrawname[playerid], 282);

and so on.

And for showing the textdraw, TextDrawShowForPlayer(playerid, Textdrawname[playerid]);
Reply
#9

I'M TRYING TO SHOW THE TEXTDRAW FOR ONLY ONE PLAYER THAT JOINS THE SERVER FOR EACH PLAYER ITS HIS NAME THAT SHOWS UP FOR FUCKING EXAMPLE IF I login with the name Liam_Wells it will show me
pawn Код:
User Account: Liam Wells
and if another player logs in with the name Michael_Woodstone it will show him
pawn Код:
User Account: Michael Woodstone
but still show me my name and him his name
Reply
#10

pawn Код:
public OnPlayerConnect(playerid) {
new string[138];
TextDrawShowForPlayer(playerid, useracc); // Show the TextDraw
                format(string, sizeof(string), "User Acoount: %s", GetPlayerNameEx(playerid)); // Seting the string
                TextDrawSetString(useracc, string); // Update the string
return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)