SA-MP Forums Archive
[Ajuda] Porra de Text Clicбvel - 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] Porra de Text Clicбvel (/showthread.php?tid=596384)



Porra de Text Clicбvel - s4kuL - 16.12.2015

Eu estava usando TextDraw normal , mais ai troquei por PlayerTextDraw porque ali onde fica escrito se a conta й registrada ou nгo, e o botгo Log in... sempre mudava quando algum outro player logava, exemplo:

Se eu sou registrado aparece isso:

http://i.imgur.com/eCKSnDw.png

Mais se algum player logar e nгo for registrado, e eu ainda estiver na tela de login, a textdraw vai mudar a string pra ele e pra mim.. Vai ficar assim para ambos:

http://i.imgur.com/w1M2eH6.png

Entгo.. eu gostaria de saber se tem alguma funзгo para Setar a string da textdraw para determinado playerid? ou como arrumar esse bug de nгo estб sendo clicбvel com o PlayerTextDraw.


Re: Porra de Text Clicбvel - EditPawn - 17.12.2015

Nгo tem erro, se for mostrar informaзхes diferentes em texdraw para cada player, utiliza-se PlayerText, se for textdraw iguais, utilize TextDraw Global, a mesma sera mostrada para todos.


Re: Porra de Text Clicбvel - arakuta - 17.12.2015

PlayerTextDrawSetString


Re: Porra de Text Clicбvel - s4kuL - 17.12.2015

Quote:
Originally Posted by EditPawn
Посмотреть сообщение
Nгo tem erro, se for mostrar informaзхes diferentes em texdraw para cada player, utiliza-se PlayerText, se for textdraw iguais, utilize TextDraw Global, a mesma sera mostrada para todos.
O problema й que nгo da mais pra clicar e.e

Quote:
Originally Posted by arakuta
Посмотреть сообщение
PlayerTextDrawSetString
Ja estou usando isso


Re: Porra de Text Clicбvel - s4kuL - 17.12.2015

pawn Код:
new PlayerText:PlayerMainText1[MAX_PLAYERS];
new PlayerText:PlayerMainText2[MAX_PLAYERS];

public OnPlayerConnect(playerid) {
    CreatePlayerMainTexts(playerid);
    PlayerTextDrawShow(playerid, PlayerMainText1[playerid]);
    PlayerTextDrawShow(playerid, PlayerMainText2[playerid]);
    SelectTextDraw(playerid, 0xFF0000FF);
    return 1;
}

public OnPlayerClickTextDraw(playerid, Text:clickedid) {
    if(clickedid == Text:PlayerMainText2[playerid]) { //Register/Login
         SendClientMessage(playerid, -1, "funcionou");
    }
    return 1;
}

CreatePlayerMainTexts(playerid) {
    PlayerMainText1[playerid] = CreatePlayerTextDraw(playerid, 329.000000, 154.000000, "_");
    PlayerTextDrawBackgroundColor(playerid, PlayerMainText1[playerid], 255);
    PlayerTextDrawFont(playerid, PlayerMainText1[playerid], 1);
    PlayerTextDrawLetterSize(playerid, PlayerMainText1[playerid], 0.200000, 0.899999);
    PlayerTextDrawColor(playerid, PlayerMainText1[playerid], -1);
    PlayerTextDrawSetOutline(playerid, PlayerMainText1[playerid], 0);
    PlayerTextDrawSetProportional(playerid, PlayerMainText1[playerid], 1);
    PlayerTextDrawSetShadow(playerid, PlayerMainText1[playerid], 1);
    PlayerTextDrawSetSelectable(playerid, PlayerMainText1[playerid], 0);

    PlayerMainText2[playerid] = CreatePlayerTextDraw(playerid, 189.000000, 158.000000, "_");
    PlayerTextDrawBackgroundColor(playerid, PlayerMainText2[playerid], 255);
    PlayerTextDrawFont(playerid, PlayerMainText2[playerid], 2);
    PlayerTextDrawLetterSize(playerid, PlayerMainText2[playerid], 0.200000, 1.200000);
    PlayerTextDrawColor(playerid, PlayerMainText2[playerid], -1);
    PlayerTextDrawSetOutline(playerid, PlayerMainText2[playerid], 1);
    PlayerTextDrawSetProportional(playerid, PlayerMainText2[playerid], 1);
    PlayerTextDrawSetSelectable(playerid, PlayerMainText2[playerid], true);
}
Se quiserem dar uma olhada no code, ta ai..


Re: Porra de Text Clicбvel - arakuta - 17.12.2015

A callback para textos per-player clicбveis й outra.

https://sampwiki.blast.hk/wiki/OnPlayerClickPlayerTextDraw


Re: Porra de Text Clicбvel - s4kuL - 17.12.2015

@Edit:

Pode deixar, jб consegui burrice minha novamente!

+rep pra vocкs ai galera !