08.03.2014, 17:04
pawn Code:
//Topo do GM
new
MeuText[MAX[MAX_PLAYERS],
TextoPlayer[MAX_PLAYERS];
//OnPlayerConnect
TextoPlayer[playerid] = 0;
//OnPlayerCommandText
if(strcmp(cmdtext, "/MostrarText", true)==0)
{
if(TextoPlayer[playerid] == 0)
{
MeuText[playerid] = Create3DTextLabel("MeuPrimeiroTexto", 0xFFFFFFAA, 30.0, 40.0, 50.0, 100.0, 0);
Attach3DTextLabelToPlayer(MeuText[playerid], playerid, 0.0, 0.0, 0.3);
TextoPlayer[playerid]++;
return 1;
}
else if(TextoPlayer[playerid] == 1)
{
Delete3DTextLabel(MeuText[playerid]);
MeuText[playerid] = Create3DTextLabel("MeuSegundoTexto", 0xFFFFFFAA, 30.0, 40.0, 50.0, 100.0, 0);
Attach3DTextLabelToPlayer(MeuText[playerid], playerid, 0.0, 0.0, 0.3);
TextoPlayer[playerid]++;
return 1;
}
else if(TextoPlayer[playerid] == 2)
{
Delete3DTextLabel(MeuText[playerid]);
MeuText[playerid] = Create3DTextLabel("MeuTerceiroTexto", 0xFFFFFFAA, 30.0, 40.0, 50.0, 100.0, 0);
Attach3DTextLabelToPlayer(MeuText[playerid], playerid, 0.0, 0.0, 0.3);
TextoPlayer[playerid] = 0;//Quando chegar aqui, a proxima vez q usar o cmd ele volta pro Primeiro Texto
return 1;
}
}