06.07.2015, 14:19
Heyo, trying to load accounts with cache system but it somehow doesn't?
The saving works, account gets updated, login+register with password works but somehow using caches it doesn't work!
What did I do wrong!
The saving works, account gets updated, login+register with password works but somehow using caches it doesn't work!
Код:
forward OnAccountLoad(playerid); public OnAccountLoad(playerid) { GetPlayerIp(playerid, pData[playerid][pIP], 16); pData[playerid][pLevel] = cache_get_field_content_int(0, "pLevel"); pData[playerid][pRespect] = cache_get_field_content_int(0, "pRespect"); pData[playerid][pSkin] = cache_get_field_content_int(0, "pSkin"); pData[playerid][pAdmin] = cache_get_field_content_int(0, "pAdmin"); pData[playerid][pVIP] = cache_get_field_content_int(0, "pVIP"); pData[playerid][pMoney] = cache_get_field_content_int(0, "pMoney"); pData[playerid][pGender] = cache_get_field_content_int(0, "pGender"); pData[playerid][pAge] = cache_get_field_content_int(0, "pAge"); pData[playerid][pBank] = cache_get_field_content_int(0, "pBank"); pData[playerid][pBanned] = cache_get_field_content_int(0, "pBanned"); pData[playerid][pBans] = cache_get_field_content_int(0, "pBans"); cache_get_field_content(0, "pBannedBy", pData[playerid][pBannedBy], mysql, MAX_PLAYER_NAME); cache_get_field_content(0, "pBanReason", pData[playerid][pBanReason], mysql, 130); cache_get_field_content(0, "pBanDate", pData[playerid][pBanDate], mysql, 32); cache_get_field_content(0, "pBanTime", pData[playerid][pBanTime], mysql, 32); pData[playerid][pBanAppealable] = cache_get_field_content_int(0, "pBanAppealable"); pData[playerid][pFaction] = cache_get_field_content_int(0, "pFaction"); pData[playerid][pRank] = cache_get_field_content_int(0, "pRank"); pData[playerid][pFacSkin] = cache_get_field_content_int(0, "pFacSkin"); pData[playerid][pPosX] = cache_get_field_content_float(0, "pPosX"); pData[playerid][pPosY] = cache_get_field_content_float(0, "pPosY"); pData[playerid][pPosZ] = cache_get_field_content_float(0, "pPosZ"); pData[playerid][pPosA] = cache_get_field_content_float(0, "pPosA"); pData[playerid][pTester] = cache_get_field_content_int(0, "pTester"); pData[playerid][pTutStep] = cache_get_field_content_int(0, "pTutStep"); pData[playerid][pFinishedTut] = cache_get_field_content_int(0, "pFinishedTut"); pData[playerid][pMuted] = cache_get_field_content_int(0, "pMuted"); gPlayerLogged[playerid] = 1; GivePlayerMoney(playerid, pData[playerid][pMoney]); SendClientMessage(playerid, COLOR_HAPPYGREEN, "You're ready to play! Hit the spawn button to begin!"); return 1; }