[Ajuda] Textdraw Nick
#1

Auguem pode me ajudar nao sei como colocar o nick do player tipo o nick fica mais quando entra outra pessoa o nick muda ajuda ae pf
Code
pawn Код:
new
    Text:Textdraw10
;
public OnGameModeInit()
{
    Textdraw10 = TextDrawCreate( 8.941410, 305.082885, "%s");
    TextDrawLetterSize(Textdraw10, 0.356353, 1.874166);
    TextDrawAlignment(Textdraw10, 1);
    TextDrawColor(Textdraw10, -5963521);
    TextDrawSetShadow(Textdraw10, 0);
    TextDrawSetOutline(Textdraw10, 2);
    TextDrawBackgroundColor(Textdraw10, 41215);
    TextDrawFont(Textdraw10, 3);
    TextDrawSetProportional(Textdraw10, 1);
    TextDrawSetSelectable(Textdraw10, true);
    return 1;
}

public OnPlayerConnect(playerid)
{
    TextDrawShowForPlayer(playerid, Textdraw10);
    format(gString, sizeof(gString), "%s",  Nome(playerid));
    TextDrawSetString(Textdraw10, gString);
    return 1;
}
Reply
#2

Auguem ai ?
Reply
#3

Crie 1 textdraw para kd player '-'
Reply
#4

como assim ?
Reply
#5

https://sampwiki.blast.hk/wiki/GetPlayerName
Reply
#6

mais no gm ja tem essa stock olha
Код:
stock Nome( playerid )
{
	new Nome1[MAX_PLAYER_NAME];
	GetPlayerName(playerid, Nome1, MAX_PLAYER_NAME);
	return Nome1;
}
Reply
#7

PHP код:
new Text:Textdraw10[MAX_PLAYERS];
public 
OnGameModeInit()
{
    for (new 
iMAX_PLAYERSi++)
    {
        
Textdraw10[i] = TextDrawCreate8.941410305.082885"%s");
        
TextDrawLetterSize(Textdraw10[i], 0.3563531.874166);
        
TextDrawAlignment(Textdraw10[i], 1);
        
TextDrawColor(Textdraw10[i], -5963521);
        
TextDrawSetShadow(Textdraw10[i], 0);
        
TextDrawSetOutline(Textdraw10[i], 2);
        
TextDrawBackgroundColor(Textdraw10[i], 41215);
        
TextDrawFont(Textdraw10[i], 3);
        
TextDrawSetProportional(Textdraw10[i], 1);
        
TextDrawSetSelectable(Textdraw10[i], true);
    }
    return 
1;
}

public 
OnPlayerConnect(playerid)
{
    
TextDrawShowForPlayer(playeridTextdraw10[playerid]);
    
format(gStringsizeof(gString), "%s",  Nome(playerid));
    
TextDrawSetString(Textdraw10[playerid], gString);
    return 
1;

Reply
#8

tente assim na sua callback OnPlayerConnect.
pawn Код:
public OnPlayerConnect(playerid)
{
    new Name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, Name, sizeof(Name));
    TextDrawShowForPlayer(playerid, Textdraw10);
    format(gString, sizeof(gString), "%s", Name);
    TextDrawSetString(Textdraw10, gString);
    return 1;
}
Reply
#9

Valeu Delete_ + rep
Reply
#10

Disponha.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)