11.08.2011, 17:25
Oh, my fault, sorry
Код:
stock InitConnection(playerid) { new Query[90], EscName[MAX_PLAYER_NAME]; mysql_real_escape_string(pName(playerid), EscName); format(Query, sizeof(Query), "SELECT * FROM `playerinfo` WHERE `Nick` = '%s'", EscName); mysql_query(Query); mysql_store_result(); if(mysql_num_rows() != 0) { SendClientMessage(playerid, COLOUR_WHITE, "[!] Loading ur infos from DB..."); LoadPlayerInfo(playerid); } else { SendClientMessage(playerid, COLOUR_WHITE, "[!] Creating ur table in the DB..."); format(Query, sizeof(Query), "INSERT INTO `playerinfo` (`Nick`) VALUES ('%s')", EscName); mysql_query(Query); } mysql_free_result(); }