Clickedid << -
Eiffel - 03.03.2017
Galera eu gostaria de SABER como fazer pra quando clicarem nessa textdraw:
ABRIR ESSE DIALOG:
PHP код:
forward login_dialog(playerid);
public login_dialog(playerid)
{
if(!gPlayerLogged[playerid])
{
new string2[150],Str[500],gstring[400];
format(string2, sizeof(string2), Pasta_Contas, PlayerName(playerid));
if (gPlayerLogged[playerid] != 1)
{
if(fexist(string2))//se a conta existe
{
PlayerTextDrawSetString(playerid, NickReg[playerid], Str);
format(gstring, sizeof gstring,
"\n{0038E0}» {FFFFFF}Sua conta: {0038E0}%s {FFFFFF}estб REGISTRADA\n\n\
{0038E0}» {FFFFFF}Digite sua senha para efetuar o LOGIN\n\n\
{0038E0}» {0038E0}OBS: {FFFFFF} Nгo passe sua senha б ninguйm!\n\n", PlayerName(playerid));
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_PASSWORD, "{0038E0}Brasil {0038E0}Live Games", gstring, "Logar", "Sair");
}
AJUDA AI? TENTEI ANTES DO MEU JEITO DEU WARNINGS PORЙM NГO DEU CERTO AO CLICAR ABRIR(...)
Re: Clickedid << -
IlanZ - 03.03.2017
Esse codigo ta incompleto
Re: Clickedid << -
Eiffel - 03.03.2017
O que falta nele?
Re: Clickedid << -
SmokiieGamer - 03.03.2017
Quote:
Originally Posted by Eiffel
O que falta nele?
|
O resto do cуdigo.
Re: Clickedid << -
RodrigoMSR - 03.03.2017
Код:
public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
if(clickedid == TeladeLogin6)
{
login_dialog(playerid);
}
return 1;
}
Respuesta: Re: Clickedid << -
Eiffel - 03.03.2017
Quote:
Originally Posted by SmokiieGamer
O resto do cуdigo.
|
Ah sim, aqui esta o resto do cуdigo, porem gostaria da parte de registro para quando clicasse em outra texdraw:
PHP код:
forward login_dialog(playerid);
public login_dialog(playerid)
{
if(!gPlayerLogged[playerid])
{
new string2[150],Str[500],gstring[400];
format(string2, sizeof(string2), Pasta_Contas, PlayerName(playerid));
if (gPlayerLogged[playerid] != 1)
{
if(fexist(string2))//se a conta existe
{
PlayerTextDrawSetString(playerid, NickReg[playerid], Str);
format(gstring, sizeof gstring,
"\n{0038E0}» {FFFFFF}Sua conta: {0038E0}%s {FFFFFF}estб REGISTRADA\n\n\
{0038E0}» {FFFFFF}Digite sua senha para efetuar o LOGIN\n\n\
{0038E0}» {0038E0}OBS: {FFFFFF} Nгo passe sua senha б ninguйm!\n\n", PlayerName(playerid));
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_PASSWORD, "{0038E0}Brasil {0038E0}Live Games", gstring, "Logar", "Sair");
}
else
{
PlayerTextDrawSetString(playerid, NickReg[playerid], Str);
format(gstring, sizeof gstring,
"\n{{FFFFFF}}» {{FFFFFF}}Logando no Brasil Live Games\n\n\
{0038E0}» {FFFFFF}Sua conta: {0038E0}%s {FFFFFF}estб {FFFFFF}NГO REGISTRADA\n\
{0038E0}» {FFFFFF}Digite sua senha para efetuar o REGISTRO\n\n\
{0038E0}» {0038E0}OBS: {FFFFFF}Nгo passe sua senha б ninguйm!\n\n", PlayerName(playerid));
ShowPlayerDialog(playerid, 2, DIALOG_STYLE_PASSWORD, "{0038E0}Brasil {0038E0}Live Games", gstring, "Registrar", "Sair");
}
//CarregarMsgAtu(playerid);
ShowIntro(playerid);
SetPlayerCameraPos(playerid, 1417.6466, -1632.8502, 85.2344);
SetPlayerCameraLookAt(playerid, 1418.4292, -1633.4702, 84.7444);
SelectTextDraw(playerid, 0xAAAAAAFF);
ClearChatbox(playerid, 20);
GetPlayerName(playerid, plname, sizeof(plname));
format(gstring, 100, Pasta_Contas, plname);
}
SetPlayerCameraPos(playerid, 226.4327, 1822.6948, 9.3896);
SetPlayerCameraLookAt(playerid, 225.4290, 1822.6842, 9.1346);
InterpolateCameraPos(playerid, -69.0914, -578.5839, 1.1176, -64.0263, -574.6630, 1.9860, 50000);
InterpolateCameraLookAt(playerid, -70.4253, -576.4390, 1.5466, -64.4531, -572.2968, 2.4709, 60000);
TextDrawShowForPlayer(playerid, Textdraw0);
TextDrawShowForPlayer(playerid, MENSAGEMLOGO);
TextDrawShowForPlayer(playerid, Textdraw1);
TextDrawShowForPlayer(playerid, Textdrawbox);
TextDrawShowForPlayer(playerid, Textdraw3);
TextDrawShowForPlayer(playerid, Textdraw4);
TextDrawShowForPlayer(playerid, Textdraw5);
TextDrawShowForPlayer(playerid, Textdraw6);
TextDrawShowForPlayer(playerid, Textdraw7);
TextDrawShowForPlayer(playerid, Textdraw8);
TextDrawShowForPlayer(playerid, Textdraw9);
TextDrawShowForPlayer(playerid, Textdraw11);
TextDrawHideForPlayer(playerid, TextLogin0);
TextDrawHideForPlayer(playerid, TextLogin1);
TextDrawHideForPlayer(playerid, TextLogin8);
TextDrawHideForPlayer(playerid, TextLogin9);
TextDrawHideForPlayer(playerid, TextLogin10);
TextDrawHideForPlayer(playerid, textTelaLogin);
CarregarTextEntrada(playerid);
SetPlayerSkin(playerid, 23);
SetPlayerInterior(playerid, 0);
Controle(playerid, 0);
//SetPlayerPos(playerid, 227.0743,1822.6564,7.4141);
//SetPlayerPos(playerid, 1416.6915,-1478.7733,125.3672);
}
return 1;
}
Re: Clickedid << -
IlanZ - 03.03.2017
ver se dar ae
PHP код:
public OnPlayerConnect(playerid)
{
ShowIntro(playerid);
SetPlayerCameraPos(playerid, 1417.6466, -1632.8502, 85.2344);
SetPlayerCameraLookAt(playerid, 1418.4292, -1633.4702, 84.7444);
SelectTextDraw(playerid, 0xAAAAAAFF);
ClearChatbox(playerid, 20);
GetPlayerName(playerid, plname, sizeof(plname));
format(gstring, 100, Pasta_Contas, plname);
SetPlayerCameraPos(playerid, 226.4327, 1822.6948, 9.3896);
SetPlayerCameraLookAt(playerid, 225.4290, 1822.6842, 9.1346);
InterpolateCameraPos(playerid, -69.0914, -578.5839, 1.1176, -64.0263, -574.6630, 1.9860, 50000);
InterpolateCameraLookAt(playerid, -70.4253, -576.4390, 1.5466, -64.4531, -572.2968, 2.4709, 60000);
TextDrawShowForPlayer(playerid, Textdraw0);
TextDrawShowForPlayer(playerid, MENSAGEMLOGO);
TextDrawShowForPlayer(playerid, Textdraw1);
TextDrawShowForPlayer(playerid, Textdrawbox);
TextDrawShowForPlayer(playerid, Textdraw3);
TextDrawShowForPlayer(playerid, Textdraw4);
TextDrawShowForPlayer(playerid, Textdraw5);
TextDrawShowForPlayer(playerid, Textdraw6);
TextDrawShowForPlayer(playerid, Textdraw7);
TextDrawShowForPlayer(playerid, Textdraw8);
TextDrawShowForPlayer(playerid, Textdraw9);
TextDrawShowForPlayer(playerid, Textdraw11);
TextDrawHideForPlayer(playerid, TextLogin0);
TextDrawHideForPlayer(playerid, TextLogin1);
TextDrawHideForPlayer(playerid, TextLogin8);
TextDrawHideForPlayer(playerid, TextLogin9);
TextDrawHideForPlayer(playerid, TextLogin10);
TextDrawHideForPlayer(playerid, textTelaLogin);
CarregarTextEntrada(playerid);
SetPlayerSkin(playerid, 23);
SetPlayerInterior(playerid, 0);
Controle(playerid, 0);
return 1;
}
public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
if(clickedid == TEXTLOGAR)
{
if(!gPlayerLogged[playerid])
{
new string2[150],Str[500],gstring[400];
format(string2, sizeof(string2), Pasta_Contas, PlayerName(playerid));
if (gPlayerLogged[playerid] != 1)
{
if(fexist(string2))//se a conta existe
{
PlayerTextDrawSetString(playerid, NickReg[playerid], Str);
format(gstring, sizeof gstring,
"\n{0038E0}» {FFFFFF}Sua conta: {0038E0}%s {FFFFFF}estб REGISTRADA\n\n\
{0038E0}» {FFFFFF}Digite sua senha para efetuar o LOGIN\n\n\
{0038E0}» {0038E0}OBS: {FFFFFF} Nгo passe sua senha б ninguйm!\n\n", PlayerName(playerid));
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_PASSWORD, "{0038E0}Brasil {0038E0}Live Games", gstring, "Logar", "Sair");
CancelSelectTextDraw(playerid);
}
else
{
SendClientMessage(playerid, -1, "Ja estб registrado")
}
}
}
}
if(clickedid == TEXTREGISTRAR)
{
if(!gPlayerLogged[playerid])
{
new string2[150],Str[500],gstring[400];
format(string2, sizeof(string2), Pasta_Contas, PlayerName(playerid));
if (gPlayerLogged[playerid] != 1)
{
if(fexist(string2))//se a conta existe
{
SendClientMessage(playerid, -1, "Voce nгo contem conta");
}
else
{
PlayerTextDrawSetString(playerid, NickReg[playerid], Str);
format(gstring, sizeof gstring,
"\n{{FFFFFF}}» {{FFFFFF}}Logando no Brasil Live Games\n\n\
{0038E0}» {FFFFFF}Sua conta: {0038E0}%s {FFFFFF}estб {FFFFFF}NГO REGISTRADA\n\
{0038E0}» {FFFFFF}Digite sua senha para efetuar o REGISTRO\n\n\
{0038E0}» {0038E0}OBS: {FFFFFF}Nгo passe sua senha б ninguйm!\n\n", PlayerName(playerid));
ShowPlayerDialog(playerid, 2, DIALOG_STYLE_PASSWORD, "{0038E0}Brasil {0038E0}Live Games", gstring, "Registrar", "Sair");
CancelSelectTextDraw(playerid);
}
}
}
}
return 1;
}
Re: Clickedid << -
IlanZ - 04.03.2017
Eai, deu certo ou nгo?