12.05.2013, 17:35
(
Последний раз редактировалось focaximubh; 12.05.2013 в 17:44.
Причина: Colocaзгo do cуdigo completo
)
Boa tarde, pois й gostaria de saber uma coisinha, estou com um problema para saber como eu faria para esconder uma uma textdraw durante a seleзгo de skin de forma que ela volte quando o player dк Spawn.....
ESTE Й O CУDIGO COMPLETO....
Se ajudarem ficarei grato
pawn Код:
new Text:ScoreTextDraw[MAX_PLAYERS]
//Gostaria de usar este TextDrawHideForPlayer no
Public OnPlayerRequestClass...;
Tentei da seguinte forma:
TextDrawHideForPlayer(playerid, ScoreTextDraw[playerid]);
Lembrando: Quando eu uso TextDrawHideForPlayer(playerid, ScoreTextDraw[playerid]);
a textdraw desejada somente desaparece por milйsimos de segundos quando aperta a seta para selecionar a skin....
//Sem sucesso......
Tentei: TextDrawDestroy(ScoreTextDraw[playerid]);
public OnPlayerSpawn
TextDrawShowForPlayer(playerid, ScoreTextDraw[playerid]);
pawn Код:
//No Topo do GM:
new Text:ScoreTextDraw[MAX_PLAYERS];
//No OnGameModeInit:
SetTimer("AtualizarScore", 1000, true);
for(new x = 0; x < MAX_PLAYERS; x++)
{
ScoreTextDraw[x] = TextDrawCreate(32.000000, 317.000000, "Score: 1000000");
TextDrawBackgroundColor(ScoreTextDraw[x], 255);
TextDrawFont(ScoreTextDraw[x], 1);
TextDrawLetterSize(ScoreTextDraw[x], 0.440000, 1.500000);
TextDrawColor(ScoreTextDraw[x], -1);
TextDrawSetOutline(ScoreTextDraw[x], 0);
TextDrawSetProportional(ScoreTextDraw[x], 1);
TextDrawSetShadow(ScoreTextDraw[x], 1);
}
//E, no Final do GM:
forward AtualizarScore();
public AtualizarScore()
{
for(new x = 0, y = GetMaxPlayers(); x != y; x++)
{
if(!IsPlayerConnected(x)) continue;
new STR[26];
format(STR, 26, "~r~Score: ~w~%d", GetPlayerScore(x));
TextDrawShowForPlayer(x, ScoreTextDraw[x]);
TextDrawSetString(ScoreTextDraw[x], STR);
}
return true;
}
![Cheesy](images/smilies/biggrin.png)