[Ajuda] Adicionando sprite na nova versгo
#1

Olб, bom dia!

Fiz as sprites tudo certinho(Como mostra a print aqui), ao colocar no gamemode nгo aparece a logo em .png (print).

Eu tambйm gostaria de tirar uma dъvida, como й tela de login essa sprite deve ser em global ou player?
Reply
#2

https://sampforum.blast.hk/showthread.php?tid=651543
Reply
#3

Quote:
Originally Posted by GRiMMREAPER
Посмотреть сообщение
Tutorial ensina a fazer, eu sei fazer, porйm a questгo й no cуdigo dentro do servidor.
Reply
#4

PHP код:
C:\Users\YurS.YurS-PC\Desktop\SA-RP GM\gamemodes\carp_8.pwn(10777) : warning 215expression has no effect
C
:\Users\YurS.YurS-PC\Desktop\SA-RP GM\gamemodes\carp_8.pwn(10777) : error 001expected token";"but found "["
C:\Users\YurS.YurS-PC\Desktop\SA-RP GM\gamemodes\carp_8.pwn(10777) : error 029invalid expressionassumed zero
C
:\Users\YurS.YurS-PC\Desktop\SA-RP GM\gamemodes\carp_8.pwn(10777) : warning 215expression has no effect
C
:\Users\YurS.YurS-PC\Desktop\SA-RP GM\gamemodes\carp_8.pwn(10777) : error 001expected token";"but found "]"
C:\Users\YurS.YurS-PC\Desktop\SA-RP GM\gamemodes\carp_8.pwn(10777) : fatal error 107too many error messages on one line
Compilation aborted
.Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase 
PHP код:
    LoginText[playerid][0] = CreatePlayerTextDraw(playerid239.800064, -0.804459"mdl-2000:login"); //IMAGEM DE LOGIN
    
PlayerTextDrawLetterSize(playeridLoginText[playerid][0], 0.0000000.000000);
    
PlayerTextDrawTextSize(playeridLoginText[playerid][0], 155.000000166.000000);
    
PlayerTextDrawAlignment(playeridLoginText[playerid][0], 1);
    
PlayerTextDrawColor(playeridLoginText[playerid][0], -1);
    
PlayerTextDrawSetShadow(playeridLoginText[playerid][0], 0);
    
PlayerTextDrawSetOutline(playeridLoginText[playerid][0], 0);
    
PlayerTextDrawBackgroundColor(playeridLoginText[playerid][0], 255);
    
PlayerTextDrawFont(playeridLoginText[playerid][0], 4);
    
PlayerTextDrawSetProportional(playeridLoginText[playerid][0], 0);
    
PlayerTextDrawSetShadow(playeridLoginText[playerid][0], 0); 
Reply
#5

Qual a linha do erro?
Reply
#6

Quote:
Originally Posted by ipsLuan
Посмотреть сообщение
Qual a linha do erro?
PHP код:
    LoginText[playerid][0] = CreatePlayerTextDraw(playerid239.800064, -0.804459"mdl-2000:login"); //IMAGEM DE LOGIN 
https://cdn.discordapp.com/attachmen...20/unknown.png


Se eu adiciono como player ao invйs de global da erro no cуdigo mas se eu adiciono como global copila sem erro algum porйm a imagem fica bugada.
Reply
#7

Player-TextDraw nгo exibe sprite. Use uma textdraw global para exibir.
Reply
#8

Quote:
Originally Posted by willttoonn
Посмотреть сообщение
Player-TextDraw nгo exibe sprite. Use uma textdraw global para exibir.
Ao usar o global nгo aparece a logo do servidor, as vezes aparece imagem de um cavalo ou sу "ACESSAR PERSONAGEM"
Reply
#9

Entгo vocк ta programando errado a textdraw global. Onde vocк estб colocando o CreateTextDraw?
Reply
#10

Quote:
Originally Posted by willttoonn
Посмотреть сообщение
Entгo vocк ta programando errado a textdraw global. Onde vocк estб colocando o CreateTextDraw?
OnGameModeInit
Reply
#11

Quote:
Originally Posted by Shotsfired
Посмотреть сообщение
OnGameModeInit
Geralmente a criaзгo do player textdraw й feito dentro da callback OnPlayerConnect.

Exemplos de uso:
PHP код:
//Global
new Text:text1;
public 
OnGameModeInit()
...
text1 TextDrawCreate(xy"mdl-2000:login");
...
//Player
new PlayerText:text1[MAX_PLAYERS];
public 
OnPlayerConnect(playerid)
...
text1[playerid] = CreatePlayerTextDraw(playeridtext1[playerid], xy"mdl-2000:login");
... 
Dб uma lida:
https://sampwiki.blast.hk/wiki/CreatePlayerTextDraw
https://sampwiki.blast.hk/wiki/TextDrawCreate
Reply
#12

Já fiz sprites com PlayerTextDraw e não deu erros e apareceu sem bugs, Eu usei a box white do editor iTD
Reply
#13

Quote:
Originally Posted by Ramonx100
Посмотреть сообщение
Geralmente a criaзгo do player textdraw й feito dentro da callback OnPlayerConnect.

Exemplos de uso:
PHP код:
//Global
new Text:text1;
public 
OnGameModeInit()
...
text1 TextDrawCreate(xy"mdl-2000:login");
...
//Player
new PlayerText:text1[MAX_PLAYERS];
public 
OnPlayerConnect(playerid)
...
text1[playerid] = CreatePlayerTextDraw(playeridtext1[playerid], xy"mdl-2000:login");
... 
Dб uma lida:
https://sampwiki.blast.hk/wiki/CreatePlayerTextDraw
https://sampwiki.blast.hk/wiki/TextDrawCreate
Fiz dessa forma mas eu nгo entendo pq a imagem nгo aparece, cujo a "mdl-2000:login"..
Reply
#14

a imagem tem a resolucao multipla de 2? 2x2, 4x4 ... 128x128, 256x256, 1024x1024? se estiverem mal configurados nгo vгo aparecer mesmo.

recomendo os tutoriais abaixo.

Quote:

Tutorial:
Edit: Caramba! Й inacreditбvel o nъmero de pessoas que nгo leram o tutorial abaixo e estгo publicando mods feitos de maneira errada!
Leiam por favor!!!:
Devido ao programa estar 100% em portuguкs, acredito que nгo й necessбrio ensinar a usar o bбsico dele.
Mas por favor: Ao adicionar uma textura sem alpha (transparкncia), use compressгo DXT1, e caso tenha transparкncia, use DXT5, deste modo o arquivo .txd ficarб 2X mais leve e ainda com qualidade. Assim, consequentemente para o bom funcionamento do DXT, a imagem tem que estar com resoluзгo potкncia de dois: 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048 e 4096, (por exemplo 256x512, 64x64 etc) e felizmente, no menu "Editar" (ou ALT+S) hб como vocк redimensionar a textura dentro do prуprio Magic TXD.
Geralmente em texturas sprites (2D, na tela) nгo й necessбrio compressгo e nem mipmap. Assim como tambйm nгo faзa isso com nada no player.img, e algumas texturas do vehicle.txd, ou causarб crash.
Dica: Й possнvel adicionar texturas arrastando elas diretamente para a janela do programa. Ou atй mesmo criar/extrair .txd pelo menu de contexto (botгo direito do mouse).
https://www.mixmods.com.br/2016/04/p...ditar-txd.html
http://brmodstudio.forumeiros.com/t8...medio-avancado
Reply
#15

Quote:
Originally Posted by RenanMsV
Посмотреть сообщение
a imagem tem a resolucao multipla de 2? 2x2, 4x4 ... 128x128, 256x256, 1024x1024? se estiverem mal configurados nгo vгo aparecer mesmo.

recomendo os tutoriais abaixo.


http://brmodstudio.forumeiros.com/t8...medio-avancado
O problema nгo й em fazer a sprite, eu fiz e ela estб funcionando de boa, o problema estб para coloca-la na gamemode, pois quando coloco no programa e tal a imagem aparece tudo certinho.
Reply
#16

Acompanhe o tutorial: https://sampforum.blast.hk/showthread.php?tid=650869.

- Provavelmente foi algo no artconfig.
Reply
#17

Quote:
Originally Posted by ipsLuan
Посмотреть сообщение
Acompanhe o tutorial: https://sampforum.blast.hk/showthread.php?tid=650869.

- Provavelmente foi algo no artconfig.
essa parte tб tudo certo, aparece imagem e tudo, o bagulho й quando coloco o meu gm.
Reply
#18

Resolvido!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)