06.07.2015, 16:51
Код:
WP_Hash(hashpass, sizeof(hashpass), inputtext); if(!strcmp(hashpass, pData[playerid][pPass])) { mysql_format(mysql, query, sizeof(query), "SELECT * FROM `accs` WHERE `pName` = '%e' LIMIT 1", PlayerName(playerid)); mysql_tquery(mysql, query, "OnAccountLoad", "i", playerid); }
Код:
forward OnAccountLoad(playerid); public OnAccountLoad(playerid) { new Float:tempstr = cache_get_field_content_float(0, "pPosX"); printf("%f print1", tempstr); printf("%f print2", cache_get_field_content_float(0, "pPosX")); 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; }