hi no load player data, please repair.!!!! Thanks
LOGIN CODE
Code:
forward playerload(playerid);
public playerload(playerid)
{
cache_get_value_int(0, "ID", pInfo[playerid][pID]);
cache_get_value_name_int(playerid, "Admin", pInfo[playerid][pAdmin]);
cache_get_value_name_int(playerid,"JatekosPenz", pInfo[playerid][pJatekosPenz]);
cache_get_value_name_int(playerid, "JatekosSzint", pInfo[playerid][pJatekosSzint]);
cache_get_value_name_float(playerid, "PosX", pInfo[playerid][PosX]);
cache_get_value_name_float(playerid, "PosY", pInfo[playerid][PosY]);
cache_get_value_name_float(playerid, "PosZ", pInfo[playerid][PosZ]);
cache_get_value_name_int(playerid, "JatekosOra", pInfo[playerid][pJatekosOra]);
cache_get_value_name_int(playerid, "JatekosPerc", pInfo[playerid][pJatekosPerc]);
cache_get_value_name_int(playerid, "JatekosMPerc", pInfo[playerid][pJatekosMPerc]);
cache_get_value_name_int(playerid,"JatekosOles", pInfo[playerid][pJatekosOles]);
cache_get_value_name_int(playerid,"JatekosInti", pInfo[playerid][pJatekosInti]);
cache_get_value_name_int(playerid, "JatekosHalal", pInfo[playerid][pJatekosHalal]);
cache_get_value_name_int(playerid, "JatekosSkin", pInfo[playerid][pJatekosSkin]);
return 1;
}
Code:
DIALOG(DIALOG_LOGIN_PASSWORD)
{
if(!response) return ShowLoginDialog(playerid,PHASE_USERNAME);
if(isnull(inputtext)) return ShowLoginDialog(playerid,PHASE_PASSWORD);
format(query,sizeof(query),"SELECT * FROM players WHERE Name = '%s' AND Password = MD5('%s')",pName(playerid),inputtext);
new escape[128]; mysql_escape_string(query,escape);
mysql_query(SQL,query);
if(!cache_num_rows())
{
Player_PasswordTries[playerid]++;
new string[128]; format(string,sizeof(string),"Helytelen jelszó! [%d/%d]",Player_PasswordTries[playerid],MAX_PASSWORD_TRIES);
ERR(playerid,string);
if(Player_PasswordTries[playerid] >= MAX_PASSWORD_TRIES) return KickEx(playerid);
ShowLoginDialog(playerid,PHASE_PASSWORD);
}
else
{
format(query,sizeof(query),"SELECT * FROM players WHERE Name = '%s' AND Password = MD5('%s')",pName(playerid),inputtext);
mysql_query(SQL,query);
new logdate[64];
cache_get_value_name(0,"LogDate",logdate,sizeof(logdate));
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(!OnlineCheck(i)) continue;
if(GetPlayerALevel(i) <= 0) continue;
MSGF(i,""COL_GREY"[ID:%d] %s felcsatlakozott a szerverre!",playerid,pName(playerid,true));
}
format(query,sizeof(query),"SELECT * FROM players WHERE Name = '%s' AND Password = MD5('%s')",pName(playerid),inputtext);
mysql_query(SQL,query);
mysql_tquery(SQL, query, "playerload", "d", playerid);
MSGF(playerid,""COL_GREEN"(( Üdvözöllek a szerveren. Utolsó Belépésed: %s ))",logdate);
TogglePlayerSpectating(playerid,false);
PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
SetPlayerVirtualWorld(playerid,0);
StopAudioStreamForPlayer(playerid);
SpawnPlayer(playerid);
}
return 1;
}