06.03.2010, 04:06
pawn Код:
new playername[MAX_PLAYER_NAME], query[128];
GetPlayerName(playerid, playername, sizeof(playername));
mysql_real_escape(playername, playername);
format(query, sizeof(query), "SELECT * FROM `usuarios` WHERE UserName = '%s'", playername);
mysql_query(query);
mysql_store_result();
if(mysql_num_rows() == 1) PlayerInfo[playerid][Registered] = 1;
else PlayerInfo[playerid][Registered] = 0;
mysql_free_result();