[Ajuda] Porra de Text Clicбvel
#1

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.
Reply
#2

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.
Reply
#3

PlayerTextDrawSetString
Reply
#4

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
Reply
#5

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..
Reply
#6

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

https://sampwiki.blast.hk/wiki/OnPlayerClickPlayerTextDraw
Reply
#7

@Edit:

Pode deixar, jб consegui burrice minha novamente!

+rep pra vocкs ai galera !
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)