OnDialogResponse(playerid,tmppass);//linha 1468
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
new string[256];
new accstring[128];
PlayerPlaySound(playerid, 1185, 0.0, 0.0, 0.0);
new sendername[MAX_PLAYER_NAME];
new first[MAX_PLAYER_NAME], last[MAX_PLAYER_NAME];
GetPlayerName(playerid, sendername, sizeof(sendername));
if(dialogid == 1)//...
C:\Users\proprietбrio\Desktop\BC_RP.pwn(1468) : error 035: argument type mismatch (argument 2) Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.
Originally Posted by tshadow
Eu tou a meter um diagol para que apareca no inicio do jogo mas nгo aparece, por isso meti assim:
pawn Код:
Код:
C:\Users\proprietбrio\Desktop\BC_RP.pwn(1468) : error 035: argument type mismatch (argument 2) Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error. |
OnDialogResponse(playerid,tmppass); //linha 1468
OnDialogResponse(playerid,tmppass);//linha 1468
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
new string[256];
new accstring[128];
PlayerPlaySound(playerid, 1185, 0.0, 0.0, 0.0);
new sendername[MAX_PLAYER_NAME];
new first[MAX_PLAYER_NAME], last[MAX_PLAYER_NAME];
GetPlayerName(playerid, sendername, sizeof(sendername));
if(dialogid == 1)//...
Originally Posted by tshadow
Nгo ajudou porque que quero й ligar onplayerconnect com o ondialogresponse
|
#define DIALOG_LOGIN 1
#define DIALOG_REGISTER 2
public OnPlayerConnect(playerid)
{
if(fexist(string))
{
gPlayerAccount[playerid] = 1;//Detecta que a conta jб existe
new loginstring[128];
new loginname[64];
GetPlayerName(playerid,loginname,sizeof(loginname));
format(loginstring,sizeof(loginstring),"Bem-Vindo. \n \nVoзк jб estб registrado.\nPor favor digite sua senha abaixo:");
ShowPlayerDialog(playerid,1,DIALOG_STYLE_INPUT,"Logar",loginstring,"Logar","Sair");
return 1;
}
else
{
gPlayerAccount[playerid] = 0;//Detecta que a conta nгo existe
new regstring[128];
new regname[64];
GetPlayerName(playerid,regname,sizeof(regname));
format(regstring,sizeof(regstring),"Bem-Vindo. \n \nPor favor, registre sua conta, digitando a senha abaixo:");
ShowPlayerDialog(playerid,2,DIALOG_STYLE_INPUT,"Registrar",regstring,"Registrar","Sair");
return 1;
}
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(response)
{
if(dialogid == 1)
{
if(strlen(inputtext))
{
new tmppass[64];
strmid(tmppass, inputtext, 0, strlen(inputtext), 255);
Encrypt(tmppass);
OnPlayerLogin(playerid,tmppass);
}
else
{
new loginstring[128];
new loginname[64];
GetPlayerName(playerid,loginname,sizeof(loginname));
format(loginstring,sizeof(loginstring),"Erro: Senha incorreta!\n \nPor favor, digite a senha correta:",loginname);
ShowPlayerDialog(playerid,1,DIALOG_STYLE_INPUT,"Logar",loginstring,"Logar","Sair");
gPlayerLogTries[playerid] += 1;
if(gPlayerLogTries[playerid] == 3) { Kick(playerid); }
}
}
if(dialogid == 2)
{
if(strlen(inputtext))
{
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "users/%s.ini", sendername);
new File: hFile = fopen(string, io_read);
if (hFile)
{
SendClientMessage(playerid, COLOR_YELLOW, "Nome de usuбrio que escolheu jб existe, por favor escolha um diferente.");
fclose(hFile);
return 1;
}
new tmppass[64];
strmid(tmppass, inputtext, 0, strlen(inputtext), 255);
Encrypt(tmppass);
OnPlayerRegister(playerid,tmppass);
}
else
{
new regstring[128];
new regname[64];
GetPlayerName(playerid,regname,sizeof(regname));
format(regstring,sizeof(regstring),"Bem-Vindo, %s\nVocк nгo tem uma conta.\nPor favor registre-se:",regname);
ShowPlayerDialog(playerid,2,DIALOG_STYLE_INPUT,"Registrar",regstring,"Registrar","Sair");
}
}
}
return 1;
}
Originally Posted by tshadow
Tipo Quando o player Connectar aparecer aquele dialog que eu fiz sу que nгo aparece
|