Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
1.0 kB
5
Indexable
Never
else if (actual_command == "/status" && pInfo(peer)->mod >= 1) {
		long long int AN = 0, IOS = 0, PC = 0;
		string players = "";
		for (ENetPeer* currentPeer = server->peers; currentPeer < &server->peers[server->peerCount]; ++currentPeer) {
			if (currentPeer->state != ENET_PEER_STATE_CONNECTED or currentPeer->data == NULL or pInfo(currentPeer)->tankIDName == "") continue;
			if (pInfo(currentPeer)->platformid == "4") AN += 1;
			if (pInfo(currentPeer)->platformid == "0,1,1" || pInfo(currentPeer)->platformid == "0") PC += 1;
			if (pInfo(currentPeer)->platformid == "1") IOS += 1;
		    players += boosterTag(currentPeer) + adminTag(pInfo(currentPeer)->adminLevel) + pInfo(currentPeer)->tankIDName + " `o(" + pInfo(currentPeer)->world + ")``, ";
		}
		gamepacket_t p;
		p.Insert("OnConsoleMessage");
		p.Insert("`o(PC: " + to_string(PC * 6 -1) + ", Android: " + to_string(AN * 6 -1) + ", IOS: " + to_string(IOS * 6 -1) + "):`` "+ players +" `o(50'den fazla oyuncu gosterilemez)");
		p.CreatePacket(peer);
	}