27.01.2014, 06:37
hi i have this code:
but even admin is online it says offline and doesnt show ReplaceAdminName
Quote:
CMD:adminai(playerid,params[]) { new Index, query[ 300 ], str [ 1200 ]; mysql_query( "SELECT `vardas`,`admin`,`online` FROM `zaidejai` WHERE `admin` > '0'" ); mysql_store_result(); if ( mysql_num_rows( )) { while( mysql_fetch_row( query )) { new name[ MAX_PLAYER_NAME ], adminid, OnlineEx; sscanf( query, "p<|>s[24]ii", name, adminid, OnlineEx ); if ( !OnlineEx ) { format( str, 1200, "{FFFFFF}%s%s - %s - {FF0000}OFFLINE\n{FFFFFF}", str, name, ReplaceAdminName( adminid ) ); Index++; } else { format( str, 1200, "{FFFFFF}%s%s - %s - {00FF00}ONLINE\n{FFFFFF}", str, name, ReplaceAdminName( adminid ) ); Index++; } } } mysql_free_result(); if ( !Index ) { ShowPlayerDialog( playerid, 2501, DIALOG_STYLE_MSGBOX, "{FF0000}Adminai", "{FF0000}Atsiprasome siuo metu nera isrinktas nei vienas direktorius!", "Gerai", "" ); } else { ShowPlayerDialog( playerid, 2502, DIALOG_STYLE_MSGBOX, "{00FF00}Adminai", str, "Gerai", "" ); } return 1; } |