new password = num_hash(params);
|
Originally Posted by ♣ Joker ♠
you use the variable "params" but never created it!
I think this code should be in some dcmd / zcmd function ask in the topic where you got the code |
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if (dialogid == 66)
{
if(response == 0)
{
Kick(playerid);
}
if(response)
{
if(gPlayerInfo[playerid][PLAYER_REGGED] == 0)
return SendClientMessage(playerid, COLOUR_ORANGE, "ERROR: You have already registered!");
}
else
{
new password = num_hash(params);
gPlayerInfo[playerid][PLAYER_PASS] = password;
gPlayerInfo[playerid][PLAYER_REGGED] = 1;
gPlayerInfo[playerid][PLAYER_LOGGED] = 1;
GetPlayerIp(playerid, gPlayerInfo[playerid][PLAYER_IP], 16);
new string[256]; format(string, sizeof(string), "You have successfully registered your account with the password \'%s\'. You have been automatically logged in.", string);
return SendClientMessage(playerid, COLOUR_LIGHTBLUE, string);
}
}
return 1;
}
|
Originally Posted by Cank
use "inputtext" instead of "params"
|
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 66)
{
if(response == 0) { }
if(response)
{
if(gPlayerInfo[playerid][PLAYER_REGGED] == 0) { }
} else { }
}
}