12.09.2013, 19:31
Код:
stock GetAccountID(playerid) { new query[128], name[30]; GetPlayerName(playerid,name,sizeof(name)); format(query, sizeof(query),"SELECT `ID` FROM `players` WHERE `Name` = '%s'", name); mysql_query(query); mysql_store_result(); if(mysql_num_rows() == 1) { PlayerInfo[playerid][pID] = mysql_fetch_int(); mysql_free_result(); return PlayerInfo[playerid][pID]; } return 0; }