_=Gigant=_
Известный
- 144
- 225
Lesson number 1:
Код:void CALLBACK cmd_show_info_player( std::string param ) { if ( param.empty() ) return; int i = std::stoi( param ); char buf[128]; stRemotePlayer *pPlayer = SF->getSAMP()->getPlayers()->pRemotePlayer[ i ]; if(!pPlayer) return; sprintf( buf, "Nickname - %s, Ping - %d, Score - %d, isNPC - %d, AFKState - %d", pPlayer->szPlayerName, pPlayer->iPing, pPlayer->iScore, pPlayer->iIsNPC, pPlayer->pPlayerData->iAFKState == 2 ); SF->getSAMP()->getChat()->AddChatMessage( -1, buf ); }; And in Mainloop: SF->getSAMP()->registerChatCommand( "showinfo", cmd_show_info_player );
Expample for you:
Код:stRemotePlayer *pPlayer = SF->getSAMP()->getPlayers()->pRemotePlayer[ Informer_Target_PlayerID ]; if(!pPlayer) return; sprintf(ctarget_ping_score, "{8cff00}Ping{FFFFFF} %d{007bff} Score{FFFFFF} %d ", pPlayer->iPing, pPlayer->iScore);
What kind of font do you use?
im using
pD3DFont_sampStuff
CD3DFont *pD3DFont_sampStuff = new CD3DFont( "Tahoma", 10, FCR_BORDER );