TextDrawTextSize(seuText, 10.0, 10.0);
Isso significa que o eixo Y da TextDrawTextSize da sua text estб com um valor muito alto, fazendo assim ele ter uma бrea de seleзгo maior.
Code:
TextDrawTextSize(seuText, 10.0, 10.0); |
hook OnPlayerConnect(playerid) // POR EM QUANTO RESOLVIDO
{
Box0[playerid] = CreatePlayerTextDraw(playerid, 362.941192, 166.000000, "usebox");
PlayerTextDrawLetterSize(playerid, Box0[playerid], 0.000000, -3.038888);
PlayerTextDrawTextSize(playerid, Box0[playerid], 254.000015, 0.000000);
PlayerTextDrawAlignment(playerid, Box0[playerid], 1);
PlayerTextDrawColor(playerid, Box0[playerid], 0);
PlayerTextDrawUseBox(playerid, Box0[playerid], true);
PlayerTextDrawBoxColor(playerid, Box0[playerid], 102);
PlayerTextDrawSetShadow(playerid, Box0[playerid], 0);
PlayerTextDrawSetOutline(playerid, Box0[playerid], 0);
PlayerTextDrawFont(playerid, Box0[playerid], 0);
Logar[playerid] = CreatePlayerTextDraw(playerid, 287.058807, 144.666702, "Logar");
PlayerTextDrawLetterSize(playerid, Logar[playerid], 0.449999, 1.600000);
PlayerTextDrawTextSize(playerid, Box0[playerid], 287.058807, 144.666702);
PlayerTextDrawAlignment(playerid, Logar[playerid], 1);
PlayerTextDrawColor(playerid, Logar[playerid], -1);
PlayerTextDrawSetShadow(playerid, Logar[playerid], 0);
PlayerTextDrawSetOutline(playerid, Logar[playerid], 1);
PlayerTextDrawBackgroundColor(playerid, Logar[playerid], 51);
PlayerTextDrawFont(playerid, Logar[playerid], 1);
PlayerTextDrawSetProportional(playerid, Logar[playerid], 1);
TextDrawTextSize(Registro[playerid], 10, 10);
PlayerTextDrawSetSelectable(playerid, Logar[playerid], 1);
Box1[playerid] = CreatePlayerTextDraw(playerid, 364.823486, 176.500030, "usebox");
PlayerTextDrawLetterSize(playerid, Box1[playerid], 0.000000, 2.146295);
PlayerTextDrawTextSize(playerid, Box1[playerid], 253.529418, 0.000000);
PlayerTextDrawAlignment(playerid, Box1[playerid], 1);
PlayerTextDrawColor(playerid, Box1[playerid], 0);
PlayerTextDrawUseBox(playerid, Box1[playerid], true);
PlayerTextDrawBoxColor(playerid, Box1[playerid], 102);
PlayerTextDrawSetShadow(playerid, Box1[playerid], 0);
PlayerTextDrawSetOutline(playerid, Box1[playerid], 0);
PlayerTextDrawFont(playerid, Box1[playerid], 0);
Registro[playerid] = CreatePlayerTextDraw(playerid, 278.117645, 179.083328, "Registro");
PlayerTextDrawLetterSize(playerid, Registro[playerid], 0.449999, 1.600000);
PlayerTextDrawAlignment(playerid, Registro[playerid], 1);
PlayerTextDrawColor(playerid, Registro[playerid], -1);
PlayerTextDrawSetShadow(playerid, Registro[playerid], 0);
PlayerTextDrawSetOutline(playerid, Registro[playerid], 1);
PlayerTextDrawBackgroundColor(playerid, Registro[playerid], 51);
PlayerTextDrawFont(playerid, Registro[playerid], 1);
PlayerTextDrawSetProportional(playerid, Registro[playerid], 1);
TextDrawTextSize(Logar[playerid], 10, 10);
PlayerTextDrawSetSelectable(playerid, Registro[playerid], 1);
PlayerTextDrawShow(playerid, Box0[playerid]);
PlayerTextDrawShow(playerid, Box1[playerid]);
PlayerTextDrawShow(playerid, Logar[playerid]);
PlayerTextDrawShow(playerid, Registro[playerid]);
TogglePlayerSpectating(playerid, 1);
SelectTextDraw(playerid, 0x49FF35AA);
Box0[playerid] = CreatePlayerTextDraw(playerid, 362.941192, 166.000000, "usebox"); PlayerTextDrawLetterSize(playerid, Box0[playerid], 0.000000, -3.038888); PlayerTextDrawTextSize(playerid, Box0[playerid], 254.000015, 0.000000); PlayerTextDrawAlignment(playerid, Box0[playerid], 1); PlayerTextDrawColor(playerid, Box0[playerid], 0); PlayerTextDrawUseBox(playerid, Box0[playerid], true); PlayerTextDrawBoxColor(playerid, Box0[playerid], 102); PlayerTextDrawSetShadow(playerid, Box0[playerid], 0); PlayerTextDrawSetOutline(playerid, Box0[playerid], 0); PlayerTextDrawFont(playerid, Box0[playerid], 0); Logar[playerid] = CreatePlayerTextDraw(playerid, 287.058807, 144.666702, "Logar"); PlayerTextDrawLetterSize(playerid, Logar[playerid], 0.449999, 1.600000); PlayerTextDrawTextSize(playerid, Logar[playerid], 287.058807, 10.666702); PlayerTextDrawAlignment(playerid, Logar[playerid], 1); PlayerTextDrawColor(playerid, Logar[playerid], -1); PlayerTextDrawSetShadow(playerid, Logar[playerid], 0); PlayerTextDrawSetOutline(playerid, Logar[playerid], 1); PlayerTextDrawBackgroundColor(playerid, Logar[playerid], 51); PlayerTextDrawFont(playerid, Logar[playerid], 1); PlayerTextDrawSetProportional(playerid, Logar[playerid], 1); PlayerTextDrawSetSelectable(playerid, Logar[playerid], 1); Box1[playerid] = CreatePlayerTextDraw(playerid, 364.823486, 176.500030, "usebox"); PlayerTextDrawLetterSize(playerid, Box1[playerid], 0.000000, 2.146295); PlayerTextDrawTextSize(playerid, Box1[playerid], 253.529418, 0.000000); PlayerTextDrawAlignment(playerid, Box1[playerid], 1); PlayerTextDrawColor(playerid, Box1[playerid], 0); PlayerTextDrawUseBox(playerid, Box1[playerid], true); PlayerTextDrawBoxColor(playerid, Box1[playerid], 102); PlayerTextDrawSetShadow(playerid, Box1[playerid], 0); PlayerTextDrawSetOutline(playerid, Box1[playerid], 0); PlayerTextDrawFont(playerid, Box1[playerid], 0); Registro[playerid] = CreatePlayerTextDraw(playerid, 278.117645, 179.083328, "Registro"); PlayerTextDrawLetterSize(playerid, Registro[playerid], 0.449999, 1.600000); PlayerTextDrawTextSize(playerid, Registro[playerid], 253.058807, 10.666702); PlayerTextDrawAlignment(playerid, Registro[playerid], 1); PlayerTextDrawColor(playerid, Registro[playerid], -1); PlayerTextDrawSetShadow(playerid, Registro[playerid], 0); PlayerTextDrawSetOutline(playerid, Registro[playerid], 1); PlayerTextDrawBackgroundColor(playerid, Registro[playerid], 51); PlayerTextDrawFont(playerid, Registro[playerid], 1); PlayerTextDrawSetProportional(playerid, Registro[playerid], 1); PlayerTextDrawSetSelectable(playerid, Registro[playerid], 1);
Code:
Box0[playerid] = CreatePlayerTextDraw(playerid, 362.941192, 166.000000, "usebox"); PlayerTextDrawLetterSize(playerid, Box0[playerid], 0.000000, -3.038888); PlayerTextDrawTextSize(playerid, Box0[playerid], 254.000015, 0.000000); PlayerTextDrawAlignment(playerid, Box0[playerid], 1); PlayerTextDrawColor(playerid, Box0[playerid], 0); PlayerTextDrawUseBox(playerid, Box0[playerid], true); PlayerTextDrawBoxColor(playerid, Box0[playerid], 102); PlayerTextDrawSetShadow(playerid, Box0[playerid], 0); PlayerTextDrawSetOutline(playerid, Box0[playerid], 0); PlayerTextDrawFont(playerid, Box0[playerid], 0); Logar[playerid] = CreatePlayerTextDraw(playerid, 287.058807, 144.666702, "Logar"); PlayerTextDrawLetterSize(playerid, Logar[playerid], 0.449999, 1.600000); PlayerTextDrawTextSize(playerid, Logar[playerid], 287.058807, 10.666702); PlayerTextDrawAlignment(playerid, Logar[playerid], 1); PlayerTextDrawColor(playerid, Logar[playerid], -1); PlayerTextDrawSetShadow(playerid, Logar[playerid], 0); PlayerTextDrawSetOutline(playerid, Logar[playerid], 1); PlayerTextDrawBackgroundColor(playerid, Logar[playerid], 51); PlayerTextDrawFont(playerid, Logar[playerid], 1); PlayerTextDrawSetProportional(playerid, Logar[playerid], 1); PlayerTextDrawSetSelectable(playerid, Logar[playerid], 1); Box1[playerid] = CreatePlayerTextDraw(playerid, 364.823486, 176.500030, "usebox"); PlayerTextDrawLetterSize(playerid, Box1[playerid], 0.000000, 2.146295); PlayerTextDrawTextSize(playerid, Box1[playerid], 253.529418, 0.000000); PlayerTextDrawAlignment(playerid, Box1[playerid], 1); PlayerTextDrawColor(playerid, Box1[playerid], 0); PlayerTextDrawUseBox(playerid, Box1[playerid], true); PlayerTextDrawBoxColor(playerid, Box1[playerid], 102); PlayerTextDrawSetShadow(playerid, Box1[playerid], 0); PlayerTextDrawSetOutline(playerid, Box1[playerid], 0); PlayerTextDrawFont(playerid, Box1[playerid], 0); Registro[playerid] = CreatePlayerTextDraw(playerid, 278.117645, 179.083328, "Registro"); PlayerTextDrawLetterSize(playerid, Registro[playerid], 0.449999, 1.600000); PlayerTextDrawTextSize(playerid, Registro[playerid], 253.058807, 10.666702); PlayerTextDrawAlignment(playerid, Registro[playerid], 1); PlayerTextDrawColor(playerid, Registro[playerid], -1); PlayerTextDrawSetShadow(playerid, Registro[playerid], 0); PlayerTextDrawSetOutline(playerid, Registro[playerid], 1); PlayerTextDrawBackgroundColor(playerid, Registro[playerid], 51); PlayerTextDrawFont(playerid, Registro[playerid], 1); PlayerTextDrawSetProportional(playerid, Registro[playerid], 1); PlayerTextDrawSetSelectable(playerid, Registro[playerid], 1); |
Aproveitando pra testar esse recurso de video do fуrum eu fiz um vнdeo rбpido explicando o mйtodo simples que eu uso. Note que apуs eu ajustar o tamanho x do box atй cobrir toda textdraw, eu ajusto o tamanho y pra um valor que eu acho que й o suficiente pra бrea clicбvel funcionar, esse valor varia conforme a 'altura' da textdraw, no seu caso, 10.0 seria o suficiкnte.
|
new PlayerText:Textdraw0; new PlayerText:Textdraw1; new PlayerText:Textdraw2; |
Muito obrigado a vocкs dois que responderam, realmente o Zamaroht para fazer Textdraw clicavel й incrivel, ele facilita muito o trabalho e poupa muito tempo, mais sу tirando uma duvida. quando exportei selecionei a opзгo "PlayerTextDraw" para ser exportado. e ele veio com as seguintes news ...
Por ser uma textdraw que apareзa sу para um player nгo era necessario ter o MAX_PLAYERS Exemplo: new PlayerText:Textdraw1[MAX_PLAYERS]; Pois o outro que eu importava do Iplomax vinha com o MAX_PLAYERS mais em fim, muito obrigado. irei voltar a programar aqui ... |
Muito obrigado a vocкs dois que responderam, realmente o Zamaroht para fazer Textdraw clicavel й incrivel, ele facilita muito o trabalho e poupa muito tempo, mais sу tirando uma duvida. quando exportei selecionei a opзгo "PlayerTextDraw" para ser exportado. e ele veio com as seguintes news ...
Por ser uma textdraw que apareзa sу para um player nгo era necessario ter o MAX_PLAYERS Exemplo: new PlayerText:Textdraw1[MAX_PLAYERS]; Pois o outro que eu importava do Iplomax vinha com o MAX_PLAYERS mais em fim, muito obrigado. irei voltar a programar aqui ... |
public OnPlayerConnect(playerid) {
Textdraw0 = CreatePlayerTextDraw(...);
Textdraw1 = CreatePlayerTextDraw(...);
Textdraw2 = CreatePlayerTextDraw(...);
}
public OnPlayerConnect(playerid) {
if (GetAdminLevel(playerid)) {
TextDrawAdmin = CreatePlayerTextDraw(...);
}
Textdraw0[playerid] = CreatePlayerTextDraw(...);
Textdraw1[playerid] = CreatePlayerTextDraw(...);
Textdraw2[playerid] = CreatePlayerTextDraw(...);
}