due to how the commands are sent to Frostbite engine, the self.console.write method works differently for games based on Frostbite engines.
usually you would send a rcon command (let say "/rcon say hello") with : self.console.write("say hello")
with Frostbite, if you want to send the 'vars.vehicleSpawnAllowed 0' command, you have to separate the command from its arguments. In this case, the command is "'vars.vehicleSpawnAllowed" and there is 1 parameter : "0".
To send this to the Frosbite engine, you use pile up the command and its parameters into a tuple or list python structure and you pass that structure to the self.console.write.
I.E.:
self.console.(['vars.vehicleSpawnAllowed', '0']) # here we use a python list
or
self.console.(('vars.vehicleSpawnAllowed', '0')) # and here a python tuple
What can be confusing is the way you write a tuple of one element in python.
Let say I want to get a tuple of the single element "foo", if I write
myvar = ("foo")type(myvar) will reply "str"
one correct way to make a tuple of one element is :
myvar = tuple("foo") and type(myvar) is 'tuple' as expected.
another way to get the same tuple is :
myvar = ("foo",) notice the comma just before closing the tuple
to sum up :
assert type(("foo",)) == tuple
assert type(tuple("foo")) == tuple
assert type(("foo")) != tuple
I suggest you play a bit with tuple with dreampie
in your code :self.console.write(('vars.vehicleSpawnAllowed 0'))
should be
self.console.write(('vars.vehicleSpawnAllowed', 0))