19.03.2015, 03:15
i have load password in the query , okay take a look
OnPlayerConnect
OnAccountCheck
OnPlayerConnect
pawn Код:
new query[128];
mysql_format(database, query, sizeof(query),"SELECT `Password`, `ID` FROM `users` WHERE `PlayerName` = '%e' LIMIT 1", GetPlayerNameEx(playerid));
mysql_tquery(database, query, "OnAccountCheck", "i", playerid);
pawn Код:
public OnAccountCheck(playerid)
{
new rows, fields;
cache_get_data(rows, fields, database);
if(rows)
{
cache_get_field_content(0, "Password", APlayerData[playerid][PlayerPassword], database, 129);
APlayerData[playerid][CompteID] = cache_get_field_content_int(0, "ID");
printf("%s", APlayerData[playerid][PlayerPassword]);
ShowPlayerDialog(playerid, DialogLogin, DIALOG_STYLE_PASSWORD, TXT_DialogLoginTitle, TXT_DialogLoginMsg, TXT_DialogLoginButton1, TXT_DialogButtonCancel);
}
else
{
new strStartRules[2000];
ShowPlayerDialog(playerid, DialogStartRules, DIALOG_STYLE_MSGBOX, "Rиglement du serveur", strStartRules, "Refuser", "Accepter");
}
printf("SERVER STATS : ACCOUNT CHECK");
return 1;
}