Page 1 of 1

Spawn Teleport Problem

Posted: Tue Sep 10, 2019 2:28 pm
by Painkiller
I'd like to see that every mapchange gets spawn out of the air.

is there a possibility there?

The problem is that you spawnt on the ground with every map.

Syntax: Select all

@Event('player_spawn')
def _br_player_spawn(event):
player = Player.from_userid(event['userid'])
player.set_noblock(True)
if player.index not in internal_db['player_indexs'] and not internal_db['prepare_mode']:
SayText2('\x03[BattleRoyale] You cannot spawn yet please wait!').send(player.index)
player.set_team(1)
local_database_load()

def teleport_spawn(player):
player.teleport(internal_db['center'] + Vector(0, 0, int(SETTINGS['Settings']['spawn_height'])), None,
Vector(randint(-800, 800), randint(-800, 800), 500))
player.delay(2, noblock_spawn, args=(player,))


def noblock_spawn(player):
player.set_noblock(True)