19.08.2012, 23:54
pawn Код:
stock getPlayerSecret(playerid)
{
new
Query[ 128 ],
DBResult: Result,
pName[ MAX_PLAYER_NAME ],
Res[ 50 ]
;
GetPlayerName(playerid, pName, sizeof(pName));
format(Query, sizeof(Query), "SELECT SQ FROM `Accounts` WHERE `NAME` = '%s' COLLATE NOCASE LIMIT 1;", pName);
Result = db_query(DATABASE, Query);
db_get_field_assoc(Result, "SQ", Res, sizeof(Res));
db_free_result(Result);
return Res;
}