09.06.2012, 15:12
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[24]s[23]i>", PInfo[playerid]);
mysql_free_result();
GivePlayerMoney(playerid,PInfo[playerid][Money]);
SetSpawnInfo(playerid, 0, 297, UserStats[playerid][X], UserStats[playerid][Y], UserStats[playerid][Z], 10, 0,0,0,0,0,0);
SpawnPlayer(playerid);
return 1;
}