SA-MP Forums Archive
[AJUDA] PlayerTextDraw - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [AJUDA] PlayerTextDraw (/showthread.php?tid=233321)



[AJUDA] PlayerTextDraw - Dr_Pawno - 01.03.2011

Gente eu fiz um Include para criar TextDraws para os jogadores. Quando fui testar, tudo o que estava abaixo do "CreatePlayerTextDraw" parou de responder. Olhe como esta a Include: http://pastebin.com/HwAPXZmH.
Eu experimentei tirar o "CreatePlayerTextDraw" e voltou ao normal. Por favor AJUDEM!!

OBS: Esta sem os "return 1;" porque eu tirei para testar =X


Re: [AJUDA] PlayerTextDraw - Macintosh - 01.03.2011

Tem SS?
Tipo..
ele tб mostrando algo ainda?


Re: [AJUDA] PlayerTextDraw - Dr_Pawno - 02.03.2011

sim, esta. So que tudo oque esta abaixo do CreatePlayerTextDraw nao funciona.


Re: [AJUDA] PlayerTextDraw - steki. - 02.03.2011

ShowTextDrawForPlayer?


Re: [AJUDA] PlayerTextDraw - Dr_Pawno - 02.03.2011

Mano, isso й um include que estou TENTANDO FAZER =D, nao й "TextDrawCreate" nem "ShowTextDrawForPlayer" olha aqui: http://pastebin.com/HwAPXZmH.


Re: [AJUDA] PlayerTextDraw - rjjj - 02.03.2011

Bem, voce nгo explicou o "parou de responder"

De qualquer forma, eu analisei possнveis problemas que a funзгo CreatePlayerTextDraw podia estar dando, entгo arrumei pra voce

Lembre-se que TextDrawCreate sу pode ser usado no OnGameModeInit/OnFilterScriptInit.

Aqui estб, se nгo continuar causando problemas, espere outro membro do fуrum para ajudб-lo.

pawn Code:
#if defined _PlayerTextDraw_included
  #endinput
#endif

#define _PlayerTextDraw_included

#include <a_samp>

/*
    LeonardoLeal

    Autor: Dr_Pawno
    Versгo: 0.1
*/


/*
native CreatePlayerTextDraw(textdrawid, Float:x, Float:y, string[])
native SetPlayerTextDrawString(playerid, textdrawid, string[])
native ShowPlayerTextDraw(playerid, textdrawid, bool:Show)
native SetPlayerTextDrawColor(playerid, textdrawid, cor)
native SetPlayerTextDrawBGColor(playerid, textdrawid, cor)
native SetPlayerTextDrawFont(playerid, textdrawid, fonte)
native SetPlayerTextDrawLetterSize(playerid, textdrawid, Float:x, Float:y)
native SetPlayerTextDrawOutline(playerid, textdrawid, tamanho)
native SetPlayerTextDrawProportional(playerid, textdrawid, tipo)
*/


#define MAX_PLAYERS_IN_GAME 50
new Text:PTEXTDRAW[(MAX_PLAYERS_IN_GAME+1)][51];

stock CreatePlayerTextDraw(textdrawid, Float:x, Float:y, string[])
{
    for(new i = 0;i <= MAX_PLAYERS_IN_GAME;i++)
    {
        PTEXTDRAW[i][textdrawid] = TextDrawCreate(x, y, string);
    }
    return 1;
}

stock SetPlayerTextDrawString(playerid, textdrawid, string[])
{
    TextDrawSetString(PTEXTDRAW[playerid][textdrawid], string);
    return 1;
}

stock ShowPlayerTextDraw(playerid, textdrawid, bool:Show)
{
    if(Show)
    {
        TextDrawShowForPlayer(playerid, PTEXTDRAW[playerid][textdrawid]);
    }
    else
    {
        TextDrawHideForPlayer(playerid, PTEXTDRAW[playerid][textdrawid]);
    }
    return 1;
}

stock SetPlayerTextDrawColor(playerid, textdrawid, cor)
{
    TextDrawColor(PTEXTDRAW[playerid][textdrawid], cor);
    return 1;
}

stock SetPlayerTextDrawBGColor(playerid, textdrawid, cor)
{
    TextDrawBackgroundColor(PTEXTDRAW[playerid][textdrawid], cor);
    return 1;
}

stock SetPlayerTextDrawFont(playerid, textdrawid, fonte)
{
    TextDrawFont(PTEXTDRAW[playerid][textdrawid], fonte);
    return 1;
}

stock SetPlayerTextDrawLetterSize(playerid, textdrawid, Float:x, Float:y)
{
    TextDrawLetterSize(PTEXTDRAW[playerid][textdrawid], Float:x, Float:y);
    return 1;
}

stock SetPlayerTextDrawOutline(playerid, textdrawid, tamanho)
{
    TextDrawSetOutline(PTEXTDRAW[playerid][textdrawid], tamanho);
    return 1;
}

stock SetPlayerTextDrawProportional(playerid, textdrawid, tipo)
{
    TextDrawSetProportional(PTEXTDRAW[playerid][textdrawid], tipo);
    return 1;
}

stock StopPlayerTextDraw()
{
    for(new i = 0;i <= MAX_PLAYERS_IN_GAME;i++)
    {
        for(new td = 0;td <= MAX_PLAYERS_IN_GAME;td++)
        {
            TextDrawDestroy(PTEXTDRAW[i][td]);
        }
    }
    return 1;
}

Espero ter ajudado


Re: [AJUDA] PlayerTextDraw - Dr_Pawno - 02.03.2011

vc so coloco os return 1? se for n adianto nada


Re: [AJUDA] PlayerTextDraw - deregudegu - 02.03.2011

Tente 1є antes de falar algo!