08.09.2010, 06:25
Hello,
This is my code:
The username field is working perfectly, but the admin field (int) is not working, it is storing "48" into the playerStats[playerid][pAdmin] section.....
Thanks if anyone can help...
this is the wiki for my mysql plugin im using:
https://sampwiki.blast.hk/wiki/MySQL
This is my code:
Код:
//-----Put data from table into PlayerStats variable-----
format(query, sizeof(query), "SELECT * FROM accounts WHERE username='%s'", playername);
mysql_query(query);
mysql_store_result();
while(mysql_retrieve_row()){ //***************************************FINISH THIS .... look for a MYSQL RP script on forums!***********8
new data[256];
mysql_fetch_field_row(data, "username");
playerStats[playerid][pUsername] = strval(data);
printf("username: %s", data);
mysql_fetch_field_row(data, "admin");
playerStats[playerid][pAdmin] = strval(data);
printf("admin: %d", data);
}
mysql_free_result();
Thanks if anyone can help...
this is the wiki for my mysql plugin im using:
https://sampwiki.blast.hk/wiki/MySQL

