void vivod2 ( void ) { for ( int i = 0 ; i getSAMP ( ) -> getPlayers ( ) -> iIsListed [ i ] ) { SF -> getSAMP ( ) -> getChat ( ) -> AddChatMessage ( - 1 , "Ник: %s [%d]" ) , SF -> getSAMP ( ) -> getPlayers ( ) -> GetPlayerName ( i ) , i ; } } } void CALLBACK vivod1 ( std :: string str ) { vivod2 ( ) ; } void CALLBACK mainloop ( ) { static bool init = false ; if ( ! init ) { if ( GAME == nullptr ) return ; if ( GAME -> GetSystemState ( ) != eSystemState :: GS_PLAYING_GAME ) return ; if ( ! SF -> getSAMP ( ) -> IsInitialized ( ) ) return ; SF -> getSAMP ( ) -> registerChatCommand ( "vivod" , vivod1 ) ; init = true ; } }
SF -> getSAMP ( ) -> getChat ( ) -> AddChatMessage ( - 1 , "Ник: %s [%d]" , SF -> getSAMP ( ) -> getPlayers ( ) -> GetPlayerName ( i ) , i ) ;