06/11/2021 23:04
Estou tentado fazer meu sistema de registro por textdraw , na parte das selecionaveis , quando eu clico não acontece nada
(obs: está para retornar a mensagem ao player apenas para teste) .
na função PlayerTextDrawSetSelectable , já tentei true e o valor de 1
(obs: está para retornar a mensagem ao player apenas para teste) .
na função PlayerTextDrawSetSelectable , já tentei true e o valor de 1
Código:
public OnPlayerConnect(playerid)
{
TDEditor_PTD[playerid][0] = CreatePlayerTextDraw(playerid, 34.069152, 252.583267, "REGISTRAR-ME");
PlayerTextDrawLetterSize(playerid, TDEditor_PTD[playerid][0], 0.400000, 1.600000);
PlayerTextDrawAlignment(playerid, TDEditor_PTD[playerid][0], 1);
PlayerTextDrawColor(playerid, TDEditor_PTD[playerid][0], -1061109505);
PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][0], 1);
PlayerTextDrawBackgroundColor(playerid, TDEditor_PTD[playerid][0], 255);
PlayerTextDrawFont(playerid, TDEditor_PTD[playerid][0], 2);
PlayerTextDrawSetProportional(playerid, TDEditor_PTD[playerid][0], 1);
PlayerTextDrawSetSelectable(playerid, TDEditor_PTD[playerid][0], 1);
TDEditor_PTD[playerid][1] = CreatePlayerTextDraw(playerid, 30.095062, 284.299987, "REGRAS_GERAIS");
PlayerTextDrawLetterSize(playerid, TDEditor_PTD[playerid][1], 0.400000, 1.600000);
PlayerTextDrawAlignment(playerid, TDEditor_PTD[playerid][1], 1);
PlayerTextDrawColor(playerid, TDEditor_PTD[playerid][1], -1061109505);
PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][1], 1);
PlayerTextDrawBackgroundColor(playerid, TDEditor_PTD[playerid][1], 255);
PlayerTextDrawFont(playerid, TDEditor_PTD[playerid][1], 2);
PlayerTextDrawSetProportional(playerid, TDEditor_PTD[playerid][1], 1);
PlayerTextDrawSetSelectable(playerid, TDEditor_PTD[playerid][1], 1);
TDEditor_PTD[playerid][2] = CreatePlayerTextDraw(playerid, 50.441467, 316.650146, "CREDITOS");
PlayerTextDrawLetterSize(playerid, TDEditor_PTD[playerid][2], 0.400000, 1.600000);
PlayerTextDrawAlignment(playerid, TDEditor_PTD[playerid][2], 1);
PlayerTextDrawColor(playerid, TDEditor_PTD[playerid][2], -1061109505);
PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][2], 1);
PlayerTextDrawBackgroundColor(playerid, TDEditor_PTD[playerid][2], 255);
PlayerTextDrawFont(playerid, TDEditor_PTD[playerid][2], 2);
PlayerTextDrawSetProportional(playerid, TDEditor_PTD[playerid][2], 1);
PlayerTextDrawSetSelectable(playerid, TDEditor_PTD[playerid][2], 1);
TDEditor_PTD[playerid][3] = CreatePlayerTextDraw(playerid, 71.950798, 348.566772, "SAIR");
PlayerTextDrawLetterSize(playerid, TDEditor_PTD[playerid][3], 0.400000, 1.600000);
PlayerTextDrawAlignment(playerid, TDEditor_PTD[playerid][3], 1);
PlayerTextDrawColor(playerid, TDEditor_PTD[playerid][3], -1061109505);
PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][3], 1);
PlayerTextDrawBackgroundColor(playerid, TDEditor_PTD[playerid][3], 255);
PlayerTextDrawFont(playerid, TDEditor_PTD[playerid][3], 2);
PlayerTextDrawSetProportional(playerid, TDEditor_PTD[playerid][3], 1);
PlayerTextDrawSetSelectable(playerid, TDEditor_PTD[playerid][3], 1);
return 1;
}
Código:
stock MostrarLogin(playerid)
{
PlayerTextDrawShow(playerid, TDEditor_PTD[playerid][0]);
PlayerTextDrawShow(playerid, TDEditor_PTD[playerid][1]);
PlayerTextDrawShow(playerid, TDEditor_PTD[playerid][2]);
PlayerTextDrawShow(playerid, TDEditor_PTD[playerid][3]);
return 1;
}
public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid)
{
if (playertextid == TDEditor_PTD[playerid][0])
{
SendClientMessage(playerid, 0xFFFFFFAA, "You clicked on a textdraw.");
CancelSelectTextDraw(playerid);
return 1;
}
if (playertextid == TDEditor_PTD[playerid][1])
{
SendClientMessage(playerid, 0xFFFFFFAA, "You clicked on a textdraw.");
CancelSelectTextDraw(playerid);
return 1;
}
if (playertextid == TDEditor_PTD[playerid][2])
{
SendClientMessage(playerid, 0xFFFFFFAA, "You clicked on a textdraw.");
CancelSelectTextDraw(playerid);
return 1;
}
if (playertextid == TDEditor_PTD[playerid][3])
{
SendClientMessage(playerid, 0xFFFFFFAA, "You clicked on a textdraw.");
CancelSelectTextDraw(playerid);
return 1;
}
return 0;
}