18.04.2014, 00:41
(
Последний раз редактировалось AiRaLoKa; 18.04.2014 в 01:35.
Причина: P.S.
)
hi all...
i got a problem with mysql
all of the players info is loaded, but some info won't save...
strings that won't save is "pPUH" and "dunno"
thhis is my MySQL Login stock
P.S.: i use BlueG's MySQL R5
i got a problem with mysql
all of the players info is loaded, but some info won't save...
strings that won't save is "pPUH" and "dunno"
thhis is my MySQL Login stock
Код:
stock MySQL_Login(playerid) { new Query[800], dunno; format(Query, sizeof(Query), "SELECT * FROM `PlayerData` WHERE Username = '%s'", pName(playerid)); mysql_query(Query); mysql_store_result(); mysql_fetch_row_format(Query, "|"); //sscanf(Query, "e<p<|>s[24]s[128]iiiiii",pInfo[playerid]); sscanf(Query, "p<|>s[24]s[128]iiiiiiiiiiiiii", pInfo[playerid][pUsername], pInfo[playerid][pPassword], pInfo[playerid][pLanguage], pInfo[playerid][pSkin], pInfo[playerid][pGodmode], AutoRepair[playerid], pInfo[playerid][pMoney], pInfo[playerid][pAdminLevel], pInfo[playerid][pVipLevel], pInfo[playerid][pHour], pInfo[playerid][pMin], pInfo[playerid][pSec], pInfo[playerid][pKills], pInfo[playerid][pDeaths], pInfo[playerid][pPUH], dunno); printf("%s",Query); pInfo[playerid][pLogged] = 1; CheckBan(playerid); SetPlayerSkin(playerid, pInfo[playerid][pSkin]); SetPlayerScore(playerid, dunno); playedtimer[playerid] = SetTimerEx("TimeOnServer", 1000, 1, "i", playerid); new Float:kd = floatdiv(pInfo[playerid][pKills], pInfo[playerid][pDeaths]); new str1[300],str2[300]; format(str1,sizeof(str1),"User Name %s\nKill Deah Ratio %0.2f (KDR)\nPlayed for %i Hours %i Mins %i Secs\nMoney %i\nAdmin Level %i\nVip Level %i\nWarnings %i\nKill %i\nDeaths %i\nPickup Found %i", pName(playerid),kd,pInfo[playerid][pHour],pInfo[playerid][pMin],pInfo[playerid][pSec],pInfo[playerid][pMoney],pInfo[playerid][pAdminLevel],pInfo[playerid][pVipLevel],pInfo[playerid][pWarnings],pInfo[playerid][pKills],pInfo[playerid][pDeaths],pInfo[playerid][pPUH]); format(str1,sizeof(str1),"Nama Pengguna %s\nKill Deah Rasio %0.2f (KDR)\nBermain selama %i Jam %i Menit %i Detik\nCash %i\nLevel Admin %i\nLevel Vip %i\nPeringatan %i\nMati %i\nMembunuh %i\nMenemukan Pickup %i", pName(playerid),kd,pInfo[playerid][pHour],pInfo[playerid][pMin],pInfo[playerid][pSec],pInfo[playerid][pMoney],pInfo[playerid][pAdminLevel],pInfo[playerid][pVipLevel],pInfo[playerid][pWarnings],pInfo[playerid][pKills],pInfo[playerid][pDeaths],pInfo[playerid][pPUH]); ShowPlayerDialogLang(playerid, DIALOG_STATISTIC, DIALOG_STYLE_MSGBOX, "Stats","Statistik", str1, str2, "Play","Main","",""); PlayerLang[playerid] = pInfo[playerid][pLanguage]; mysql_free_result(); return 1; }