[Ajuda] Include iImage
#1

Fala galera, beleza ?

Queria pedir ajuda de vocкs com a Include iImagem do ipsBruno, alguйm sabe como exibir a imagem pro player ? Acredito que seja em forma de Textdraw, mas nгo consegui D:

Obrigado desde jб !

Cumps.
Reply
#2

Exemplo simples


pawn Код:
stock MostrarImg(img[], playerid) {
     new arr[bitmapType];
     new File: f = OpenImage(img, arr);

     for(new x; x != GetSizeX(arr); x++) {
          for(new y; y != GetSizeY(arr); y++) {

               new Text:t = TextDrawCreate(float(x),float(y),".");
               TextDrawColor( t, GetPixelColor(f, x, y, arr));
               TextDrawShowForPlayer(playerid, t);
          }
     }
     return CloseImage(f);
}
Nгo testei, mas й basicamente isto.
Reply
#3

E tem como escolher a coordenada onde ela vai ser exibida ? '-'
Reply
#4

new Text:t = TextDrawCreate(COORDENADAXAQUI + float(x), COORDENADAYAQUI + float(y),".");
Reply
#5

Ou pode fazer a stock assim:
pawn Код:
stock MostrarImg(playerid, img[], Float:imgx, Float:imgy)
{
    new arr[bitmapType], File:f = OpenImage(img, arr);
    for(new x; x != GetSizeX(arr); x++)
    {
        for(new y; y != GetSizeY(arr); y++)
        {
            new Text:t = TextDrawCreate(imgx + float(x), imgy + float(y), ".");
            TextDrawColor(t, GetPixelColor(f, x, y, arr));
            TextDrawShowForPlayer(playerid, t);
        }
    }
    return CloseImage(f);
}
Reply
#6

Й, essa do Andreas tб bem adaptбvel.


Sу aconselho usar isto se for pra colocar uma imagem logo que o player conecta, como o logo do teu servidor. Porque se tu quiser, deletar esta e colocar a outra, vai precisar deletar todos TextDraws, um por um, o que as vezes dб centenas deles.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)