03.04.2015, 15:32
Try to debug it:
I've made 2 debugs (one already existed; Password).
Show me what it prints on the console.
pawn Код:
public OnAccountCheck(playerid)
{
new rows, fields, string[240], plrIP[16];
GetPlayerIp(playerid, plrIP, sizeof(plrIP));
cache_get_data(rows, fields, g_iHandle);
printf("Rows: %i, Fields: %i", rows, fields);
if(rows) //if there is row
{
cache_get_field_content(0, "Password", APlayerData[playerid][PlayerPassword], g_iHandle, 129);
APlayerData[playerid][CompteID] = cache_get_field_content_int(0, "ID");
printf("MDP CHARGE : %i: %s", APlayerData[playerid][Compte], APlayerData[playerid][PlayerPassword]);
format(string, 2000, TXT_DialogLoginMsg, GetPlayerNameEx(playerid), plrIP);
ShowPlayerDialog(playerid, DialogLogin, DIALOG_STYLE_PASSWORD, TXT_DialogLoginTitle, string, TXT_DialogLoginButton1, TXT_DialogButtonCancel);
}
else
{
new strStartRules[2000];
// RULES TEXT
ShowPlayerDialog(playerid, DialogStartRules, DIALOG_STYLE_MSGBOX, "Rиglement du serveur", strStartRules, "Refuser", "Accepter");
}
printf("ETAT DU SERVEUR : CHECK D'UN COMPTE");
return 1;
}
Show me what it prints on the console.