10.12.2014, 03:07
Galera, eu to querendo fazer com que o que o player digite no dialog seja a senha, porйm nгo estou sabendo como fazer.
Erros:
Quote:
Segui esse tutorial https://sampforum.blast.hk/showthread.php?tid=273088 To usando y_ini |
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch( dialogid )
{
case DIALOG_REGISTER:
{
if (!response) return Kick(playerid);
if(response)
{
if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, ""COL_WHITE"Registrando...",""COL_RED"Vocк escreveu uma senha invбlida\n"COL_WHITE"Escreva sua senha para criar uma nova conta.","Registre","Quit");
new INI:File = INI_Open(playerPASTA(playerid));
INI_SetTag(File,"data");
INI_WriteInt(File,"Senha",inputtext); //linha do erro
INI_WriteInt(File,"Dinheiro",0);
INI_WriteInt(File,"Score",0);
INI_WriteInt(File,"Skin",0);
INI_Close(File);
SpawnPlayer(playerid);
}
}
case DIALOG_LOGIN:
{
if ( !response ) return Kick ( playerid );
if( response )
{
if(inputtext == info[playerid][Senha]) //linha do erro
{
INI_ParseFile(playerPASTA(playerid), "Carregandoplayer_%s", .bExtra = true, .extra = playerid);
GivePlayerMoney(playerid, info[playerid][Dinheiro]);
ShowPlayerDialog(playerid, DIALOG_SUCCESS_2, DIALOG_STYLE_MSGBOX,""COL_WHITE"Sucesso!",""COL_GREEN"Vocк logou!","Ok","");
}
else
{
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COL_WHITE"Login",""COL_RED"Senha incorreta.\n"COL_WHITE"Escreva sua senha para logar.","Login","Quit");
}
return 1;
}
}
}
return 1;
}
Erros:
PHP код:
C:\Users\Vitor\Desktop\Vitor\samp03z_svr_R1_win32\gamemodes\rpg.pwn(106) : error 035: argument type mismatch (argument 3)
C:\Users\Vitor\Desktop\Vitor\samp03z_svr_R1_win32\gamemodes\rpg.pwn(122) : error 033: array must be indexed (variable "inputtext")