The scenario is like this. I have a simple /freeon command to run a custom callvote that then if passed resolves by echo to change gamemode to freemode and so on. But now when I do /freeon nothing happens. It goes so far as to start a vote on server but thats it. Trying it again ends up in exception due to vote already running. (my fault since code doesnt check for running votes before trying to call one)
But after trying /freeon and then dumping the getCurrentCallVote gives this...
Code: Select all
DedicatedApi\Structures\Vote Object
(
[status] =>
[callerLogin] =>
[cmdName] => Echo
[cmdParam] => Change gamemode to free Mode?, baz_freeonvote
)
this is the code for setting up the vote.
Code: Select all
$vote = new \DedicatedApi\Structures\Vote();
$vote->cmdName = 'Echo';
$vote->cmdParam = array('Change gamemode to free Mode?', 'baz_freeonvote');
$this->connection->callVote($vote, 0.5, 30000, 1);