Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <vector>
- CON_COMMAND(ms_mimic, "name borrowing")
- {
- char tmp[50];
- int playerCount = 0;
- std::vector<std::string> nameList;
- nameList.clear();
- int playerCount = 0;
- for (int i=0;i<clientEntList->GetHighestEntityIndex();i++)
- {
- player_info_t pinfo;
- engine->GetPlayerInfo(i, &pinfo);
- if(i>31 || pinfo.name[0] == NULL)
- continue;
- nameList[playerCount] = pinfo.name;
- playerCount++;
- Msg("Player Name Found: \t%s \n", nameList[playerCount]);
- }
- // Print this to debug before trying to set your name to it. -> nameList[rand()%playerCount]
- }
Add Comment
Please, Sign In to add comment