18.11.2015, 20:04
Try it
PHP код:
stock LoadDataString(playerid)
{
new query[300], pName[24], savingstr1[10], savingstr2[10];
GetPlayerName(playerid, pName, 24);
format(query, sizeof(query), "SELECT * FROM `playerchar` WHERE `charname` = '%s'", pName);
mysql_query(query);
mysql_store_result();
while(mysql_fetch_row_format(query,"|"))
{
mysql_fetch_field_row(savingstr1, "username");
strmid(PlayerInfo[playerid][uName], savingstr1, 0, strlen(savingstr1));
mysql_fetch_field_row(savingstr2, "origin");
strmid(PlayerInfo[playerid][pOrigin], savingstr2, 0, strlen(savingstr2));
}
mysql_free_result();
}