29.06.2017, 13:13
nгo, tu tira o dialog que inicia o dialog responde, tipo onplayerrequestclass eu crio la pra verificar se o player e registrado ou nгo
ai tipo crio os 2 showplayerdilaog registo e login, no lugar deles 2 que tu troca pelas as textdraws
ai basicamente a chamada do dialogresponde tava sendo no playerrequesteclass, ai mudou pra quando ele clicar, quando ele clicar, que vai ser chamado o dialog do dialogresponse
slg no meu, pra voce entender
ai tipo crio os 2 showplayerdilaog registo e login, no lugar deles 2 que tu troca pelas as textdraws
ai basicamente a chamada do dialogresponde tava sendo no playerrequesteclass, ai mudou pra quando ele clicar, quando ele clicar, que vai ser chamado o dialog do dialogresponse
slg no meu, pra voce entender
PHP код:
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
InterpolateCameraPos(playerid, 1959.262207, 1344.088012, 15.374607, 2035.767089, 1343.863037, 13.413891, 4000);
InterpolateCameraLookAt(playerid, 2035.863403, 1343.389526, 13.957723, 1961.410034, 1344.228637, 15.985651, 3000);
new opening = random(3);
switch(opening)
{
case 0:
{
InterpolateCameraPos(playerid, 163.270141, 2000.135009, 45.123085, 1638.889648, 869.134704, 33.709228, 3000);
InterpolateCameraLookAt(playerid, 167.237121, 1997.091674, 45.091835, 1643.077880, 866.403625, 33.705322, 3000);
}
case 1:
{
InterpolateCameraPos(playerid, 1649.179443, 846.970031, 33.193771, 2040.842529, 1343.225708, 14.425601, 3000);
InterpolateCameraLookAt(playerid, 1654.173095, 847.004516, 32.943874, 2035.847167, 1343.315185, 14.230338, 3000);
}
case 2:
{
InterpolateCameraPos(playerid, 2040.838623, 1343.220825, 14.425786, 1956.434082, 1344.491821, 16.399242, 2000);
InterpolateCameraLookAt(playerid, 2035.863403, 1343.389526, 13.957723, 1961.410034, 1344.228637, 15.985651, 2000);
}
}
//REGISTRO
new String[128], Nome[MAX_PLAYER_NAME];
GetPlayerName(playerid, Nome, sizeof(Nome));
format(String, sizeof(String), CONTAS, Nome);
if(!fexist(String))
{
TextDrawShowForPlayer(playerid, formato);
TextDrawShowForPlayer(playerid, registro);
//TextDrawShowForPlayer(playerid, usebox1);
TextDrawShowForPlayer(playerid, warning1);
TextDrawShowForPlayer(playerid, warning2);
TextDrawShowForPlayer(playerid, warning3);
TextDrawShowForPlayer(playerid, warning4);
TextDrawShowForPlayer(playerid, entrada);
TextDrawShowForPlayer(playerid, warning5);
TextDrawShowForPlayer(playerid, warning6);
TextDrawShowForPlayer(playerid, warning7);
TextDrawShowForPlayer(playerid, nick);
PlayerTextDrawShow(playerid, SenhaRegistro[playerid]);
PlayerTextDrawShow(playerid, GuestLogRegistro[playerid]);
SelectTextDraw(playerid, LARANJA);
//TogglePlayerSpectating(playerid, 1);
//format(String, sizeof(String), "{FFFFFF}Olб {FFA000}%s{FFFFFF} vocк ainda nгo tem uma conta.\nRegistre-se e jogue em nosso servidor\n\nDigite uma senha para registrar:", Nome);
//ShowPlayerDialog(playerid, REGISTRO, DIALOG_STYLE_PASSWORD, "Registro", String, "{FFA000}Registrar", "Cancelar");
}
//LOG-IN
else
{
TextDrawShowForPlayer(playerid, formato);
TextDrawShowForPlayer(playerid, login);
TextDrawShowForPlayer(playerid, bemvindo);
//TextDrawShowForPlayer(playerid, warning1l);
//TextDrawShowForPlayer(playerid, warning2l);
TextDrawShowForPlayer(playerid, entrada);
TextDrawShowForPlayer(playerid, nick);
PlayerTextDrawShow(playerid, logar[playerid]);
SelectTextDraw(playerid, LARANJA);
//TogglePlayerSpectating(playerid, 1);
//format(String, sizeof(String), "{FFFFFF}Olб {FFA000}%s{FFFFFF}%s vocк jб tem uma conta, \nDigite sua senha para continuar:", Nome);
//ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_PASSWORD, "Login", String, "{FFA000}Logar", "Cancelar");
}
return 1;
}