Include iImage -
[THs]ShadoW - 01.11.2013
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.
Respuesta: Include iImage -
ipsBruno - 01.11.2013
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.
Re: Include iImage -
[THs]ShadoW - 01.11.2013
E tem como escolher a coordenada onde ela vai ser exibida ? '-'
Respuesta: Include iImage -
ipsBruno - 02.11.2013
new Text:t = TextDrawCreate(COORDENADAXAQUI + float(x), COORDENADAYAQUI + float(y),".");
Re: Include iImage -
andreasbleck - 02.11.2013
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);
}
Respuesta: Include iImage -
ipsBruno - 02.11.2013
Й, 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.