Marcar segundos em gametextforplayer. -
pawn Код:
if(strcmp(cmd,"/roubar",true)==0)
  {
    if(PlayerInfo[playerid][pMembro] != 20 && PlayerInfo[playerid][pLider] != 20)
    {
      SendClientMessage(playerid,COLOR_GREY,"Vocк nгo pode Roubar!.");
      return 1;
    }
    if(roubando[playerid] == 1)
    {
      SendClientMessage(playerid, COLOR_GRAD5, "Vocк ja estб roubando algum lugar.");
      return 1;
    }
    if(PlayerToPoint(1.0,playerid, 2141.4456,1641.9794,993.5761))
    {
      if(roubobanco == 1)
      {
        SendClientMessage(playerid, COLOR_GRAD5, "Jб estб tendo uma tentativa de roubo nesse Local.");
        return 1;
      }
      if(temporoubobanco == 1)
      {
        SendClientMessage(playerid,COLOR_GREY,"Jб roubaram o cofre do banco espere 3 minutos para roubar de novo !");
        return 1;
      }
      GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
      format(string, sizeof(string), "%s e os %s Estouraram o Cofre do Banco e Estгo Tentando Roubar! ID:[%d]", playername, NomeORG(playerid) , playerid);
      SendClientMessageToAll(GetPlayerColor(playerid), string);
      SendClientMessage(playerid, COLOR_GRAD5, "Espere 60 segundos para terminar de roubar o banco.");
      SetPlayerCriminal(playerid,255, "Tentativa de Roubo ao Banco");
      roubando[playerid] = 1;
      ProvocoBanco[playerid] = 1;
      roubobanco = 1;
      temporoubobanco = 1;
      SetTimer("Aroubo", 220000, 0);
      tempobanco = SetTimerEx("RouboBanco", 60000, 0, "i", playerid);
      return 1;
    }
    else
    {
      SendClientMessage(playerid, COLOR_GREY, "Vocк nгo esta em um Local de Roubo!");
      return 1;
  }
}
public RouboBanco(playerid)
{
  KillTimer(tempobanco);
  if(!IsACop(playerid))
  if(!PlayerToPoint(8.0,playerid,2141.4456,1641.9794,993.5761))
  {
    format(gstring, sizeof(gstring), "%s e os %s nгo conseguiram roubar o cofre do Banco! ID:[%d]", PlayerName(playerid), NomeORG(playerid), playerid);
    SendClientMessageToAll(GetPlayerColor(playerid), gstring);
    SendClientMessage(playerid, COLOR_GREY, "Vocк nгo estб no cofre do banco.");
    ProvocoBanco[playerid] = 0; roubando[playerid] = 0; roubobanco = 0; KillTimer(tempobanco); temporoubobanco = 0;
    return 1;
  }
  ForPlayers(i)
  {
    if(PlayerToPoint(10.0,i,2141.4456,1641.9794,993.5761))
    if(!IsACop(playerid))
    {
      if(ProvocoBanco[playerid] == 1)
      {
        format(gstring, sizeof(gstring), "%s e os %s Conseguiram Roubar o Cofre do Banco! ID:[%d]", PlayerName(playerid), NomeORG(playerid), playerid);
        SendClientMessageToAll(GetPlayerColor(playerid), gstring);
        roubando[playerid] = 0; roubobanco = 0; ProvocoBanco[playerid] = 0;
      }
      if(!IsACop(i))
      {
        SetPlayerCriminal(i,255, "Roubo ao Banco");
        GivePlayerMoneyEx(i, 30000);
        format(gstring, sizeof(gstring), "Vocк e os %s roubaram R$30000 do cofre do Banco!",NomeORG(playerid));
        SendClientMessage(i, COLOR_YELLOW, gstring);
      }
    }
  }
  return 1;
}
public Aroubo()
{
  temporoubobanco = 0;
}
Re: Marcar segundos em gametextforplayer. -
pawn Код:
forward Contar(Contagem);
public Contar(Contagem)
{
  new VBString[3];
  format(VBString, 3, "%d",Contagem);
  if(Contagem > 0)
  {
    GameTextForAll(VBString, 700, 5);
    SetTimerEx("Contar",1000, false, "i", Contagem-1);
  }
  else GameTextForAll("Valendo !", 1000, 5);
}
Re: Marcar segundos em gametextforplayer. -
Re: Marcar segundos em gametextforplayer. -
Й na seguinte ordem > 5, 4, 3, ...
Й acrescentar um parametro para identificar o ID do jogador e usar GameTextForPlayer ...