27.12.2013, 02:46
Mano pega de exemplo
Inicio GM
Fim GM
Inicio GM
pawn Код:
new Text:Nomes[MAX_PLAYERS];
pawn Код:
public OnPlayerSpawn(playerid)
{
new str1[40];
TextDrawShowForPlayer(playerid, Nomes[playerid]);
format(str1,sizeof(str1),"%s",pNome(playerid));
TextDrawSetString(Nomes[playerid], str1);
}
pawn Код:
public OnGameModeInit()
{
for(new i=0; i<MAX_PLAYERS; i++)
{
Nomes[i] = TextDrawCreate(290.000000,380.000000,"_");
TextDrawAlignment(Nomes[i],0);
TextDrawBackgroundColor(Nomes[i],0x000000ff);
TextDrawFont(Nomes[i],1);
TextDrawLetterSize(Nomes[i],0.89,1.000000);
TextDrawColor(Nomes[i],0xffffffff);
TextDrawSetOutline(Nomes[i],1);
TextDrawSetProportional(Nomes[i],1);
TextDrawSetShadow(Nomes[i],1);
}
}
pawn Код:
stock pNome(playerid)
{//Essa funзгo irб returnar o nome do jogador, sendo assim nгo precisa toda vez usar new nome[MAX_PLAYER_NAME]; GetPlayerName e bla bla bla.
GetPlayerName(playerid, nome, sizeof(nome));
return nome;
}