06.12.2011, 12:33
change onplayerconnect code to
GetPlayerName( playerid, strPlayerName, sizeof( strPlayerName ) );
format( strQuery, sizeof( strQuery ), "SELECT * FROM players WHERE name='%s'", strPlayerName );
mysql_query( strQuery );
mysql_store_result();
while( mysql_fetch_row_format( strQuery,"|" ) )
{
sscanf( strQuery, "p<|>i",strSavedString ); PlayerInfo[playerid][pAdminLevel] = strSavedString;
}
mysql_free_result();
should work now
GetPlayerName( playerid, strPlayerName, sizeof( strPlayerName ) );
format( strQuery, sizeof( strQuery ), "SELECT * FROM players WHERE name='%s'", strPlayerName );
mysql_query( strQuery );
mysql_store_result();
while( mysql_fetch_row_format( strQuery,"|" ) )
{
sscanf( strQuery, "p<|>i",strSavedString ); PlayerInfo[playerid][pAdminLevel] = strSavedString;
}
mysql_free_result();
should work now