PHP Vote
Posted: Sun Dec 14, 2014 3:53 pm
Hello,
I would like to make map vote to game with php!
Vote should go like this
• Team B removes one of the 7 maps;
• Team A removes one of the 6 remaining maps;
• Team B removes one of the 5 remaining maps;
• Team A removes one of the 4 remaining maps;
• Team B removes one of the 3 remaining maps;
• Team A picks the map to be played on;
The last map remaining will be discarded.
Problem is that i don't know how i can remove map from array when its voted like if somebody uses "!map test" that the map would be removed and last map will be used
$maps = $array = array(test1, "test2", test3, "test4", "test5");
print_r(array_count_values($array));
or how could i remove from list?
$maps = \folder\Config\Config::getInstance()->getMaps();
I would like to make map vote to game with php!
Vote should go like this
• Team B removes one of the 7 maps;
• Team A removes one of the 6 remaining maps;
• Team B removes one of the 5 remaining maps;
• Team A removes one of the 4 remaining maps;
• Team B removes one of the 3 remaining maps;
• Team A picks the map to be played on;
The last map remaining will be discarded.
Problem is that i don't know how i can remove map from array when its voted like if somebody uses "!map test" that the map would be removed and last map will be used
$maps = $array = array(test1, "test2", test3, "test4", "test5");
print_r(array_count_values($array));
or how could i remove from list?
$maps = \folder\Config\Config::getInstance()->getMaps();