Quote:
Originally Posted by pds2k12
What the fuck are you doing? your code is totally WRONG! where did you learn that from? *lol'ing* - the code below should work, 99.9% positive.
pawn Код:
stock MySQL_Login(playerid) { new Query[ 500 ];
new EscapedName[ MAX_PLAYER_NAME ]; mysql_escape_string( pInfo[playerid][Nick], EscapedName );
format( Query, sizeof( Query ), "SELECT * FROM `playerdata` WHERE `nick` COLLATE latin1_general_cs = '%s'", EscapedName ); mysql_query( Query );
mysql_store_result( ); if( mysql_num_rows( ) ) { if( mysql_fetch_row_format( Query, "|" ) ) { sscanf(Query, "p<|>iiiiii", pInfo[playerid][ID], pInfo[playerid][pAdmin], pInfo[playerid][pScore], pInfo[playerid][pMoney], pInfo[playerid][pKills], pInfo[playerid][pDeaths]); } } mysql_free_result( ); return pInfo[playerid][Logged] = 1; }
|
I think the problem is my script itself, because this aint working either or i just forgot something.
Once i login i should be admin level 5 which i'm not. While i am on the database.