[Ajuda] TextDraw PPC_Trucking
#1

algum pode me ajudar a colocar isso em cima do meu Mapa editei no (PhotoScape) kkkkkk

o GM й de Trucking...



agradeзo quem poder me ajuda ....
Reply
#2

Use um editor de TextDraw » https://sampforum.blast.hk/showthread.php?tid=290640

Vбrios tut pelo fуrum!
Reply
#3

Ok vo tentar fazer aki obg...
Reply
#4

olha aki eu tenho o FS maos nao sei colocar o local q ta ali na imagem alguem pode me ajuda...

pawn Код:
#include <a_samp>

new updatetimer[MAX_PLAYERS];


//Player Textdraws:
new PlayerText:Textdraw0[MAX_PLAYERS] = {PlayerText:INVALID_TEXT_DRAW, ...};
new PlayerText:Textdraw1[MAX_PLAYERS] = {PlayerText:INVALID_TEXT_DRAW, ...};


forward update(playerid);
public OnPlayerConnect(playerid)
{
    Textdraw0[playerid] = CreatePlayerTextDraw(playerid, 498.398, 100.799, "Score - -=-");
    PlayerTextDrawAlignment(playerid, Textdraw0[playerid], 1);
    PlayerTextDrawColor(playerid, Textdraw0[playerid], -1);
    PlayerTextDrawSetOutline(playerid, Textdraw0[playerid], 1);
    PlayerTextDrawBackgroundColor(playerid, Textdraw0[playerid], 51);
    PlayerTextDrawFont(playerid, Textdraw0[playerid], 2);
    PlayerTextDrawSetProportional(playerid, Textdraw0[playerid], 1);
    PlayerTextDrawShow(playerid, Textdraw0[playerid]);
   
    Textdraw1[playerid] = CreatePlayerTextDraw(playerid, 497.600, 120.212, "Ping - -=- ms");
    PlayerTextDrawAlignment(playerid, Textdraw1[playerid], 1);
    PlayerTextDrawColor(playerid, Textdraw1[playerid], -1);
    PlayerTextDrawSetOutline(playerid, Textdraw1[playerid], 1);
    PlayerTextDrawBackgroundColor(playerid, Textdraw1[playerid], 51);
    PlayerTextDrawFont(playerid, Textdraw1[playerid], 2);
    PlayerTextDrawSetProportional(playerid, Textdraw1[playerid], 1);
    PlayerTextDrawShow(playerid, Textdraw1[playerid]);
   
    updatetimer[playerid] = SetTimerEx("update", 1000, true, "d", playerid);
    return 1;
}


public update(playerid)
{
    new score[16], ping[16];
    format(score, sizeof(score), "Score - %d", GetPlayerScore(playerid));
    format(ping, sizeof(ping), "Ping - %d ms", GetPlayerPing(playerid));
    PlayerTextDrawSetString(playerid, Textdraw0[playerid], score);
    PlayerTextDrawSetString(playerid, Textdraw1[playerid], ping);
    return 1;
}


public OnPlayerDisconnect(playerid, reason)
{
    PlayerTextDrawDestroy(playerid, Textdraw0[playerid]);
    Textdraw0[playerid] = PlayerText:INVALID_TEXT_DRAW;

    PlayerTextDrawDestroy(playerid, Textdraw1[playerid]);
    Textdraw1[playerid] = PlayerText:INVALID_TEXT_DRAW;
   
    KillTimer(updatetimer[playerid]);

    return 1;
}
Reply
#5

Para conseguir pegar o local do textdraw use o sistema que o @Stroon lhe passou e conseguirб -.-
Reply
#6

mais ja tentei e nao deu certo...
Reply
#7

Claro que dб , й sу iniciar um novo projeto e ir editando ->

Nгo queria dar pronto mas pelo visto й impossнvel -.-

pawn Код:
// TextDraw developed using Zamaroht's Textdraw Editor 1.0

// On top of script:
new Text:Textdraw0;
new Text:Textdraw1;

// In OnGameModeInit prefferably, we procced to create our textdraws:
Textdraw0 = TextDrawCreate(54.000000, 295.000000, "~g~~h~Ping: ~r~~h~190");
TextDrawBackgroundColor(Textdraw0, 799);
TextDrawFont(Textdraw0, 1);
TextDrawLetterSize(Textdraw0, 0.460000, 1.200000);
TextDrawColor(Textdraw0, -1);
TextDrawSetOutline(Textdraw0, 1);
TextDrawSetProportional(Textdraw0, 1);
TextDrawSetSelectable(Textdraw0, 0);

Textdraw1 = TextDrawCreate(52.000000, 311.000000, "~g~~h~Score: ~r~~h~51");
TextDrawBackgroundColor(Textdraw1, 799);
TextDrawFont(Textdraw1, 1);
TextDrawLetterSize(Textdraw1, 0.460000, 1.200000);
TextDrawColor(Textdraw1, -1);
TextDrawSetOutline(Textdraw1, 1);
TextDrawSetProportional(Textdraw1, 1);
TextDrawSetSelectable(Textdraw1, 0);

// You can now use TextDrawShowForPlayer(-ForAll), TextDrawHideForPlayer(-ForAll) and
// TextDrawDestroy functions to show, hide, and destroy the textdraw.
Adapte ao teu FS ou Gm agora ...

#EDIT

Preview do textdraw :v

Reply
#8

Dica

TextDrawCreate
TextDrawShowForPlayer
TextDrawSetString
Reply
#9

Cara esse Fs eu tenho e consegui coloca-lo no mesmo lugar onde vc qer usando um editor de textdraw
Reply
#10

olha ai como fico

pawn Код:
#include <a_samp>

new updatetimer[MAX_PLAYERS];

//Player Textdraws:
new PlayerText:Textdraw0[MAX_PLAYERS] = {PlayerText:INVALID_TEXT_DRAW, ...};
new PlayerText:Textdraw1[MAX_PLAYERS] = {PlayerText:INVALID_TEXT_DRAW, ...};

forward update(playerid);
public OnPlayerConnect(playerid)
{

    Textdraw0 = TextDrawCreate(54.000000, 295.000000, "Ping - -=- ms");
    TextDrawBackgroundColor(Textdraw0, 799);
    TextDrawFont(Textdraw0, 1);
    TextDrawLetterSize(Textdraw0, 0.460000, 1.200000);
    TextDrawColor(Textdraw0, -1);
    TextDrawSetOutline(Textdraw0, 1);
    TextDrawSetProportional(Textdraw0, 1);
    TextDrawSetSelectable(Textdraw0, 0);

    Textdraw1 = TextDrawCreate(52.000000, 311.000000, "Score - -=-");
    TextDrawBackgroundColor(Textdraw1, 799);
    TextDrawFont(Textdraw1, 1);
    TextDrawLetterSize(Textdraw1, 0.460000, 1.200000);
    TextDrawColor(Textdraw1, -1);
    TextDrawSetOutline(Textdraw1, 1);
    TextDrawSetProportional(Textdraw1, 1);
    TextDrawSetSelectable(Textdraw1, 0);

    updatetimer[playerid] = SetTimerEx("update", 1000, true, "d", playerid);
    return 1;
}

public update(playerid)
{
    new score[16], ping[16];
    format(score, sizeof(score), "Score - %d", GetPlayerScore(playerid));
    format(ping, sizeof(ping), "Ping - %d ms", GetPlayerPing(playerid));
    PlayerTextDrawSetString(playerid, Textdraw0[playerid], score);
    PlayerTextDrawSetString(playerid, Textdraw1[playerid], ping);
    return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
    PlayerTextDrawDestroy(playerid, Textdraw0[playerid]);
    Textdraw0[playerid] = PlayerText:INVALID_TEXT_DRAW;

    PlayerTextDrawDestroy(playerid, Textdraw1[playerid]);
    Textdraw1[playerid] = PlayerText:INVALID_TEXT_DRAW;

    KillTimer(updatetimer[playerid]);

    return 1;
}

olha o ERRO...

pawn Код:
C:\Users\Pedro Henrque\Desktop\pingS.pwn(14) : error 033: array must be indexed (variable "Textdraw0")
C:\Users\Pedro Henrque\Desktop\pingS.pwn(15) : error 035: argument type mismatch (argument 1)
C:\Users\Pedro Henrque\Desktop\pingS.pwn(16) : error 035: argument type mismatch (argument 1)
C:\Users\Pedro Henrque\Desktop\pingS.pwn(17) : error 035: argument type mismatch (argument 1)
C:\Users\Pedro Henrque\Desktop\pingS.pwn(18) : error 035: argument type mismatch (argument 1)
C:\Users\Pedro Henrque\Desktop\pingS.pwn(19) : error 035: argument type mismatch (argument 1)
C:\Users\Pedro Henrque\Desktop\pingS.pwn(20) : error 035: argument type mismatch (argument 1)
C:\Users\Pedro Henrque\Desktop\pingS.pwn(21) : error 035: argument type mismatch (argument 1)
C:\Users\Pedro Henrque\Desktop\pingS.pwn(23) : error 033: array must be indexed (variable "Textdraw1")
C:\Users\Pedro Henrque\Desktop\pingS.pwn(24) : error 035: argument type mismatch (argument 1)
C:\Users\Pedro Henrque\Desktop\pingS.pwn(25) : error 035: argument type mismatch (argument 1)
C:\Users\Pedro Henrque\Desktop\pingS.pwn(26) : error 035: argument type mismatch (argument 1)
C:\Users\Pedro Henrque\Desktop\pingS.pwn(27) : error 035: argument type mismatch (argument 1)
C:\Users\Pedro Henrque\Desktop\pingS.pwn(28) : error 035: argument type mismatch (argument 1)
C:\Users\Pedro Henrque\Desktop\pingS.pwn(29) : error 035: argument type mismatch (argument 1)
C:\Users\Pedro Henrque\Desktop\pingS.pwn(30) : error 035: argument type mismatch (argument 1)
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase
me ajuda...
Reply
#11

PQP LEK, tu nгo leu a parte " adapte ao teu gm " AFF.

#EDIT, estude isto https://sampwiki.blast.hk/wiki/CreatePlayerTextDraw

Tudo onde estiver TextDraw alguma coisa, mude por playertextdraw, como no link a cima
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)