26.04.2011, 18:55
Meybe this work:
pawn Код:
stock MySQLLoadVariables(playerid)
{
new
Query[500],
Name[MAX_PLAYER_NAME]
;
GetPlayerName(playerid,Name,MAX_PLAYER_NAME);
format(Query,sizeof(Query),"SELECT * FROM `users` WHERE `username` = '%s'",Name);
mysql_query(Query);
mysql_store_result();
mysql_fetch_row_format(Query,"|");
sscanf(Query, "p<|>dddddddddddd",PlayerInfo[playerid][pCash],PlayerInfo[playerid][pAccount],PlayerInfo[playerid][pAdmin],PlayerInfo[playerid][pLevel],PlayerInfo[playerid][pExp],PlayerInfo[playerid][gPupgrade],PlayerInfo[playerid][pKills],PlayerInfo[playerid][pGun1],PlayerInfo[playerid][pGun2],PlayerInfo[playerid][pGun3],PlayerInfo[playerid][pAmmo1],PlayerInfo[playerid][pAmmo2]);
mysql_free_result();
}