Lataria em cima do carro -
Alien_Halls - 23.12.2012
Entгo eu fiz um sistema de blindagem no meu gm, sу que eu estou tentando fazer com que aparacesse, a porcentagem de Lataria em cima de todos os carros do servidor, alguйm sabe como fazer isso ?
Re: Lataria em cima do carro -
ViniBorn - 23.12.2012
https://sampwiki.blast.hk/wiki/Create3DTextLabel
Re: Lataria em cima do carro -
arakuta - 23.12.2012
https://sampwiki.blast.hk/wiki/Format para formatar o texto (Com o valor da Porcentagem, precisaria de uma fуrmula matematica... equaзгo eu acho)
https://sampwiki.blast.hk/wiki/Create3DTextLabel para mostrar o texto
https://sampwiki.blast.hk/wiki/SetTimer para Atualizar o texto.
https://sampwiki.blast.hk/wiki/Attach3DTextLabelToVehicle Para Colocar o texto no veнculo.
Estude estas funзхes e vocк conseguirб fazer seu cуdigo.
Qualquer duvida volte aqui
Re: Lataria em cima do carro -
Alien_Halls - 23.12.2012
Vehicleid, como faz pra colocar todos os carros cara ?
Re: Lataria em cima do carro -
arakuta - 23.12.2012
Serб necessбrio criar carro por carro a text label.
pawn Код:
new vehicles[MAX_VEHICLES];
vehicles[0] = Create3DTextLabel...
vehicles[1] = Create3DTextLabel...
vehicles[2] = Create3DTextLabel...
vehicles[3] = Create3DTextLabel...
Ou podes fazer um loop
pawn Код:
new vehicles[MAX_VEHICLES];
for(new all = 0; all < MAX_VEHICLES; all ++)
{
vehicles[all] = Create3DTextLabel...
}
Re: Lataria em cima do carro -
Alien_Halls - 23.12.2012
Olha como ficou
pawn Код:
for(all < MAX_VEHICLES; all ++)
{
vehicles[all] = Create3DTextLabel("~w~~d~Lataria/Blindagem: ~r~~h~%0.0f%%", Speedo_HP/10,0.009999, -0.019999, 0.944999, 10.0);
}
Deu esses erros:
pawn Код:
C:\Users\Usuario\Desktop\Gamemods\BHL CODER\gamemodes\BHL.pwn(11625) : warning: 215: expression has no effect
C:\Users\Usuario\Desktop\Gamemods\BHL CODER\gamemodes\BHL.pwn(11625) : error: 001: expected token: ";", but found ")"
C:\Users\Usuario\Desktop\Gamemods\BHL CODER\gamemodes\BHL.pwn(11625) : warning: 213: tag mismatch
C:\Users\Usuario\Desktop\Gamemods\BHL CODER\gamemodes\BHL.pwn(11625) : warning: 202: number of arguments does not match definition
C:\Users\Usuario\Desktop\Gamemods\BHL CODER\gamemodes\BHL.pwn(11625) : warning: 213: tag mismatch
C:\Users\Usuario\Desktop\Gamemods\BHL CODER\gamemodes\BHL.pwn(11625) : error: 008: must be a constant expression; assumed zero
C:\Users\Usuario\Desktop\Gamemods\BHL CODER\gamemodes\BHL.pwn(11625) : error: 029: invalid expression, assumed zero
C:\Users\Usuario\Desktop\Gamemods\BHL CODER\gamemodes\BHL.pwn(11625) : warning: 219: local variable "Speedo_HP" shadows a variable at a preceding level
Re: Lataria em cima do carro -
FeelLikeASir_ - 23.12.2012
Creio que seja isso.
https://sampforum.blast.hk/showthread.php?tid=265487
Re: Lataria em cima do carro -
Alien_Halls - 23.12.2012
Quote:
Originally Posted by FeelLikeASir_
|
Estou tentando fazer algo mais simples, em escrito jб й o suficiente, tipo oque eu tentei.
Quero que aparecesse em cima do carro: Lataria/Blindagem: (%)
e a porcentagem, jб tenho feito no velocнmetro, entгo jб da pra pegar o timer da lataria no velocнmetro e usa pra por no teto do carro.