char* CNWNXNames::OnRequest(char* gameObject, char* Request, char* Parameters) { Log(2, "Request: \"%s\"\n", Request); Log(2, "Params: \"%s\"\n", Parameters); this->pGameObject = gameObject; this->nGameObjectID = *(dword *)(gameObject + 0x4); if (strncmp(Request, "INITPLAYERNAMELIST", 18) == 0) { InitPlayerList(Parameters); return NULL; } else if (strncmp(Request, "GETDYNAMICNAME", 14) == 0) { return GetDynamicName(Parameters); } else if (strncmp(Request, "SETDYNAMICNAME", 14) == 0) { SetDynamicName(Parameters); return NULL; } else if (strncmp(Request, "UPDATEDYNAMICNAME", 17) == 0) { UpdateDynamicName(Parameters); return NULL; } else if (strncmp(Request, "UPDATEPLAYERLIST", 16) == 0) { UpdatePlayerList(Parameters); return NULL; } else if (strncmp(Request, "DELETEDYNAMICNAME", 17) == 0) { DeleteDynamicName(Parameters); return NULL; } else if (strncmp(Request, "CLEARPLAYERNAMELIST", 19) == 0) { ClearPlayerList(Parameters); return NULL; } else if (strncmp(Request, "SETNAMESENABLED", 15) == 0) { EnableDisableNames(Parameters); return NULL; } return NULL; }
void SMOnlineRoom::PopulatePlayersList() { unsigned int numClients = m_clients.size(); unsigned int numPlayers; ClearPlayerList(); for (unsigned int x = 0; x < numClients; x++) { numPlayers = m_clients[x]->GetNumPlayers(); for (unsigned int y = 0; y < numPlayers; y++) { m_PlayersList.push_back(m_clients[x]->GetPlayer(y)); } } }
~VideoPlayerCommandPrivate() { ClearPlayerList(); }