Example #1
0
def voteMap(caller,name,mode=None):
        """This command works just like the /map command except for with #map the caller can also call maps from /storage/maps. This calls the map from the server removing the need to /sendmap (as long as the maps are the same version). """
	if mode is None:
		mode=sbserver.gameMode()
	mode=modeNumber(mode)
	
	sbserver.setMap(name,mode)
	
	#load the map if it exists and mode is coop
	if modeNumber("coop")==mode:
		try:
			loadmap(caller,name)
		except:
			pass
	
	return name
Example #2
0
def changeMap(caller,name,mode=None):
	"""Same as the /map command."""
	if mode is None:
		mode=sbserver.gameMode()
	mode=modeNumber(mode)

	sbserver.setMap(name,mode)

	#load the map if it exists and mode is coop
	if modeNumber("coop")==mode:
		try:
			loadmap(caller,name)
		except:
			pass
	
	return name
Example #3
0
def changeMap(caller,name,mode=None):
        """This command works just like the #map command except rather than directly going to a map it places a vote for the map of choice. Just like with #map, the caller can also call maps from /storage/maps. This calls the map from the server removing the need to /sendmap (as long as the maps are the same version)."""
	if mode is None:
		mode=sbserver.gameMode()
	triggerServerEvent("vote_map",[caller,modeNumber(mode),name])
Example #4
0
def voteMap(caller,name,mode=None):
	"""Places a vote for the map of choice. This can be used to call maps from /storage/maps."""
	if mode is None:
		mode=sbserver.gameMode()
	triggerServerEvent("vote_map",[caller,modeNumber(mode),name])