pInfo[playerid][AdminLevel] = cache_get_field_content_int(0, "AdminLevel", Handle); pInfo[playerid][HelperLevel] = cache_get_field_content_int(0, "HelperLevel", Handle); pInfo[playerid][VIPLevel] = cache_get_field_content_int(0, "VIPLevel", Handle); pInfo[playerid][Money] = cache_get_field_content_int(0, "Money", Handle );//Extrag din baza de date banii. Banii sunt o variabila de tip integer, se extrag cu aceasta functie. pInfo[playerid][Bank] = cache_get_field_content_int(0, "Bank", Handle); pInfo[playerid][Pincode] = cache_get_field_content_int(0, "Pincode", Handle); pInfo[playerid][Score] = cache_get_field_content_int(0, "Score", Handle); pInfo[playerid][Skin] = cache_get_field_content_int(0, "Skin", Handle); pInfo[playerid][Gender] = cache_get_field_content_int(0, "Gender", Handle); pInfo[playerid][Age] = cache_get_field_content_int(0, "Age", Handle); cache_get_field_content( 0, "Email", pInfo[playerid][Email], Handle, 256 ); cache_get_field_content( 0, "IP", pInfo [playerid] [IP], Handle, 20 );//Extrag din baza de date ip-ul. IP-ul este un string iar string-urile se extrag cu aceasta functie. pInfo[playerid][DrivingLic] = cache_get_field_content_int(0, "DrivingLic", Handle); pInfo[playerid][MotorLic] = cache_get_field_content_int(0, "MotorLic", Handle); pInfo[playerid][GunLic] = cache_get_field_content_int(0, "GunLic", Handle); pInfo[playerid][BoatLic] = cache_get_field_content_int(0, "BoatLic", Handle); pInfo[playerid][FishLic] = cache_get_field_content_int(0, "FishLic", Handle); pInfo[playerid][MatsLic] = cache_get_field_content_int(0, "MatsLic", Handle); pInfo[playerid][Banned] = cache_get_field_content_int(0, "Banned", Handle); cache_get_field_content( 0, "Banner", pInfo[playerid][Banner], Handle, 256 ); cache_get_field_content( 0, "Reason", pInfo[playerid][Reason], Handle, 256 ); pInfo[playerid][pMember] = cache_get_field_content_int(0, "pMember", Handle); pInfo[playerid][pLeader] = cache_get_field_content_int(0, "pLeader", Handle); pInfo[playerid][pRank] = cache_get_field_content_int(0, "pRank", Handle); pInfo[playerid][Kicks] = cache_get_field_content_int(0, "Kicks", Handle); pInfo[playerid][Bans] = cache_get_field_content_int(0, "Bans", Handle); pInfo[playerid][WantedLevel] = cache_get_field_content_int(0, "WantedLevel", Handle); pInfo[playerid][Drugs] = cache_get_field_content_int(0, "Drugs", Handle); pInfo[playerid][Materials] = cache_get_field_content_int(0, "Materials", Handle); pInfo[playerid][Job] = cache_get_field_content_int(0, "Job", Handle); pInfo[playerid][SkillTruck] = cache_get_field_content_int(0, "SkillTruck", Handle);
mysql_tquery(Handle, szQuery, "LoadPlayerData", "d", playerid);
new Cache: r; szQuery[0] = EOS; mysql_format(Handle, szQuery, 128, "SELECT * FROM `accounts` WHERE `Username` = '%e' LIMIT 1;", GetPName(playerid)); r = mysql_query(Handle, szQuery);
`ColumnName`, `ColumnName`, `ColumnName`, `ColumnName`
Do you load all columns when the player initially loads? If you don't - you can only select the columns you need by replacing "*" with
pawn Код:
|
pInfo[playerid][AdminLevel] = cache_get_field_content_int(0, "AdminLevel", Handle); pInfo[playerid][HelperLevel] = cache_get_field_content_int(0, "HelperLevel", Handle); pInfo[playerid][VIPLevel] = cache_get_field_content_int(0, "VIPLevel", Handle); pInfo[playerid][Money] = cache_get_field_content_int(0, "Money", Handle );//Extrag din baza de date banii. Banii sunt o variabila de tip integer, se extrag cu aceasta functie. pInfo[playerid][Bank] = cache_get_field_content_int(0, "Bank", Handle); pInfo[playerid][Pincode] = cache_get_field_content_int(0, "Pincode", Handle); pInfo[playerid][Score] = cache_get_field_content_int(0, "Score", Handle); pInfo[playerid][Skin] = cache_get_field_content_int(0, "Skin", Handle); pInfo[playerid][Gender] = cache_get_field_content_int(0, "Gender", Handle); pInfo[playerid][Age] = cache_get_field_content_int(0, "Age", Handle); cache_get_field_content( 0, "Email", pInfo[playerid][Email], Handle, 256 ); cache_get_field_content( 0, "IP", pInfo [playerid] [IP], Handle, 20 );//Extrag din baza de date ip-ul. IP-ul este un string iar string-urile se extrag cu aceasta functie. pInfo[playerid][DrivingLic] = cache_get_field_content_int(0, "DrivingLic", Handle); pInfo[playerid][MotorLic] = cache_get_field_content_int(0, "MotorLic", Handle); pInfo[playerid][GunLic] = cache_get_field_content_int(0, "GunLic", Handle); pInfo[playerid][BoatLic] = cache_get_field_content_int(0, "BoatLic", Handle); pInfo[playerid][FishLic] = cache_get_field_content_int(0, "FishLic", Handle); pInfo[playerid][MatsLic] = cache_get_field_content_int(0, "MatsLic", Handle); pInfo[playerid][Banned] = cache_get_field_content_int(0, "Banned", Handle); cache_get_field_content( 0, "Banner", pInfo[playerid][Banner], Handle, 256 ); cache_get_field_content( 0, "Reason", pInfo[playerid][Reason], Handle, 256 ); pInfo[playerid][pMember] = cache_get_field_content_int(0, "pMember", Handle); pInfo[playerid][pLeader] = cache_get_field_content_int(0, "pLeader", Handle); pInfo[playerid][pRank] = cache_get_field_content_int(0, "pRank", Handle); pInfo[playerid][Kicks] = cache_get_field_content_int(0, "Kicks", Handle); pInfo[playerid][Bans] = cache_get_field_content_int(0, "Bans", Handle); pInfo[playerid][WantedLevel] = cache_get_field_content_int(0, "WantedLevel", Handle); pInfo[playerid][Drugs] = cache_get_field_content_int(0, "Drugs", Handle); pInfo[playerid][Materials] = cache_get_field_content_int(0, "Materials", Handle); pInfo[playerid][Job] = cache_get_field_content_int(0, "Job", Handle); pInfo[playerid][SkillTruck] = cache_get_field_content_int(0, "SkillTruck", Handle);