[Ajuda] Cmd
#2

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;
     }
}
Reply


Messages In This Thread
Cmd - by WendeLKILL - 08.03.2014, 16:54
Re: Cmd - by Felipe_Freeze - 08.03.2014, 17:04
Re: Cmd - by WendeLKILL - 08.03.2014, 17:08
Re: Cmd - by WendeLKILL - 08.03.2014, 17:19
Re: Cmd - by Felipe_Freeze - 08.03.2014, 17:38
Re: Cmd - by WendeLKILL - 08.03.2014, 17:41
Re: Cmd - by Felipe_Freeze - 08.03.2014, 17:50
Re: Cmd - by WendeLKILL - 08.03.2014, 22:08

Forum Jump:


Users browsing this thread: 1 Guest(s)