Hi, I'm trying to set spawn locations for the Titanic map, I want each team to spawn on opposite ends of the ship. At the moment the bases and flags are where I want them, but the players are still spawning normally... I can't see what I'm doing wrong...
- Code: Select all
name = 'TITANIC'
version = '1.0'
author = 'Buffet_of_Lies, Serious_Sim, Nestoflo'
description = 'A Night To Remember'
# scripting
from pyspades.constants import *
from pyspades.server import ServerConnection
def get_entity_location(team, entity_id):
if entity_id == BLUE_FLAG:
return (246, 399, 42)
if entity_id == BLUE_BASE:
return (262, 401, 42)
if entity_id == GREEN_FLAG:
return (259, 110, 41)
if entity_id == GREEN_BASE:
return (250, 111, 41)
def get_spawn_location(connection):
if connection.team is connection.protocol.blue_team:
x, y, z = ServerConnection.get_spawn_location(connection)
return ServerConnection.set_location_safe(connection, (263, 401, 42))
if connection.team is connection.protocol.green_team:
x, y, z = ServerConnection.get_spawn_location(connection)
return ServerConnection.set_location_safe(connection, (251, 111, 41))