[[[Ajuda]]] Criando TextDraw
#1

Olб pessoal, eu fiz tudo conforme manda a LEi "eu acho" o textdraw mais ele nгo aparece...
eu queria que alйm de aparecer, ele ficasse pra SEMPRE para todos os players, o que fiz de errado?

Comeзo do Gamemode
pawn Код:
new Text:TextdrawC;
No OnGameModeInit

pawn Код:
TextdrawC = TextDrawCreate(638.000000,102.000000,"Brasil Play Perfect");
TextDrawAlignment(TextdrawC,3);
TextDrawBackgroundColor(TextdrawC,0xffff00ff);
TextDrawFont(TextdrawC,1);
TextDrawLetterSize(TextdrawC,1.000000,1.000000);
TextDrawColor(TextdrawC,0x0000ffff);
TextDrawSetOutline(TextdrawC,1);
TextDrawSetProportional(TextdrawC,1);
TextDrawSetShadow(TextdrawC,10);
Reply
#2

Serб que й conflito com algum textdraw?

as vezes quando eu coloco isso o VELOCIMETRO FICA BUGADO...

IMG DE QUANDO BUGA
http://www.baixa.la/arquivos/5501561_imagem.jpg

Reply
#3

Coloca em:

OnPlayerSpawn(ou sua public de quando o player spawna):

PHP код:
TextDrawShowForPlayer(playeridTextdrawC); 
Reply
#4

Bruno, vou fazer um pequena correзгo no seu cуdigo, ele disse que quer para TODOS os players.
pawn Код:
for(new i = 0; i<MAX_PLAYERS; i++)
{
      TextDrawShowForPlayer(i, TextdrawC);
      return 1;
}
caso vc tenha ja alguma coisa no onplayerspawn, ignore o "return 1;"(apague-o).
Reply
#5

Agora pegou, mais o velocimetro ta aparecendo ( so pode aparecer quando eu tiver num carro ) e bugado,

Lembrete, o velocimetro ja existia antes do textdraw

Reply
#6

Nгo skoll, isso nгo precisa.
Porque a textdraw vai aparecer logo quando dar spawn para o player...

@Topic
Bom para desbugar nгo sei qual й o problema, concerteza й na TextDraw, tem algum erro nela.
Para colocar pra aparecer sу quando o Player entrar no carro coloque aqui:

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
PHP код:
TextDrawShowForPlayer(playeridNOMEDATEXTDRAW);// Troque o nome para a text draw do velocimetro 
public OnPlayerExitVehicle(playerid, vehicleid)
PHP код:
TextDrawHideForPlayer(playeridNOMEDATEXTDRAW);// Troque o nome para a text draw do velocimetro 
Se quiser, poste as text draw do velocimetro pra eu ver se acho o problema!
Reply
#7

Testei com o dos 2 e ambas pegaram do mesmo geito...
Reply
#8

Ta ai o velocimetro

pawn Код:
//TEXT VELO
    Background = TextDrawCreate(HUD_INDEX+111.000000,HUD_INDEX2+77.000000,"_");  // fundo
    TextDrawUseBox(Background,1);
    TextDrawBoxColor(Background,0x00000033);
    TextDrawTextSize(Background,529.000000,0.000000);
    TextDrawAlignment(Background,0);
    TextDrawBackgroundColor(Background,0x000000ff);
    TextDrawFont(Background,1);
    TextDrawLetterSize(Background,-3.700000,5.100007);
    TextDrawColor(Background,0xffffffff);
    TextDrawSetProportional(Background,1);
    TextDrawSetShadow(Background,1);

    Topbar = TextDrawCreate(HUD_INDEX+111.000000,HUD_INDEX2+75.000000,"_");  //borda de cima
    TextDrawUseBox(Topbar,1);
    TextDrawBoxColor(Topbar,0x00000ff);
    TextDrawTextSize(Topbar,530.000000,185.000000);
    TextDrawAlignment(Topbar,0);
    TextDrawBackgroundColor(Topbar,0x000000ff);
    TextDrawFont(Topbar,3);
    TextDrawLetterSize(Topbar,2.799999,-0.200000);
    TextDrawColor(Topbar,0xffffffff);
    TextDrawSetOutline(Topbar,1);
    TextDrawSetProportional(Topbar,1);
    TextDrawSetShadow(Topbar,1);

    Leftbar = TextDrawCreate(HUD_INDEX+32.000000,HUD_INDEX2+75.000000,"_");   // borda esquerda
    TextDrawUseBox(Leftbar,1);
    TextDrawBoxColor(Leftbar,0x000000ff);
    TextDrawTextSize(Leftbar,530.000000,32.000000);
    TextDrawAlignment(Leftbar,0);
    TextDrawBackgroundColor(Leftbar,0x000000ff);
    TextDrawFont(Leftbar,3);
    TextDrawLetterSize(Leftbar,1.000000,5.299999);
    TextDrawColor(Leftbar,0xffffffff);
    TextDrawSetOutline(Leftbar,1);
    TextDrawSetProportional(Leftbar,1);
    TextDrawSetShadow(Leftbar,1);

    Bottombar = TextDrawCreate(HUD_INDEX+32.000000,HUD_INDEX2+126.000000,"_");  // borda de baixo
    TextDrawUseBox(Bottombar,1);
    TextDrawBoxColor(Bottombar,0x000000ff);
    TextDrawTextSize(Bottombar,609.000000,82.000000);
    TextDrawAlignment(Bottombar,0);
    TextDrawBackgroundColor(Bottombar,0x000000ff);
    TextDrawFont(Bottombar,3);
    TextDrawLetterSize(Bottombar,1.500000,-0.200000);
    TextDrawColor(Bottombar,0xffffffff);
    TextDrawSetOutline(Bottombar,1);
    TextDrawSetProportional(Bottombar,1);
    TextDrawSetShadow(Bottombar,1);

    Rightbar = TextDrawCreate(HUD_INDEX+113.000000,HUD_INDEX2+75.000000,"_");  // borda direita
    TextDrawUseBox(Rightbar,1);
    TextDrawBoxColor(Rightbar,0x000000ff);
    TextDrawTextSize(Rightbar,607.000000,-1.000000);
    TextDrawAlignment(Rightbar,0);
    TextDrawBackgroundColor(Rightbar,0x000000ff);
    TextDrawLetterSize(Rightbar,0.199999,5.399997);
    TextDrawFont(Rightbar,3);
    TextDrawColor(Rightbar,0xffffffff);
    TextDrawSetOutline(Rightbar,1);
    TextDrawSetProportional(Rightbar,1);
    TextDrawSetShadow(Rightbar,1);

    SpeedBarBackground = TextDrawCreate(HUD_INDEX+38.000000,HUD_INDEX2+97.000000,"_");   // fundo barra velocidade
    TextDrawUseBox(SpeedBarBackground,1);
    TextDrawBoxColor(SpeedBarBackground,0x00ff0033);
    TextDrawTextSize(SpeedBarBackground,603.000000,64.000000);
    TextDrawAlignment(SpeedBarBackground,0);
    TextDrawBackgroundColor(SpeedBarBackground,0x000000ff);
    TextDrawFont(SpeedBarBackground,3);
    TextDrawLetterSize(SpeedBarBackground,1.000000,-0.000000);
    TextDrawColor(SpeedBarBackground,0xffffffff);
    TextDrawSetOutline(SpeedBarBackground,1);
    TextDrawSetProportional(SpeedBarBackground,1);
    TextDrawSetShadow(SpeedBarBackground,1);

    HealthBarBackground = TextDrawCreate(HUD_INDEX+107.000000,HUD_INDEX2+120.000000,"_"); // fundo barra vida
    TextDrawUseBox(HealthBarBackground,1);
    TextDrawBoxColor(HealthBarBackground,0xff000033);
    TextDrawTextSize(HealthBarBackground,534.000000,0.000000);
    TextDrawAlignment(HealthBarBackground,0);
    TextDrawBackgroundColor(HealthBarBackground,0x000000ff);
    TextDrawFont(HealthBarBackground,3);
    TextDrawLetterSize(HealthBarBackground,1.000000,-0.000000);
    TextDrawColor(HealthBarBackground,0xffffffff);
    TextDrawSetOutline(HealthBarBackground,1);
    TextDrawSetProportional(HealthBarBackground,1);
    TextDrawSetShadow(HealthBarBackground,1);

    LowHealthLine = TextDrawCreate(HUD_INDEX+56.000000,HUD_INDEX2+120.000000,"_");  // barra branca da vida
    TextDrawUseBox(LowHealthLine,1);
    TextDrawBoxColor(LowHealthLine,0xffffffff);
    TextDrawTextSize(LowHealthLine,551.000000,0.000000);
    TextDrawAlignment(LowHealthLine,0);
    TextDrawBackgroundColor(LowHealthLine,0x000000ff);
    TextDrawFont(LowHealthLine,3);
    TextDrawLetterSize(LowHealthLine,0.199999,-0.000000);
    TextDrawColor(LowHealthLine,0xffffffff);
    TextDrawSetOutline(LowHealthLine,1);
    TextDrawSetProportional(LowHealthLine,1);
    TextDrawSetShadow(LowHealthLine,1);

    for(new i=0; i<GetMaxPlayers(); i++)
    {
        HUDTexts[i] = TextDrawCreate(HUD_INDEX+35.000000,HUD_INDEX2+76.000000, " ");    // escritas
        TextDrawAlignment(HUDTexts[i],0);
        TextDrawBackgroundColor(HUDTexts[i],0x000000ff);
        TextDrawFont(HUDTexts[i],1);
        TextDrawLetterSize(HUDTexts[i],0.199999,0.899999);
        TextDrawSetProportional(HUDTexts[i],1);
        TextDrawSetShadow(HUDTexts[i],1);
        TextDrawColor(HUDTexts[i],0xffff00ff);

        SpeedBar[i] = TextDrawCreate(HUD_INDEX+38.000000,HUD_INDEX2+97.000000,"_"); // barra velocidade
        TextDrawUseBox(SpeedBar[i],1);
        TextDrawBoxColor(SpeedBar[i],0x00ff0066);
        TextDrawAlignment(SpeedBar[i],0);
        TextDrawBackgroundColor(SpeedBar[i],0x000000ff);
        TextDrawFont(SpeedBar[i],3);
        TextDrawLetterSize(SpeedBar[i],9.100000,-0.000000);
        TextDrawColor(SpeedBar[i],0xffffffff);
        TextDrawSetOutline(SpeedBar[i],1);
        TextDrawSetProportional(SpeedBar[i],1);
        TextDrawSetShadow(SpeedBar[i],1);

        HealthBar[i] = TextDrawCreate(HUD_INDEX+38.000000,HUD_INDEX2+120.000000,"_"); // barra vida
        TextDrawUseBox(HealthBar[i],1);
        TextDrawBoxColor(HealthBar[i],0xff000066);
        TextDrawAlignment(HealthBar[i],0);
        TextDrawBackgroundColor(HealthBar[i],0x000000ff);
        TextDrawFont(HealthBar[i],3);
        TextDrawLetterSize(HealthBar[i],1.000000,-0.000000);
        TextDrawColor(HealthBar[i],0xffffffff);
        TextDrawSetOutline(HealthBar[i],1);
        TextDrawSetProportional(HealthBar[i],1);
        TextDrawSetShadow(HealthBar[i],1);

    }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)