28.07.2012, 16:38
pawn Код:
new Query[256],pName[MAX_PLAYER_NAME],Lang[3],Admin[3],VIP[3];
GetPlayerName(playerid,pName,24);
format(Query,sizeof(Query),"SELECT * FROM `users_drift` WHERE username = '%s' LIMIT 1",pName);
mysql_query(Query);
mysql_store_result();
mysql_retrieve_row();
mysql_get_field("Lang",Lang);
mysql_get_field("Admin",Admin);
mysql_get_field("VIP",VIP);
if(mysql_num_rows() == 1){
player_Language[playerid] = strval(Lang);
player_Admin[playerid] = strval(Admin);
player_VIP[playerid] = strval(VIP);
print(player_Language[playerid]);
print(player_Admin[playerid]);
print(player_VIP[playerid]);
}
else
{
// do nothing
}