20.06.2012, 12:10
(
Последний раз редактировалось Jstylezzz; 21.06.2012 в 13:24.
)
Hi eveyone,
It seems that something is wrong in my loadstats function, but i just don't get what is going on..
Does anyone see the error?
Every help is appreciated!
It seems that something is wrong in my loadstats function, but i just don't get what is going on..
Does anyone see the error?
Every help is appreciated!
pawn Код:
stock LoadStats(playerid)
{
new pName[24],Query[80];
GetPlayerName(playerid,pName,24);
format(Query, sizeof(Query), "SELECT * FROM `Users` WHERE `Username` = '%s' ", pName);
mysql_query(Query);
mysql_store_result();
mysql_fetch_row_format(Query, "|");
sscanf(Query, "e<p<|>s[60]s[60]iiiiiiiiiiiiiiiiiiiiiiiiis[128]iis[128]s[128]s[128]ii>", PInfo[playerid]);
mysql_free_result();
GivePlayerMoney(playerid,PInfo[playerid][Money]);
SetPVarInt(playerid,"Score",PInfo[playerid][Level]);
SetPlayerScore(playerid,PInfo[playerid][Level]);
SetPVarInt(playerid,"Level",PInfo[playerid][Admin]);
SetPVarInt(playerid,"Helper",PInfo[playerid][Helper]);
SetPlayerSkin(playerid,PInfo[playerid][Skin]);
SetPVarInt(playerid,"Kills",PInfo[playerid][Kills]);
SetPVarInt(playerid,"Deaths",PInfo[playerid][Deaths]);
SetPVarInt(playerid,"Muted",PInfo[playerid][Muted]);
SetPVarInt(playerid,"HasCell",PInfo[playerid][Cell]);
SetPVarInt(playerid,"HasCigs",PInfo[playerid][Cigs]);
SetPVarInt(playerid,"HasWatch",PInfo[playerid][Watch]);
SetPVarInt(playerid,"HasMask",PInfo[playerid][Mask]);
SetPVarInt(playerid,"GasCan",PInfo[playerid][GasCan]);
SetPVarInt(playerid,"HasSprunk",PInfo[playerid][Sprunk]);
SetPVarInt(playerid,"HasStereo",PInfo[playerid][Stereo]);
SetPVarInt(playerid,"GoldCoins",PInfo[playerid][GoldCoins]);
SetPVarInt(playerid,"PMethod",PInfo[playerid][PaymentMethod]);
SetPVarInt(playerid,"Skin",PInfo[playerid][Skin]);
return 1;
}