[HELP] Velocimetro/Speedo -
Lуs - 23.08.2011
Pessoal, resolvi tentar fazer um velocimetro. Atй ai tudo bem, se eu soubesse por onde e como comeзar. Assim que forem me ajudando vгo REP+... Alguem pode, sabe ou tem ideia de como comeзar e por onde comeзar a fazer um, eu teria que usar OnPlayerUpdate para atualizar a velocidade
Re: [HELP] Velocimetro/Speedo -
Gustavo_xP - 23.08.2011
Cara vocк precisa de text drawn para usa um fs que tem aqui no forum
Re: [HELP] Velocimetro/Speedo -
Lуs - 23.08.2011
A textdraw eu jб fiz... Ficou assim:
pawn Код:
Textdraw0 = TextDrawCreate(635.000000, 266.000000, "_");
TextDrawBackgroundColor(Textdraw0, 255);
TextDrawFont(Textdraw0, 1);
TextDrawLetterSize(Textdraw0, 1.000000, 10.000002);
TextDrawColor(Textdraw0, -1);
TextDrawSetOutline(Textdraw0, 0);
TextDrawSetProportional(Textdraw0, 1);
TextDrawSetShadow(Textdraw0, 1);
TextDrawUseBox(Textdraw0, 1);
TextDrawBoxColor(Textdraw0, 799);
TextDrawTextSize(Textdraw0, 475.000000, 5.000000);
Textdraw1 = TextDrawCreate(478.000000, 264.000000, "Velocidade: --");
TextDrawBackgroundColor(Textdraw1, 255);
TextDrawFont(Textdraw1, 1);
TextDrawLetterSize(Textdraw1, 0.419999, 1.500000);
TextDrawColor(Textdraw1, -16776961);
TextDrawSetOutline(Textdraw1, 0);
TextDrawSetProportional(Textdraw1, 1);
TextDrawSetShadow(Textdraw1, 1);
Textdraw2 = TextDrawCreate(478.000000, 289.000000, "Veiculo: --");
TextDrawBackgroundColor(Textdraw2, 255);
TextDrawFont(Textdraw2, 1);
TextDrawLetterSize(Textdraw2, 0.419999, 1.500000);
TextDrawColor(Textdraw2, 16711935);
TextDrawSetOutline(Textdraw2, 0);
TextDrawSetProportional(Textdraw2, 1);
TextDrawSetShadow(Textdraw2, 1);
Textdraw3 = TextDrawCreate(478.000000, 305.000000, "Localizacao: --");
TextDrawBackgroundColor(Textdraw3, 255);
TextDrawFont(Textdraw3, 1);
TextDrawLetterSize(Textdraw3, 0.419999, 1.500000);
TextDrawColor(Textdraw3, -1);
TextDrawSetOutline(Textdraw3, 0);
TextDrawSetProportional(Textdraw3, 1);
TextDrawSetShadow(Textdraw3, 1);
Textdraw4 = TextDrawCreate(478.000000, 319.000000, "Lataria: --");
TextDrawBackgroundColor(Textdraw4, 255);
TextDrawFont(Textdraw4, 1);
TextDrawLetterSize(Textdraw4, 0.419999, 1.500000);
TextDrawColor(Textdraw4, 65535);
TextDrawSetOutline(Textdraw4, 0);
TextDrawSetProportional(Textdraw4, 1);
TextDrawSetShadow(Textdraw4, 1);
Textdraw5 = TextDrawCreate(477.000000, 334.000000, "Combustivel: --");
TextDrawBackgroundColor(Textdraw5, 255);
TextDrawFont(Textdraw5, 1);
TextDrawLetterSize(Textdraw5, 0.419999, 1.500000);
TextDrawColor(Textdraw5, -65281);
TextDrawSetOutline(Textdraw5, 0);
TextDrawSetProportional(Textdraw5, 1);
TextDrawSetShadow(Textdraw5, 1);
Textdraw6 = TextDrawCreate(635.000000, 266.000000, "_");
TextDrawBackgroundColor(Textdraw6, 255);
TextDrawFont(Textdraw6, 1);
TextDrawLetterSize(Textdraw6, 1.000000, 10.000002);
TextDrawColor(Textdraw6, -1);
TextDrawSetOutline(Textdraw6, 0);
TextDrawSetProportional(Textdraw6, 1);
TextDrawSetShadow(Textdraw6, 1);
TextDrawUseBox(Textdraw6, 1);
TextDrawBoxColor(Textdraw6, 799);
TextDrawTextSize(Textdraw6, 475.000000, 5.000000);
Textdraw7 = TextDrawCreate(635.000000, 266.000000, "_");
TextDrawBackgroundColor(Textdraw7, 255);
TextDrawFont(Textdraw7, 1);
TextDrawLetterSize(Textdraw7, 1.000000, 10.000002);
TextDrawColor(Textdraw7, -1);
TextDrawSetOutline(Textdraw7, 0);
TextDrawSetProportional(Textdraw7, 1);
TextDrawSetShadow(Textdraw7, 1);
TextDrawUseBox(Textdraw7, 1);
TextDrawBoxColor(Textdraw7, 799);
TextDrawTextSize(Textdraw7, 475.000000, 5.000000);
Re: [HELP] Velocimetro/Speedo -
Bruno Pereira - 23.08.2011
Bom, eu fiz um velocimetro pro meu GM, ficou bem legal mas nгo sei se vou postar.
Usa exemplo, procura algum velocimetro e veja como foi feito e tente fazer.
Re: [HELP] Velocimetro/Speedo -
Lуs - 23.08.2011
Se me ajudarem aqui eu posto ele, vou tentar pegar algum de exemplo aqui...
Obrigado, qualquer coisa posto aqui
Re: [HELP] Velocimetro/Speedo -
John_Race - 23.08.2011
Use esse de exemplo:
https://sampforum.blast.hk/showthread.php?tid=182581
[]'s
Re: [HELP] Velocimetro/Speedo -
Lуs - 23.08.2011
Quote:
Originally Posted by John_Race
|
Link OFF :S
Re: [HELP] Velocimetro/Speedo -
John_Race - 23.08.2011
Quote:
Originally Posted by Los
Link OFF :S
|
http://www.multiupload.com/OBIC2VESNA
Re: [HELP] Velocimetro/Speedo -
Bruno Pereira - 23.08.2011
Vou te mandar uns aqui que me basiei no comeзo:
http://forum.sa-mp.com/showthread.ph...ht=Velocimetro
http://forum.sa-mp.com/showthread.ph...ht=Velocimetro
http://forum.sa-mp.com/showthread.ph...ht=Velocimetro
Alguns que achei dando uma rбpida olhada no Search

!
Re: [HELP] Velocimetro/Speedo -
Lуs - 23.08.2011
Certo, criei um loop no OnGameModeInit e botei as TextDraws:
pawn Код:
Velocimetro0[i] = TextDrawCreate(635.000000, 266.000000, "_");
TextDrawBackgroundColor(Velocimetro0[i], 255);
TextDrawFont(Velocimetro0[i], 1);
TextDrawLetterSize(Velocimetro0[i], 1.000000, 10.000002);
TextDrawColor(Velocimetro0[i], -1);
TextDrawSetOutline(Velocimetro0[i], 0);
TextDrawSetProportional(Velocimetro0[i], 1);
TextDrawSetShadow(Velocimetro0[i], 1);
TextDrawUseBox(Velocimetro0[i], 1);
TextDrawBoxColor(Velocimetro0[i], 799);
TextDrawTextSize(Velocimetro0[i], 475.000000, 5.000000);
Velocimetro1[i] = TextDrawCreate(478.000000, 264.000000, "Velocidade: --");
TextDrawBackgroundColor(Velocimetro1[i], 255);
TextDrawFont(Velocimetro1[i], 1);
TextDrawLetterSize(Velocimetro1[i], 0.419999, 1.500000);
TextDrawColor(Velocimetro1[i], -16776961);
TextDrawSetOutline(Velocimetro1[i], 0);
TextDrawSetProportional(Velocimetro1[i], 1);
TextDrawSetShadow(Velocimetro1[i], 1);
Velocimetro2[i] = TextDrawCreate(478.000000, 289.000000, "Veiculo: --");
TextDrawBackgroundColor(Velocimetro2[i], 255);
TextDrawFont(Velocimetro2[i], 1);
TextDrawLetterSize(Velocimetro2[i], 0.419999, 1.500000);
TextDrawColor(Velocimetro2[i], 16711935);
TextDrawSetOutline(Velocimetro2[i], 0);
TextDrawSetProportional(Velocimetro2[i], 1);
TextDrawSetShadow(Velocimetro2[i], 1);
Velocimetro3[i] = TextDrawCreate(478.000000, 305.000000, "Localizacao: --");
TextDrawBackgroundColor(Velocimetro3[i], 255);
TextDrawFont(Velocimetro3[i], 1);
TextDrawLetterSize(Velocimetro3[i], 0.419999, 1.500000);
TextDrawColor(Velocimetro3[i], -1);
TextDrawSetOutline(Velocimetro3[i], 0);
TextDrawSetProportional(Velocimetro3[i], 1);
TextDrawSetShadow(Velocimetro3[i], 1);
Velocimetro4[i] = TextDrawCreate(478.000000, 319.000000, "Lataria: --");
TextDrawBackgroundColor(Velocimetro4[i], 255);
TextDrawFont(Velocimetro4[i], 1);
TextDrawLetterSize(Velocimetro4[i], 0.419999, 1.500000);
TextDrawColor(Velocimetro4[i], 65535);
TextDrawSetOutline(Velocimetro4[i], 0);
TextDrawSetProportional(Velocimetro4[i], 1);
TextDrawSetShadow(Velocimetro4[i], 1);
Velocimetro5[i] = TextDrawCreate(477.000000, 334.000000, "Combustivel: --");
TextDrawBackgroundColor(Velocimetro5[i], 255);
TextDrawFont(Velocimetro5[i], 1);
TextDrawLetterSize(Velocimetro5[i], 0.419999, 1.500000);
TextDrawColor(Velocimetro5[i], -65281);
TextDrawSetOutline(Velocimetro5[i], 0);
TextDrawSetProportional(Velocimetro5[i], 1);
TextDrawSetShadow(Velocimetro5[i], 1);
Velocimetro6[i] = TextDrawCreate(635.000000, 266.000000, "_");
TextDrawBackgroundColor(Velocimetro6[i], 255);
TextDrawFont(Velocimetro6[i], 1);
TextDrawLetterSize(Velocimetro6[i], 1.000000, 10.000002);
TextDrawColor(Velocimetro6[i], -1);
TextDrawSetOutline(Velocimetro6[i], 0);
TextDrawSetProportional(Velocimetro6[i], 1);
TextDrawSetShadow(Velocimetro6[i], 1);
TextDrawUseBox(Velocimetro6[i], 1);
TextDrawBoxColor(Velocimetro6[i], 799);
TextDrawTextSize(Velocimetro6[i], 475.000000, 5.000000);
Velocimetro7[i] = TextDrawCreate(635.000000, 266.000000, "_");
TextDrawBackgroundColor(Velocimetro7[i], 255);
TextDrawFont(Velocimetro7[i], 1);
TextDrawLetterSize(Velocimetro7[i], 1.000000, 10.000002);
TextDrawColor(Velocimetro7[i], -1);
TextDrawSetOutline(Velocimetro7[i], 0);
TextDrawSetProportional(Velocimetro7[i], 1);
TextDrawSetShadow(Velocimetro7[i], 1);
TextDrawUseBox(Velocimetro7[i], 1);
TextDrawBoxColor(Velocimetro7[i], 799);
TextDrawTextSize(Velocimetro7[i], 475.000000, 5.000000);
E deu os seguintes erros:
Код:
(690) error: 028: invalid subscript (not an array or too many subscripts): "Velocimetro0"
(690) warning: 215: expression has no effect
(690) error: 001: expected token: ";", but found "]"
(690) error: 029: invalid expression, assumed zero
(690) error fatal: 107: too many error messages on one line
Alguem?