MySQL problem
#1

hi all...

i using BlueG's mysql r5. i got a problem here. When the player login and spawned, the saved skin doesn't changed. but the other setting is just fine (exept auto repair and godmode) can anyone help me?

Код:
stock MySQL_Login(playerid)
{
    new Query[600];
	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]iiiiiiiiiiii",
					pInfo[playerid][pUsername],
					pInfo[playerid][pPassword],
					pInfo[playerid][pLanguage],
					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][pSkin],
					pInfo[playerid][pGodmode],
					AutoRepair[playerid]);
    mysql_free_result();
	printf("%s",Query);
    pInfo[playerid][pLogged] = 1;
    CheckBan(playerid);
    SetPlayerSkin(playerid, pInfo[playerid][pSkin]);
    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",
	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]);
    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",
	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]);

	ShowPlayerDialogLang(playerid, 8741, DIALOG_STYLE_MSGBOX, "Stats","Statistik", str1, str2, "Play","Main","","");
	return 1;
}
P.S.: Sorry for my bad english
Reply
#2

bump!

solved.

i only move the mysql_free_result(); into the the last of stock before return 1;
Reply
#3

Was literally going to post to say that aha!
Reply
#4

i know that.,.,
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)