Problem With MySQL -
C0oL3r - 17.02.2018
Код:
public LoadPlayerData(playerid)
{
GameTextForPlayer(playerid, "~r~LOADING DATA ~w~...", 3000, 3);
new LoadDataQuery[255];
mysql_format(Database, LoadDataQuery, sizeof(LoadDataQuery), "SELECT * FROM `USERS` WHERE `Username` = '%s'", pInfo[playerid][pName]);
mysql_query(Database, LoadDataQuery);
mysql_log(ALL);
cache_get_value_int(0, "ID", pInfo[playerid][pID]);
cache_get_value_int(0, "Warns", pInfo[playerid][pWarns]);
cache_get_value_int(0, "Faction", pInfo[playerid][pFaction]);
cache_get_value_int(0, "FactionPunish", pInfo[playerid][pFactionPunish]);
cache_get_value_int(0, "FactionWarns", pInfo[playerid][pFactionWarns]);
cache_get_value_int(0, "FactionRank", pInfo[playerid][pFactionRank]);
cache_get_value_int(0, "House", pInfo[playerid][pHouse]);
cache_get_value_int(0, "Drugs", pInfo[playerid][pDrugs]);
cache_get_value_int(0, "Mats", pInfo[playerid][pMaterials]);
cache_get_value_int(0, "Hiddens", pInfo[playerid][pHiddens]);
cache_get_value_int(0, "Admin", pInfo[playerid][pAdmin]);
cache_get_value_int(0, "Helper", pInfo[playerid][pHelper]);
cache_get_value_int(0, "Respect", pInfo[playerid][pRespect]);
cache_get_value_int(0, "Hours", pInfo[playerid][pHours]);
cache_get_value_int(0, "Cash", pInfo[playerid][pCash]);
cache_get_value_int(0, "PremiumPoints", pInfo[playerid][pPremiumPoints]);
cache_get_value_int(0, "Level", pInfo[playerid][pLevel]);
cache_get_value_int(0, "PhoneNumber", pInfo[playerid][pPhoneNr]);
cache_get_value_name(0, "Email", pInfo[playerid][pEmail], 255);
cache_get_value_int(0, "Age", pInfo[playerid][pAge]);
cache_get_value_name(0, "Sex", pInfo[playerid][pSex], 255);
cache_get_value_int(0, "Language", pInfo[playerid][pLanguage]);
cache_get_value_int(0, "RentedHouse", pInfo[playerid][pRentedHouse]);
cache_get_value_int(0, "BankMoney", pInfo[playerid][pBankMoney]);
cache_get_value_int(0, "PremiumAccount", pInfo[playerid][pPremiumAccount]);
cache_get_value_int(0, "TreasurePoints", pInfo[playerid][pTreasurePoints]);
cache_get_value_int(0, "Muted", pInfo[playerid][pMuted]);
cache_get_value_int(0, "MutedTime", pInfo[playerid][pMutedTime]);
cache_get_value_int(0, "GasCan", pInfo[playerid][pGasCan]);
cache_get_value_int(0, "FireWorks", pInfo[playerid][pFireWorks]);
cache_get_value_int(0, "PhoneBook", pInfo[playerid][pPhonebook]);
cache_get_value_int(0, "Wanted", pInfo[playerid][pWanted]);
cache_get_value_int(0, "WantedTime", pInfo[playerid][pWantedTime]);
cache_get_value_int(0, "Jailed", pInfo[playerid][pJailed]);
cache_get_value_int(0, "JailTime", pInfo[playerid][pJailTime]);
cache_get_value_int(0, "Biz", pInfo[playerid][pBiz]);
cache_get_value_int(0, "CarLic", pInfo[playerid][pCarLic]);
cache_get_value_int(0, "CarLicT", pInfo[playerid][pCarLicT]);
cache_get_value_int(0, "CarLicSuspended", pInfo[playerid][pCarLicSuspended]);
cache_get_value_int(0, "GunLic", pInfo[playerid][pGunLic]);
cache_get_value_int(0, "GunLicT", pInfo[playerid][pGunLicT]);
cache_get_value_int(0, "GunLicSuspended", pInfo[playerid][pGunLicSuspended]);
cache_get_value_int(0, "FlyLic", pInfo[playerid][pFlyLic]);
cache_get_value_int(0, "FlyLicT", pInfo[playerid][pFlyLicT]);
cache_get_value_int(0, "BoatLic", pInfo[playerid][pBoatLic]);
cache_get_value_int(0, "BoatLicT", pInfo[playerid][pBoatLicT]);
cache_get_value_int(0, "Paydays", pInfo[playerid][pPayday]);
cache_get_value_int(0, "Job", pInfo[playerid][pJob]);
cache_get_value_int(0, "TruckSkill", pInfo[playerid][pTruckSkill]);
cache_get_value_int(0, "TruckTimes", pInfo[playerid][pTruckTimes]);
cache_get_value_int(0, "TruckRem", pInfo[playerid][pTruckRem]);
cache_get_value_int(0, "PizzaSkill", pInfo[playerid][pPizzaSkill]);
cache_get_value_int(0, "PizzaTimes", pInfo[playerid][pPizzaTimes]);
cache_get_value_int(0, "PizzaRem", pInfo[playerid][pPizzaRem]);
cache_get_value_int(0, "FishSkill", pInfo[playerid][pFishSkill]);
cache_get_value_int(0, "FishTimes", pInfo[playerid][pFishTimes]);
cache_get_value_int(0, "FishRem", pInfo[playerid][pFishRem]);
cache_get_value_int(0, "HackerSkill", pInfo[playerid][pHackerSkill]);
cache_get_value_int(0, "HackerTimes", pInfo[playerid][pHackerTimes]);
cache_get_value_int(0, "HackerRem", pInfo[playerid][pHackerRem]);
cache_get_value_int(0, "BusSkill", pInfo[playerid][pBusSkill]);
cache_get_value_int(0, "BusTimes", pInfo[playerid][pBusTimes]);
cache_get_value_int(0, "BusRem", pInfo[playerid][pBusRem]);
cache_get_value_int(0, "GarbageSkill", pInfo[playerid][pGarbageSkill]);
cache_get_value_int(0, "GarbageTimes", pInfo[playerid][pGarbageTimes]);
cache_get_value_int(0, "GarbageRem", pInfo[playerid][pGarbageRem]);
cache_get_value_int(0, "FarmSkill", pInfo[playerid][pFarmSkill]);
cache_get_value_int(0, "FarmTimes", pInfo[playerid][pFarmTimes]);
cache_get_value_int(0, "FarmRem", pInfo[playerid][pFarmRem]);
cache_get_value_int(0, "RobPoints", pInfo[playerid][pRobPoints]);
cache_get_value_int(0, "Rented", pInfo[playerid][pRented]);
cache_get_value_int(0, "WTalkie", pInfo[playerid][pWTalkie]);
cache_get_value_int(0, "WTalkieChannel", pInfo[playerid][pWTalkieChannel]);
cache_get_value_int(0, "PhoneCredits", pInfo[playerid][pCredits]);
cache_get_value_int(0, "FightingStyle", pInfo[playerid][pFightingStyle]);
cache_get_value_int(0, "CarSlots", pInfo[playerid][pCarSlots]);
cache_get_value_int(0, "HudHealth", pInfo[playerid][pHudHealth]);
cache_get_value_int(0, "HudArmour", pInfo[playerid][pHudArmour]);
cache_get_value_int(0, "HudPaydays", pInfo[playerid][pHudPayDays]);
cache_get_value_int(0, "HudStatus", pInfo[playerid][pHudStatus]);
cache_get_value_int(0, "HudSkills", pInfo[playerid][pHudSkills]);
cache_get_value_int(0, "HudSpeedo", pInfo[playerid][pHudSpeedometer]);
cache_get_value_int(0, "HudShowFPS", pInfo[playerid][pHudShowFPS]);
GivePlayerMoney(playerid, pInfo[playerid][pCash]);
ClearChatForPlayer(playerid);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(pInfo[i][pAdmin] >= 1)
{
AdminsOnline++;
if(AFKSeconds[i] >= 1)
{
AfkAdmins++;
}
}
}
new string[255];
if(pInfo[playerid][pPremiumAccount] == 1)
{
SCM(playerid, COLOR_WHITE, "You have a Premium Account.");
}
if(pInfo[playerid][pAdmin] > 0)
{
format(string, sizeof(string), "You are a level %d admin, There are %d admins online (%d afk)", pInfo[playerid][pAdmin], AdminsOnline, AfkAdmins);
SCM(playerid, COLOR_WHITE, string);
}
pInfo[playerid][pLogged] = 1;
TextDrawShowForPlayer(playerid, SVNameTD[playerid]);
TextDrawShowForPlayer(playerid, SVRoTD[playerid]);
TextDrawShowForPlayer(playerid, DateTD[playerid]);
TextDrawShowForPlayer(playerid, TimeTD[playerid]);
TextDrawShowForPlayer(playerid, PNameTD[playerid]);
TogglePlayerSpectating(playerid, false);
}
after login it's putting me in air, and not where i set the spawn and rest, and it's say "You are a level 97 admin.", not 0 how it's returning from mysql in mysql_log.. same problem with cash, and i think with all other variables..
if i remove all of that cache_get_value, and leave only admin, it will spawn me good and send correct message.
mysql_log:
Код:
[20:32:00] [INFO] changed log level from 'warning, error' to 'debug, info, warning, error'
[20:32:00] [DEBUG] cache_get_value_name_int(0, "ID", 0x05B7674C)
[20:32:00] [DEBUG] cache_get_value_name_int: assigned value: '1'
[20:32:00] [DEBUG] cache_get_value_name_int: return value: '1'
[20:32:00] [DEBUG] cache_get_value_name_int(0, "Warns", 0x05B76918)
[20:32:00] [DEBUG] cache_get_value_name_int: assigned value: '0'
[20:32:00] [DEBUG] cache_get_value_name_int: return value: '1'
[20:32:00] [DEBUG] cache_get_value_name_int(0, "Faction", 0x05B7691C)
[20:32:00] [DEBUG] cache_get_value_name_int: assigned value: '0'
[20:32:00] [DEBUG] cache_get_value_name_int: return value: '1'
[20:32:00] [DEBUG] cache_get_value_name_int(0, "FactionPunish", 0x05B76920)
[20:32:00] [DEBUG] cache_get_value_name_int: assigned value: '0'
[20:32:00] [DEBUG] cache_get_value_name_int: return value: '1'
[20:32:00] [DEBUG] cache_get_value_name_int(0, "FactionWarns", 0x05B76924)
[20:32:00] [DEBUG] cache_get_value_name_int: assigned value: '0'
[20:32:00] [DEBUG] cache_get_value_name_int: return value: '1'
[20:32:00] [DEBUG] cache_get_value_name_int(0, "FactionRank", 0x05B7692C)
[20:32:00] [DEBUG] cache_get_value_name_int: assigned value: '0'
[20:32:00] [DEBUG] cache_get_value_name_int: return value: '1'
[20:32:00] [DEBUG] cache_get_value_name_int(0, "House", 0x05B76930)
[20:32:00] [DEBUG] cache_get_value_name_int: assigned value: '0'
[20:32:00] [DEBUG] cache_get_value_name_int: return value: '1'
[20:32:00] [DEBUG] cache_get_value_name_int(0, "Drugs", 0x05B76938)
[20:32:00] [DEBUG] cache_get_value_name_int: assigned value: '0'
[20:32:00] [DEBUG] cache_get_value_name_int: return value: '1'
[20:32:00] [DEBUG] cache_get_value_name_int(0, "Mats", 0x05B7693C)
[20:32:00] [DEBUG] cache_get_value_name_int: assigned value: '0'
[20:32:00] [DEBUG] cache_get_value_name_int: return value: '1'
[20:32:00] [DEBUG] cache_get_value_name_int(0, "Hiddens", 0x05B76940)
[20:32:00] [DEBUG] cache_get_value_name_int: assigned value: '0'
[20:32:00] [DEBUG] cache_get_value_name_int: return value: '1'
[20:32:00] [DEBUG] cache_get_value_name_int(0, "Admin", 0x05B7694C)
[20:32:00] [DEBUG] cache_get_value_name_int: assigned value: '0'
[20:32:00] [DEBUG] cache_get_value_name_int: return value: '1'
[20:32:00] [DEBUG] cache_get_value_name_int(0, "Helper", 0x05B76950)
[20:32:00] [DEBUG] cache_get_value_name_int: assigned value: '0'
[20:32:00] [DEBUG] cache_get_value_name_int: return value: '1'
[20:32:00] [DEBUG] cache_get_value_name_int(0, "Respect", 0x05B76954)
[20:32:00] [DEBUG] cache_get_value_name_int: assigned value: '0'
[20:32:00] [DEBUG] cache_get_value_name_int: return value: '1'
[20:32:00] [DEBUG] cache_get_value_name_int(0, "Hours", 0x05B76958)
[20:32:00] [DEBUG] cache_get_value_name_int: assigned value: '0'
[20:32:00] [DEBUG] cache_get_value_name_int: return value: '1'
[20:32:00] [DEBUG] cache_get_value_name_int(0, "Cash", 0x05B7695C)
[20:32:00] [DEBUG] cache_get_value_name_int: assigned value: '500000'
[20:32:00] [DEBUG] cache_get_value_name_int: return value: '1'
[20:32:00] [DEBUG] cache_get_value_name_int(0, "PremiumPoints", 0x05B76964)
[20:32:00] [DEBUG] cache_get_value_name_int: assigned value: '0'
[20:32:00] [DEBUG] cache_get_value_name_int: return value: '1'
[20:32:00] [DEBUG] cache_get_value_name_int(0, "Level", 0x05B76900)
[20:32:00] [DEBUG] cache_get_value_name_int: assigned value: '0'
[20:32:00] [DEBUG] cache_get_value_name_int: return value: '1'
[20:32:00] [DEBUG] cache_get_value_name_int(0, "PhoneNumber", 0x05B76904)
[20:32:00] [DEBUG] cache_get_value_name_int: assigned value: '0'
[20:32:00] [DEBUG] cache_get_value_name_int: return value: '1'
[20:32:00] [DEBUG] cache_get_value_name(0, "Email", 0x05B76908, 255)
[20:32:00] [DEBUG] cache_get_value_name: assigned value: 'gora_andrey2004@yahoo.com'
[20:32:00] [DEBUG] cache_get_value_name: return value: '1'
[20:32:00] [DEBUG] cache_get_value_name_int(0, "Age", 0x05B7690C)
[20:32:00] [DEBUG] cache_get_value_name_int: assigned value: '14'
[20:32:00] [DEBUG] cache_get_value_name_int: return value: '1'
[20:32:00] [DEBUG] cache_get_value_name(0, "Sex", 0x05B76910, 255)
[20:32:00] [DEBUG] cache_get_value_name: assigned value: 'Barbat'
[20:32:00] [DEBUG] cache_get_value_name: return value: '1'
[20:32:00] [DEBUG] cache_get_value_name_int(0, "Language", 0x05B76914)
[20:32:00] [DEBUG] cache_get_value_name_int: assigned value: '1'
[20:32:00] [DEBUG] cache_get_value_name_int: return value: '1'
[20:32:00] [DEBUG] cache_get_value_name_int(0, "RentedHouse", 0x05B76934)
[20:32:00] [DEBUG] cache_get_value_name_int: assigned value: '0'
[20:32:00] [DEBUG] cache_get_value_name_int: return value: '1'
[20:32:00] [DEBUG] cache_get_value_name_int(0, "BankMoney", 0x05B76960)
[20:32:00] [DEBUG] cache_get_value_name_int: assigned value: '0'
[20:32:00] [DEBUG] cache_get_value_name_int: return value: '1'
[20:32:00] [DEBUG] cache_get_value_name_int(0, "PremiumAccount", 0x05B76968)
[20:32:00] [DEBUG] cache_get_value_name_int: assigned value: '0'
[20:32:00] [DEBUG] cache_get_value_name_int: return value: '1'
[20:32:00] [DEBUG] cache_get_value_name_int(0, "TreasurePoints", 0x05B7696C)
[20:32:00] [DEBUG] cache_get_value_name_int: assigned value: '0'
[20:32:00] [DEBUG] cache_get_value_name_int: return value: '1'
[20:32:00] [DEBUG] cache_get_value_name_int(0, "Muted", 0x05B76970)
[20:32:00] [DEBUG] cache_get_value_name_int: assigned value: '0'
[20:32:00] [DEBUG] cache_get_value_name_int: return value: '1'
[20:32:00] [DEBUG] cache_get_value_name_int(0, "MutedTime", 0x05B76974)
[20:32:00] [DEBUG] cache_get_value_name_int: assigned value: '0'
[20:32:00] [DEBUG] cache_get_value_name_int: return value: '1'
[20:32:00] [DEBUG] cache_get_value_name_int(0, "GasCan", 0x05B76978)
[20:32:00] [DEBUG] cache_get_value_name_int: assigned value: '0'
[20:32:00] [DEBUG] cache_get_value_name_int: return value: '1'
[20:32:00] [DEBUG] cache_get_value_name_int(0, "FireWorks", 0x05B76980)
[20:32:00] [DEBUG] cache_get_value_name_int: assigned value: '0'
[20:32:00] [DEBUG] cache_get_value_name_int: return value: '1'
[20:32:00] [DEBUG] cache_get_value_name_int(0, "PhoneBook", 0x05B76984)
[20:32:00] [DEBUG] cache_get_value_name_int: assigned value: '0'
[20:32:00] [DEBUG] cache_get_value_name_int: return value: '1'
[20:32:00] [DEBUG] cache_get_value_name_int(0, "Wanted", 0x05B76988)
[20:32:00] [DEBUG] cache_get_value_name_int: assigned value: '0'
[20:32:00] [DEBUG] cache_get_value_name_int: return value: '1'
[20:32:00] [DEBUG] cache_get_value_name_int(0, "WantedTime", 0x05B7698C)
[20:32:00] [DEBUG] cache_get_value_name_int: assigned value: '0'
[20:32:00] [DEBUG] cache_get_value_name_int: return value: '1'
[20:32:00] [DEBUG] cache_get_value_name_int(0, "Jailed", 0x05B76990)
[20:32:00] [DEBUG] cache_get_value_name_int: assigned value: '0'
[20:32:00] [DEBUG] cache_get_value_name_int: return value: '1'
[20:32:00] [DEBUG] cache_get_value_name_int(0, "JailTime", 0x05B76994)
[20:32:00] [DEBUG] cache_get_value_name_int: assigned value: '0'
[20:32:00] [DEBUG] cache_get_value_name_int: return value: '1'
[20:32:00] [DEBUG] cache_get_value_name_int(0, "Biz", 0x05B76998)
[20:32:00] [DEBUG] cache_get_value_name_int: assigned value: '0'
[20:32:00] [DEBUG] cache_get_value_name_int: return value: '1'
[20:32:00] [DEBUG] cache_get_value_name_int(0, "CarLic", 0x05B769A4)
[20:32:00] [DEBUG] cache_get_value_name_int: assigned value: '0'
[20:32:00] [DEBUG] cache_get_value_name_int: return value: '1'
[20:32:00] [DEBUG] cache_get_value_name_int(0, "CarLicT", 0x05B769A8)
[20:32:00] [DEBUG] cache_get_value_name_int: assigned value: '0'
[20:32:00] [DEBUG] cache_get_value_name_int: return value: '1'
[20:32:00] [DEBUG] cache_get_value_name_int(0, "CarLicSuspended", 0x05B7699C)
[20:32:00] [DEBUG] cache_get_value_name_int: assigned value: '0'
[20:32:00] [DEBUG] cache_get_value_name_int: return value: '1'
[20:32:00] [DEBUG] cache_get_value_name_int(0, "GunLic", 0x05B769AC)
[20:32:00] [DEBUG] cache_get_value_name_int: assigned value: '0'
[20:32:00] [DEBUG] cache_get_value_name_int: return value: '1'
[20:32:00] [DEBUG] cache_get_value_name_int(0, "GunLicT", 0x05B769B0)
[20:32:00] [DEBUG] cache_get_value_name_int: assigned value: '0'
[20:32:00] [DEBUG] cache_get_value_name_int: return value: '1'
[20:32:00] [DEBUG] cache_get_value_name_int(0, "GunLicSuspended", 0x05B769A0)
[20:32:00] [DEBUG] cache_get_value_name_int: assigned value: '0'
[20:32:00] [DEBUG] cache_get_value_name_int: return value: '1'
[20:32:00] [DEBUG] cache_get_value_name_int(0, "FlyLic", 0x05B769B4)
[20:32:00] [DEBUG] cache_get_value_name_int: assigned value: '0'
[20:32:00] [DEBUG] cache_get_value_name_int: return value: '1'
[20:32:00] [DEBUG] cache_get_value_name_int(0, "FlyLicT", 0x05B769B8)
[20:32:00] [DEBUG] cache_get_value_name_int: assigned value: '0'
[20:32:00] [DEBUG] cache_get_value_name_int: return value: '1'
[20:32:00] [DEBUG] cache_get_value_name_int(0, "BoatLic", 0x05B769BC)
[20:32:00] [DEBUG] cache_get_value_name_int: assigned value: '0'
[20:32:00] [DEBUG] cache_get_value_name_int: return value: '1'
[20:32:00] [DEBUG] cache_get_value_name_int(0, "BoatLicT", 0x05B769C0)
[20:32:00] [DEBUG] cache_get_value_name_int: assigned value: '0'
[20:32:00] [DEBUG] cache_get_value_name_int: return value: '1'
[20:32:00] [DEBUG] cache_get_value_name_int(0, "Paydays", 0x05B769C4)
[20:32:00] [DEBUG] cache_get_value_name_int: assigned value: '0'
[20:32:00] [DEBUG] cache_get_value_name_int: return value: '1'
[20:32:00] [DEBUG] cache_get_value_name_int(0, "Job", 0x05B769C8)
[20:32:00] [DEBUG] cache_get_value_name_int: assigned value: '0'
[20:32:00] [DEBUG] cache_get_value_name_int: return value: '1'
[20:32:00] [DEBUG] cache_get_value_name_int(0, "TruckSkill", 0x05B769D8)
[20:32:00] [DEBUG] cache_get_value_name_int: assigned value: '1'
[20:32:00] [DEBUG] cache_get_value_name_int: return value: '1'
[20:32:00] [DEBUG] cache_get_value_name_int(0, "TruckTimes", 0x05B769DC)
[20:32:00] [DEBUG] cache_get_value_name_int: assigned value: '0'
[20:32:00] [DEBUG] cache_get_value_name_int: return value: '1'
[20:32:00] [DEBUG] cache_get_value_name_int(0, "TruckRem", 0x05B769E0)
[20:32:00] [DEBUG] cache_get_value_name_int: assigned value: '26'
[20:32:00] [DEBUG] cache_get_value_name_int: return value: '1'
[20:32:00] [DEBUG] cache_get_value_name_int(0, "PizzaSkill", 0x05B769E4)
[20:32:00] [DEBUG] cache_get_value_name_int: assigned value: '1'
[20:32:00] [DEBUG] cache_get_value_name_int: return value: '1'
[20:32:00] [DEBUG] cache_get_value_name_int(0, "PizzaTimes", 0x05B769E8)
[20:32:00] [DEBUG] cache_get_value_name_int: assigned value: '0'
[20:32:00] [DEBUG] cache_get_value_name_int: return value: '1'
[20:32:00] [DEBUG] cache_get_value_name_int(0, "PizzaRem", 0x05B769EC)
[20:32:00] [DEBUG] cache_get_value_name_int: assigned value: '26'
[20:32:00] [DEBUG] cache_get_value_name_int: return value: '1'
[20:32:00] [DEBUG] cache_get_value_name_int(0, "FishSkill", 0x05B769F0)
[20:32:00] [DEBUG] cache_get_value_name_int: assigned value: '1'
[20:32:00] [DEBUG] cache_get_value_name_int: return value: '1'
[20:32:00] [DEBUG] cache_get_value_name_int(0, "FishTimes", 0x05B769F4)
[20:32:00] [DEBUG] cache_get_value_name_int: assigned value: '0'
[20:32:00] [DEBUG] cache_get_value_name_int: return value: '1'
[20:32:00] [DEBUG] cache_get_value_name_int(0, "FishRem", 0x05B769F8)
[20:32:00] [DEBUG] cache_get_value_name_int: assigned value: '26'
[20:32:00] [DEBUG] cache_get_value_name_int: return value: '1'
[20:32:00] [DEBUG] cache_get_value_name_int(0, "HackerSkill", 0x05B769FC)
[20:32:00] [DEBUG] cache_get_value_name_int: assigned value: '1'
[20:32:00] [DEBUG] cache_get_value_name_int: return value: '1'
[20:32:00] [DEBUG] cache_get_value_name_int(0, "HackerTimes", 0x05B76A00)
[20:32:00] [DEBUG] cache_get_value_name_int: assigned value: '0'
[20:32:00] [DEBUG] cache_get_value_name_int: return value: '1'
[20:32:00] [DEBUG] cache_get_value_name_int(0, "HackerRem", 0x05B76A04)
[20:32:00] [DEBUG] cache_get_value_name_int: assigned value: '50'
[20:32:00] [DEBUG] cache_get_value_name_int: return value: '1'
[20:32:00] [DEBUG] cache_get_value_name_int(0, "BusSkill", 0x05B76A08)
[20:32:00] [DEBUG] cache_get_value_name_int: assigned value: '1'
[20:32:00] [DEBUG] cache_get_value_name_int: return value: '1'
[20:32:00] [DEBUG] cache_get_value_name_int(0, "BusTimes", 0x05B76A0C)
[20:32:00] [DEBUG] cache_get_value_name_int: assigned value: '0'
[20:32:00] [DEBUG] cache_get_value_name_int: return value: '1'
[20:32:00] [DEBUG] cache_get_value_name_int(0, "BusRem", 0x05B76A10)
[20:32:00] [DEBUG] cache_get_value_name_int: assigned value: '26'
[20:32:00] [DEBUG] cache_get_value_name_int: return value: '1'
[20:32:00] [DEBUG] cache_get_value_name_int(0, "GarbageSkill", 0x05B76A14)
[20:32:00] [DEBUG] cache_get_value_name_int: assigned value: '1'
[20:32:00] [DEBUG] cache_get_value_name_int: return value: '1'
[20:32:00] [DEBUG] cache_get_value_name_int(0, "GarbageTimes", 0x05B76A18)
[20:32:00] [DEBUG] cache_get_value_name_int: assigned value: '0'
[20:32:00] [DEBUG] cache_get_value_name_int: return value: '1'
[20:32:00] [DEBUG] cache_get_value_name_int(0, "GarbageRem", 0x05B76A1C)
[20:32:00] [DEBUG] cache_get_value_name_int: assigned value: '40'
[20:32:00] [DEBUG] cache_get_value_name_int: return value: '1'
[20:32:00] [DEBUG] cache_get_value_name_int(0, "FarmSkill", 0x05B76A20)
[20:32:00] [DEBUG] cache_get_value_name_int: assigned value: '1'
[20:32:00] [DEBUG] cache_get_value_name_int: return value: '1'
[20:32:00] [DEBUG] cache_get_value_name_int(0, "FarmTimes", 0x05B76A24)
[20:32:00] [DEBUG] cache_get_value_name_int: assigned value: '0'
[20:32:00] [DEBUG] cache_get_value_name_int: return value: '1'
[20:32:00] [DEBUG] cache_get_value_name_int(0, "FarmRem", 0x05B76A28)
[20:32:00] [DEBUG] cache_get_value_name_int: assigned value: '26'
[20:32:00] [DEBUG] cache_get_value_name_int: return value: '1'
[20:32:00] [DEBUG] cache_get_value_name_int(0, "RobPoints", 0x05B76A2C)
[20:32:00] [DEBUG] cache_get_value_name_int: assigned value: '0'
[20:32:00] [DEBUG] cache_get_value_name_int: return value: '1'
[20:32:00] [DEBUG] cache_get_value_name_int(0, "Rented", 0x05B76A34)
[20:32:00] [DEBUG] cache_get_value_name_int: assigned value: '0'
[20:32:00] [DEBUG] cache_get_value_name_int: return value: '1'
[20:32:00] [DEBUG] cache_get_value_name_int(0, "WTalkie", 0x05B76A38)
[20:32:00] [DEBUG] cache_get_value_name_int: assigned value: '0'
[20:32:00] [DEBUG] cache_get_value_name_int: return value: '1'
[20:32:00] [DEBUG] cache_get_value_name_int(0, "WTalkieChannel", 0x05B76A3C)
[20:32:00] [DEBUG] cache_get_value_name_int: assigned value: '0'
[20:32:00] [DEBUG] cache_get_value_name_int: return value: '1'
[20:32:00] [DEBUG] cache_get_value_name_int(0, "PhoneCredits", 0x05B76A44)
[20:32:00] [DEBUG] cache_get_value_name_int: assigned value: '0'
[20:32:00] [DEBUG] cache_get_value_name_int: return value: '1'
[20:32:00] [DEBUG] cache_get_value_name_int(0, "FightingStyle", 0x05B76A48)
[20:32:00] [DEBUG] cache_get_value_name_int: assigned value: '0'
[20:32:00] [DEBUG] cache_get_value_name_int: return value: '1'
[20:32:00] [DEBUG] cache_get_value_name_int(0, "CarSlots", 0x05B76A50)
[20:32:00] [DEBUG] cache_get_value_name_int: assigned value: '3'
[20:32:00] [DEBUG] cache_get_value_name_int: return value: '1'
[20:32:00] [DEBUG] cache_get_value_name_int(0, "HudHealth", 0x05B79ED4)
[20:32:00] [DEBUG] cache_get_value_name_int: assigned value: '0'
[20:32:00] [DEBUG] cache_get_value_name_int: return value: '1'
[20:32:00] [DEBUG] cache_get_value_name_int(0, "HudArmour", 0x05B79ED8)
[20:32:00] [DEBUG] cache_get_value_name_int: assigned value: '0'
[20:32:00] [DEBUG] cache_get_value_name_int: return value: '1'
[20:32:00] [DEBUG] cache_get_value_name_int(0, "HudPaydays", 0x05B79EE0)
[20:32:00] [DEBUG] cache_get_value_name_int: assigned value: '0'
[20:32:00] [DEBUG] cache_get_value_name_int: return value: '1'
[20:32:00] [DEBUG] cache_get_value_name_int(0, "HudStatus", 0x05B79EE8)
[20:32:00] [DEBUG] cache_get_value_name_int: assigned value: '0'
[20:32:00] [DEBUG] cache_get_value_name_int: return value: '1'
[20:32:00] [DEBUG] cache_get_value_name_int(0, "HudSkills", 0x05B79EE4)
[20:32:00] [DEBUG] cache_get_value_name_int: assigned value: '0'
[20:32:00] [DEBUG] cache_get_value_name_int: return value: '1'
[20:32:00] [DEBUG] cache_get_value_name_int(0, "HudSpeedo", 0x05B79EEC)
[20:32:00] [DEBUG] cache_get_value_name_int: assigned value: '0'
[20:32:00] [DEBUG] cache_get_value_name_int: return value: '1'
[20:32:00] [DEBUG] cache_get_value_name_int(0, "HudShowFPS", 0x05B79EDC)
[20:32:00] [DEBUG] cache_get_value_name_int: assigned value: '0'
[20:32:00] [DEBUG] cache_get_value_name_int: return value: '1'
Re: Problem With MySQL -
PepsiCola23 - 17.02.2018
did you try making em like this?
PHP код:
PlayerData[playerid][Helper] = cache_get_field_content_int(0, "Helper");
Re: Problem With MySQL -
C0oL3r - 17.02.2018
No, i will try now
Re: Problem With MySQL -
C0oL3r - 17.02.2018
undefined symbol "cache_get_field_content_int"
Re: Problem With MySQL -
PepsiCola23 - 17.02.2018
do you have the plugins updated?
Re: Problem With MySQL -
C0oL3r - 17.02.2018
yes, but from r40
Код:
cache_get_field_content_int
has been replaced with
Код:
cache_get_value_name (_int, _float)
Re: Problem With MySQL -
C0oL3r - 17.02.2018
Any solution??
Re: Problem With MySQL -
PepsiCola23 - 17.02.2018
so the data isnt loading?what you got at OnPlayerConnect?
Re: Problem With MySQL -
iKarim - 17.02.2018
Quote:
Originally Posted by C0oL3r
Any solution??
|
Show more logs, where the connection actually happens and the query executes.
Re: Problem With MySQL -
C0oL3r - 17.02.2018
OnPlayerConnect:
Код:
public OnPlayerConnect(playerid)
{
pInfo[playerid][RemainingAtt] = 3;
pInfo[playerid][pWarns] = 0;
pInfo[playerid][pFaction] = 0;
pInfo[playerid][pFactionPunish] = 0;
pInfo[playerid][pFactionWarns] = 0;
pInfo[playerid][pFactionRank] = 0;
pInfo[playerid][pHouse] = 0;
pInfo[playerid][pDrugs] = 0;
pInfo[playerid][pMaterials] = 0;
pInfo[playerid][pHiddens] = 0;
pInfo[playerid][pAdmin] = 0;
pInfo[playerid][pHelper] = 0;
pInfo[playerid][pRespect] = 0;
pInfo[playerid][pHours] = 0;
pInfo[playerid][pCash] = 500000;
pInfo[playerid][pPremiumPoints] = 0;
pInfo[playerid][pLevel] = 0;
pInfo[playerid][pLogged] = 0;
pInfo[playerid][pPhoneNr] = 0;
pInfo[playerid][pEmail] = 0;
pInfo[playerid][pAge] = 0;
pInfo[playerid][pSex] = 0;
pInfo[playerid][pLanguage] = 0;
pInfo[playerid][pRentedHouse] = 0;
pInfo[playerid][pBankMoney] = 0;
pInfo[playerid][pPremiumAccount] = 0;
pInfo[playerid][pTreasurePoints] = 0;
pInfo[playerid][pMuted] = 0;
pInfo[playerid][pMutedTime] = 0;
pInfo[playerid][pGasCan] = 0;
pInfo[playerid][pIsRefuelling] = 0;
pInfo[playerid][pFireWorks] = 0;
pInfo[playerid][pPhonebook] = 0;
pInfo[playerid][pWanted] = 0;
pInfo[playerid][pWantedTime] = 0;
pInfo[playerid][pJailed] = 0;
pInfo[playerid][pJailTime] = 0;
pInfo[playerid][pBiz] = 0;
pInfo[playerid][pCarLic] = 0;
pInfo[playerid][pCarLicT] = 0;
pInfo[playerid][pCarLicSuspended] = 0;
pInfo[playerid][pGunLic] = 0;
pInfo[playerid][pGunLicT] = 0;
pInfo[playerid][pGunLicSuspended] = 0;
pInfo[playerid][pFlyLic] = 0;
pInfo[playerid][pFlyLicT] = 0;
pInfo[playerid][pBoatLic] = 0;
pInfo[playerid][pBoatLicT] = 0;
pInfo[playerid][pPayday] = 0;
pInfo[playerid][pJob] = 0;
pInfo[playerid][pRobSkill] = 1;
pInfo[playerid][pRobTimes] = 0;
pInfo[playerid][pRobRem] = 30;
pInfo[playerid][pTruckSkill] = 1;
pInfo[playerid][pTruckTimes] = 0;
pInfo[playerid][pTruckRem] = 26;
pInfo[playerid][pPizzaSkill] = 1;
pInfo[playerid][pPizzaTimes] = 0;
pInfo[playerid][pPizzaRem] = 26;
pInfo[playerid][pFishSkill] = 1;
pInfo[playerid][pFishTimes] = 0;
pInfo[playerid][pFishRem] = 26;
pInfo[playerid][pHackerSkill] = 1;
pInfo[playerid][pHackerTimes] = 0;
pInfo[playerid][pHackerRem] = 50;
pInfo[playerid][pBusSkill] = 1;
pInfo[playerid][pBusTimes] = 0;
pInfo[playerid][pBusRem] = 26;
pInfo[playerid][pGarbageSkill] = 1;
pInfo[playerid][pGarbageTimes] = 0;
pInfo[playerid][pGarbageRem] = 40;
pInfo[playerid][pFarmSkill] = 1;
pInfo[playerid][pFarmTimes] = 0;
pInfo[playerid][pFarmRem] = 26;
pInfo[playerid][pRobPoints] = 0;
pInfo[playerid][pSleeping] = 0;
pInfo[playerid][pRented] = 0;
pInfo[playerid][pWTalkie] = 0;
pInfo[playerid][pWTalkieChannel] = 0;
pInfo[playerid][pNewbieTimeout] = 0;
pInfo[playerid][pCredits] = 0;
pInfo[playerid][pFightingStyle] = 0;
pInfo[playerid][pCarSlots] = 3;
pInfo[playerid][pHudHealth] = 0;
pInfo[playerid][pHudArmour] = 0;
pInfo[playerid][pHudPayDays] = 0;
pInfo[playerid][pHudStatus] = 0;
pInfo[playerid][pHudSkills] = 0;
pInfo[playerid][pHudShowFPS] = 0;
for(new idd; idd < MAX_PERSONAL_VEHICLES; idd++)
{
pInfo[playerid][pCarID][idd] = 0;
pInfo[playerid][pCar][idd] = -1;
pInfo[playerid][pCarModel][idd] = 0;
pInfo[playerid][pCarLocX][idd] = 0.0;
pInfo[playerid][pCarLocY][idd] = 0.0;
pInfo[playerid][pCarLocZ][idd] = 0.0;
pInfo[playerid][pCarAngle][idd] = 0.0;
pInfo[playerid][pCarLLocX][idd] = 0.0;
pInfo[playerid][pCarLLocY][idd] = 0.0;
pInfo[playerid][pCarLLocZ][idd] = 0.0;
pInfo[playerid][pCarAngle2][idd] = 0.0;
pInfo[playerid][pCarBuyTime][idd] = 0;
pInfo[playerid][pCarColor1][idd] = 1;
pInfo[playerid][pCarColor2][idd] = 1;
pInfo[playerid][pCarLock][idd] = 0;
pInfo[playerid][pCarInsPrice][idd] = 0;
pInfo[playerid][pCarIns][idd] = 0;
pInfo[playerid][pCarKM][idd] = 0.0;
pInfo[playerid][pCarVIP][idd] = 0;
pInfo[playerid][pCarVipColors][idd] = 0;
pInfo[playerid][pCarKMLast][idd] = 0;
pInfo[playerid][pCarHP][idd] = 0.0;
pInfo[playerid][pCarDamage1][idd] = 0;
pInfo[playerid][pCarDamage2][idd] = 0;
pInfo[playerid][pCarDamage3][idd] = 0;
pInfo[playerid][pCarDamage4][idd] = 0;
pInfo[playerid][pCarGas][idd] = 0;
pInfo[playerid][pCarPaintJ][idd] = 6;
CarVipName[playerid][idd] = "";
CarPlate[playerid][idd] = "";
CarOwner[playerid][idd] = "";
}
BigEar[playerid] = 0;
InitFly(playerid);
GetPlayerName(playerid, pInfo[playerid][pName], MAX_PLAYER_NAME);
TogglePlayerSpectating(playerid, true);
ClearChatForPlayer(playerid);
SCM(playerid, COLOR_DEFAULT, ""alb"SERVER: "w"Welcome to OldStyle RPG");
GameTextForPlayer(playerid, "~w~Please wait.~n~~r~CHECKING BAN STATUS...", 2500, 3);
SetTimerEx("CheckUser", 2000, false, "i", playerid);
AntiABImmunity[playerid] = gettime() + 5;
return 1;
}
CheckUser:
Код:
public CheckUser(playerid)
{
new CheckBanQuery[255], rows;
mysql_format(Database, CheckBanQuery, sizeof(CheckBanQuery), "SELECT * FROM `bans` WHERE `Username`='%s'", pInfo[playerid][pName]);
mysql_query(Database, CheckBanQuery);
cache_get_row_count(rows);
if(rows)
{
new string[255];
cache_get_value_name(0, "Admin", bInfo[playerid][bAdmin], MAX_PLAYER_NAME);
cache_get_value_name(0, "ExpireOn", bInfo[playerid][bExpireOn], 255);
cache_get_value_name(0, "Reason", bInfo[playerid][bReason], 255);
cache_get_value_name(0, "Date", bInfo[playerid][bDate], 255);
cache_get_value_name(0, "Time", bInfo[playerid][bTime], 255);
format(string, sizeof(string), "This account (%s) is banned.", pInfo[playerid][pName]);
SCM(playerid, COLOR_BAN, string);
format(string, sizeof(string), "Banned by: %s on %d %d, reason: %s", bInfo[playerid][bAdmin], bInfo[playerid][bDate], bInfo[playerid][bTime], bInfo[playerid][bReason]);
SCM(playerid, COLOR_DEFAULT, string);
if(strcmp(bInfo[playerid][bExpireOn], "permanent", true) == 0)
{
SCM(playerid, COLOR_DEFAULT, "This is a permanent ban");
}
else
{
format(string, sizeof(string), "Ban will expire on %d %d", bInfo[playerid][bExpireOn], bInfo[playerid][bTime]);
SCM(playerid, COLOR_DEFAULT, string);
}
SCM(playerid, COLOR_DEFAULT, "Poti face o cerere de unban pe **PANEL**, daca consideri ca ai luat ban degeaba.");
KickEx(playerid);
return 1;
}
else
{
new UserCheckQuery[255];
mysql_format(Database, UserCheckQuery, sizeof(UserCheckQuery), "SELECT * FROM `users` WHERE `Username` = '%s'", pInfo[playerid][pName]);
mysql_query(Database, UserCheckQuery);
cache_get_row_count(rows);
if(rows)
{
cache_get_value_name(0, "Password", pInfo[playerid][pPassword], 65);
cache_get_value_name(0, "Salt", pInfo[playerid][pSalt], 11);
cache_get_value_int(0, "TutorialEnded", pInfo[playerid][pTutorialEnded]);
SCM(playerid, COLOR_WHITE, ""alb"SERVER: "w"You already have a registered account, please enter your password into the dialog box.");
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "SERVER: Login", "Welcome to OldStyle RPG.\n\nPlease enter your password below.", "Login", "Cancel");
}
else
{
SCM(playerid, COLOR_WHITE, ""alb"SERVER: "w"You aren't registered yet, please your desired password in the dialog box to register.");
ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, "SERVER: Registration", "Welcome to OldStyle RPG.\n\nPlease enter your desired password below.", "Register", "Cancel");
}
TextDrawShowForPlayer(playerid, Text:blackbox);
}
return 1;
}
After login it will go to LoadPlayerData