[Pedido] Lataria em cima do carro
#1

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 ?
Reply
#2

https://sampwiki.blast.hk/wiki/Create3DTextLabel
Reply
#3

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
Reply
#4

Vehicleid, como faz pra colocar todos os carros cara ?
Reply
#5

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...
}
Reply
#6

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
Reply
#7

Creio que seja isso.
https://sampforum.blast.hk/showthread.php?tid=265487
Reply
#8

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)