[Ajuda] TextDraw Clicaveis
#1

Bom, Estou tentando criar uma tela de login em TextDraw's Clicaveis, Mas nгo consigo fazer com que ela apareзa assim que o Player Logar alguйm poderia ajudar?

*OBS: Jб li todos os Tutoriais que ensinam а como fazer uma text clicaveis, Jб tentei seguir alguns FS mas nгo consigo.
Reply
#2

https://sampwiki.blast.hk/wiki/TextDrawSetSelectable
https://sampwiki.blast.hk/wiki/TextDrawShowForPlayer
https://sampwiki.blast.hk/wiki/SelectTextDraw
Reply
#3

Cara sou novo, Jб lн isso aн tudo...
Reply
#4

esses sгo bom https://sampforum.blast.hk/showthread.php?tid=340781

https://sampforum.blast.hk/showthread.php?tid=615824

https://sampforum.blast.hk/showthread.php?tid=531414

caso nгo conseguiu fale para eu ter explicar.
Reply
#5

Mostra o que vocк jб tentou fazer.
Reply
#6

na callback:

PHP код:
public OnPlayerConnect(playerid
{
     return 
1;

Utilize: TextdrawShowforPlayer
ou se utilizou "Playertext:.."

Utilize: PlayerTextDrawShow

E a tela de login irб aparecer quando o player logar.
Reply
#7

Variaveis:
Код:
new Text:Login0[6];
new PlayerText: Login1[MAX_PLAYERS][8];
OnGameModeInit:
Код:
/*---------------------------- TELA DE LOGIN ----------------------------------*/
	Login0[0] = TextDrawCreate(2.000000, 1.500000, "usebox");
	TextDrawLetterSize(Login0[0], 0.000000, 19.675102);
	TextDrawTextSize(Login0[0], 637.444458, 0.000000);
	TextDrawAlignment(Login0[0], 1);
	TextDrawColor(Login0[0], 0);
	TextDrawUseBox(Login0[0], true);
	TextDrawBoxColor(Login0[0], 102);
	TextDrawSetShadow(Login0[0], 0);
	TextDrawSetOutline(Login0[0], 0);
	TextDrawFont(Login0[0], 0);

	Login0[1] = TextDrawCreate(2.000000, 454.166656, "usebox");
	TextDrawLetterSize(Login0[1], 0.000000, -14.892797);
	TextDrawTextSize(Login0[1], 637.444458, 0.000000);
	TextDrawAlignment(Login0[1], 1);
	TextDrawColor(Login0[1], 0);
	TextDrawUseBox(Login0[1], true);
	TextDrawBoxColor(Login0[1], 102);
	TextDrawSetShadow(Login0[1], 0);
	TextDrawSetOutline(Login0[1], 0);
	TextDrawFont(Login0[1], 0);

	Login0[2] = TextDrawCreate(252.777984, 433.481597, "www.bsa.com.br");
	TextDrawLetterSize(Login0[2], 0.449999, 1.600000);
	TextDrawAlignment(Login0[2], 1);
	TextDrawColor(Login0[2], -1);
	TextDrawSetShadow(Login0[2], 0);
	TextDrawSetOutline(Login0[2], 1);
	TextDrawBackgroundColor(Login0[2], 51);
	TextDrawFont(Login0[2], 2);
	TextDrawSetProportional(Login0[2], 1);

	Login0[3] = TextDrawCreate(192.777801, 53.925945, "San Andreas Brasil");
	TextDrawLetterSize(Login0[3], 0.946666, 4.374067);
	TextDrawAlignment(Login0[3], 1);
	TextDrawColor(Login0[3], -1);
	TextDrawSetShadow(Login0[3], 0);
	TextDrawSetOutline(Login0[3], 1);
	TextDrawBackgroundColor(Login0[3], 51);
	TextDrawFont(Login0[3], 0);
	TextDrawSetProportional(Login0[3], 1);

	Login0[4] = TextDrawCreate(391.110961, 93.333312, "V1.0");
	TextDrawLetterSize(Login0[4], 0.449999, 1.600000);
	TextDrawAlignment(Login0[4], 1);
	TextDrawColor(Login0[4], -1);
	TextDrawSetShadow(Login0[4], 0);
	TextDrawSetOutline(Login0[4], 1);
	TextDrawBackgroundColor(Login0[4], 51);
	TextDrawFont(Login0[4], 2);
	TextDrawSetProportional(Login0[4], 1);

	Login0[5] = TextDrawCreate(142.222167, 106.814765, "O Mais novo Servidor Brasileiro RPG.");
	TextDrawLetterSize(Login0[5], 0.449999, 1.600000);
	TextDrawAlignment(Login0[5], 1);
	TextDrawColor(Login0[5], 255);
	TextDrawSetShadow(Login0[5], 0);
	TextDrawSetOutline(Login0[5], 0);
	TextDrawBackgroundColor(Login0[5], 51);
	TextDrawFont(Login0[5], 2);
	TextDrawSetProportional(Login0[5], 1);
	return 1;
}
CarregarTextPlayer(playerid)
{
    Login1[playerid][0] = CreatePlayerTextDraw(playerid, 98.888801, 167.481491, "REGISTRAR");
	PlayerTextDrawLetterSize(playerid, Login1[0][playerid], 0.449999, 1.600000);
	PlayerTextDrawAlignment(playerid, Login1[0][playerid], 1);
	PlayerTextDrawColor(playerid, Login1[0][playerid], -1);
	PlayerTextDrawSetShadow(playerid, Login1[0][playerid], 0);
	PlayerTextDrawSetOutline(playerid, Login1[0][playerid], 1);
	PlayerTextDrawBackgroundColor(playerid, Login1[0][playerid], 51);
	PlayerTextDrawFont(playerid, Login1[0][playerid], 2);
	PlayerTextDrawSetProportional(playerid, Login1[0][playerid], 1);

	Login1[1][playerid] = CreatePlayerTextDraw(playerid, 98.666671, 172.092590, "usebox");
	PlayerTextDrawLetterSize(playerid, Login1[1][playerid], 0.000000, 0.720369);
	PlayerTextDrawTextSize(playerid, Login1[1][playerid], 200.777786, 10.000000);
	PlayerTextDrawAlignment(playerid, Login1[1][playerid], 1);
	PlayerTextDrawColor(playerid, Login1[1][playerid], 0);
	PlayerTextDrawUseBox(playerid, Login1[1][playerid], true);
	PlayerTextDrawBoxColor(playerid, Login1[1][playerid], -256);
	PlayerTextDrawSetShadow(playerid, Login1[1][playerid], 0);
	PlayerTextDrawSetOutline(playerid, Login1[1][playerid], 0);
	PlayerTextDrawBackgroundColor(playerid, Login1[1][playerid], -256);
	PlayerTextDrawFont(playerid, Login1[1][playerid], 0);

	Login1[2][playerid] = CreatePlayerTextDraw(playerid, 249.444473, 166.962951, "LOGIN");
	PlayerTextDrawLetterSize(playerid, Login1[2][playerid], 0.449999, 1.600000);
	PlayerTextDrawAlignment(playerid, Login1[2][playerid], 1);
	PlayerTextDrawColor(playerid, Login1[2][playerid], -1);
	PlayerTextDrawSetShadow(playerid, Login1[2][playerid], 0);
	PlayerTextDrawSetOutline(playerid, Login1[2][playerid], 1);
	PlayerTextDrawBackgroundColor(playerid, Login1[2][playerid], 51);
	PlayerTextDrawFont(playerid, Login1[2][playerid], 2);
	PlayerTextDrawSetProportional(playerid, Login1[2][playerid], 1);

	Login1[3][playerid] = CreatePlayerTextDraw(playerid, 248.111190, 171.574066, "usebox");
	PlayerTextDrawLetterSize(playerid, Login1[3][playerid], 0.000000, 0.720369);
	PlayerTextDrawTextSize(playerid, Login1[3][playerid], 305.222015, 10.000000);
	PlayerTextDrawAlignment(playerid, Login1[3][playerid], 1);
	PlayerTextDrawColor(playerid, Login1[3][playerid], 0);
	PlayerTextDrawUseBox(playerid, Login1[3][playerid], true);
	PlayerTextDrawBoxColor(playerid, Login1[3][playerid], -256);
	PlayerTextDrawSetShadow(playerid, Login1[3][playerid], 0);
	PlayerTextDrawSetOutline(playerid, Login1[3][playerid], 0);
	PlayerTextDrawFont(playerid, Login1[3][playerid], 1);

	Login1[4][playerid] = CreatePlayerTextDraw(playerid, 339.999572, 166.962966, "CREDITOS");
	PlayerTextDrawLetterSize(playerid, Login1[4][playerid], 0.449999, 1.600000);
	PlayerTextDrawAlignment(playerid, Login1[4][playerid], 1);
	PlayerTextDrawColor(playerid, Login1[4][playerid], -1);
	PlayerTextDrawSetShadow(playerid, Login1[4][playerid], 0);
	PlayerTextDrawSetOutline(playerid, Login1[4][playerid], 1);
	PlayerTextDrawBackgroundColor(playerid, Login1[4][playerid], 51);
	PlayerTextDrawFont(playerid, Login1[4][playerid], 2);
	PlayerTextDrawSetProportional(playerid, Login1[4][playerid], 1);

	Login1[5][playerid] = CreatePlayerTextDraw(playerid, 340.333465, 171.574081, "usebox");
	PlayerTextDrawLetterSize(playerid, Login1[5][playerid], 0.000000, 0.720369);
	PlayerTextDrawTextSize(playerid, Login1[5][playerid], 429.666809, 10.000000);
	PlayerTextDrawAlignment(playerid, Login1[5][playerid], 1);
	PlayerTextDrawColor(playerid, Login1[5][playerid], 0);
	PlayerTextDrawUseBox(playerid, Login1[5][playerid], true);
	PlayerTextDrawBoxColor(playerid, Login1[5][playerid], -256);
	PlayerTextDrawSetShadow(playerid, Login1[5][playerid], 0);
	PlayerTextDrawSetOutline(playerid, Login1[5][playerid], 0);
	PlayerTextDrawFont(playerid, Login1[5][playerid], 0);

	Login1[6][playerid] = CreatePlayerTextDraw(playerid, 463.333129, 166.444381, "SAIR");
	PlayerTextDrawLetterSize(playerid, Login1[6][playerid], 0.449999, 1.600000);
	PlayerTextDrawAlignment(playerid, Login1[6][playerid], 1);
	PlayerTextDrawColor(playerid, Login1[6][playerid], -1);
	PlayerTextDrawSetShadow(playerid, Login1[6][playerid], 0);
	PlayerTextDrawSetOutline(playerid, Login1[6][playerid], 1);
	PlayerTextDrawBackgroundColor(playerid, Login1[6][playerid], 51);
	PlayerTextDrawFont(playerid, Login1[6][playerid], 2);
	PlayerTextDrawSetProportional(playerid, Login1[6][playerid], 1);

	Login1[7][playerid] = CreatePlayerTextDraw(playerid, 463.110839, 170.018508, "usebox");
	PlayerTextDrawLetterSize(playerid, Login1[7][playerid], 0.000000, 0.893209);
	PlayerTextDrawTextSize(playerid, Login1[7][playerid], 506.888610, 10.000000);
	PlayerTextDrawAlignment(playerid, Login1[7][playerid], 1);
	PlayerTextDrawColor(playerid, Login1[7][playerid], 0);
	PlayerTextDrawUseBox(playerid, Login1[7][playerid], true);
	PlayerTextDrawBoxColor(playerid, Login1[7][playerid], -256);
	PlayerTextDrawSetShadow(playerid, Login1[7][playerid], 0);
	PlayerTextDrawSetOutline(playerid, Login1[7][playerid], 0);
	PlayerTextDrawFont(playerid, Login1[7][playerid], 1);
OnPlayerConnect:
Код:
CarregarTextPlayer(playerid);
	SelectTextDraw(playerid, 0x35F344F);
Alguйm poderia ajudar?
Reply
#8

Analisando seu cуdigo lhe falta usar isto:

https://sampwiki.blast.hk/wiki/TextDrawSetSelectable
Reply
#9

PHP код:
new Text:Login0[6];
new 
PlayerTextLogin1[8][MAX_PLAYERS]; 
PHP код:
OpenLogin(playerid)
{
 for(new 
i8i++) PlayerTextDrawShow(playeridLogin1[i][playerid];
 for(new 
i6i++) TextDrawShowForPlayer(playeridLogin0[i]);
}

CloseLogin(playerid)
{
 for(new 
i8i++) PlayerTextDrawHide(playeridLogin1[i][playerid];
 for(new 
i6i++) TextDrawHideForPlayer(playeridLogin0[i]);

PHP код:
public OnPlayerConnect(playerid)
{
 
CarregarTextPlayer(playerid);
 
OpenLogin(playerid);
 
SelectTextDraw(playerid0x35F344F);

Veja se funciona
Reply
#10

Deu certo Amigo , Muito Obrigado. Mas para tornar ela clicavel estб dando erro...


error 035: argument type mismatch (argument 2)
Код:
PlayerTextDrawSetSelectable(playerid, PlayerText:Login1[0], 1);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)