31.05.2012, 14:20
pawn Код:
stock MySQL_Login(playerid)
{
GivePlayerMoney(playerid,16000);
new query[128], pname[24], savingstring[20];
GetPlayerName(playerid, pname, 24);
format(query, sizeof(query), "SELECT * FROM `PlayerData` WHERE `Name` = '%s'", pname);
mysql_query(query);
mysql_store_result();
while(mysql_fetch_row(query,"|"))
{
mysql_fetch_field("Score", savingstring); SetPlayerScore(playerid, strval(savingstring));
mysql_fetch_field("PlayerLevel", savingstring); APlayerData[playerid][PlayerLevel] = strval(savingstring);
//mysql_fetch_field("OFWarns", savingstring); APlayerData[playerid][OFWarns] = strval(savingstring);
}
mysql_free_result();
return 1;
}