17.01.2019, 14:34
What do I change this to cache_get_data for
Код:
forward OnForumAccountCheck(playerid);
public OnForumAccountCheck(playerid)
{
new rows, fields;
cache_get_data(rows, fields, mysql);
if(rows)
{
new String[150];
new pName[24];
GetPlayerName(playerid, pName, 24);
GiveNameSpace(pName);
cache_get_value_name(0, "Password", PlayerInfo[playerid][Password], mysql, 129);
PlayerInfo[playerid][ID] = cache_get_value_name_int(0, "ID");
//printf("%s", PlayerInfo[playerid][Password]);
format(String, sizeof(String), "{FFFFFF}Welcome back, %s.\n\n{0099FF}This account is already registered.\n\
{0099FF}Please, input your password below to proceed to the game.\n\n", pName);
ShowPlayerDialog(playerid, LoginDialog, DIALOG_STYLE_PASSWORD, "Login System", String, "Login", "Leave");
}
else
{
new String[150];
new pName[24];
GetPlayerName(playerid, pName, 24);
GiveNameSpace(pName);
format(String, sizeof(String), "{FFFFFF}Welcome %s.\n\n{0099FF}This account is not registered.\n\
{0099FF}Please, input your password below to proceed.\n\n", pName);
ShowPlayerDialog(playerid, RegisterDialog, DIALOG_STYLE_PASSWORD, "Registration System", String, "Register", "Leave");
}
return 1;
}


