31.01.2015, 12:17
Hi,
My ORM does not work, it does not load yet nothing all looks good ... Thank you.
My ORM does not work, it does not load yet nothing all looks good ... Thank you.
PHP код:
new _query[128];
mysql_format(connectSQL, _query, sizeof(_query), "SELECT * FROM `account` WHERE `Name` = '%e'", returnName(playerid));
mysql_tquery(connectSQL, _query, "OnPlayerDataLoad", "d", playerid);
public OnPlayerDataLoad(playerid)
{
if(cache_num_rows() == 1)
{
new ORM:ormid = pInfo[playerid][pORM_ID] = orm_create("account");
orm_addvar_int(ormid, pInfo[playerid][pID], "ID");
orm_addvar_int(ormid, pInfo[playerid][pAdmin], "AdminLevel");
orm_addvar_int(ormid, pInfo[playerid][pLevel], "Level");
orm_addvar_int(ormid, pInfo[playerid][pRespect], "Respect");
orm_addvar_int(ormid, pInfo[playerid][pBank], "Bank");
orm_addvar_int(ormid, pInfo[playerid][pSex], "Sex");
orm_addvar_int(ormid, pInfo[playerid][pOrigin], "Origin");
orm_addvar_int(ormid, pInfo[playerid][pSkin], "Skin");
orm_addvar_int(ormid, pInfo[playerid][pBanTime], "BanTime");
orm_addvar_string(ormid, pInfo[playerid][pPassword], 248, "Password");
orm_addvar_string(ormid, pInfo[playerid][pName], MAX_PLAYER_NAME+1, "Name");
orm_addvar_string(ormid, pInfo[playerid][pEmail], 248, "Email");
orm_addvar_string(ormid, pInfo[playerid][pDescription], 248, "Description");
orm_addvar_string(ormid, pInfo[playerid][pBanReason], 248, "BanReason");
orm_setkey(ormid, "Name");
dialogShow(playerid, connectPlayer, DIALOG_STYLE_PASSWORD, "{0197D8}Connexion а votre compte", "{FEFEFE}Salut ! Merci d'entrer ton mot de passe dans la case ci-dessous, vous avez le droit а un maximum de 5 essais, sinon vous aurez un bannissement de 5 heures sans possibilitй d'unban manuellement.", "Connexion", "Dйconnexion");
}
orm_setkey(pInfo[playerid][pORM_ID], "ID");
return true;
}[B][/B]