Spawn Teleport Problem

Please post any questions about developing your plugin here. Please use the search function before posting!
User avatar
Painkiller
Senior Member
Posts: 490
Joined: Sun Mar 01, 2015 8:09 am
Location: Germany
Contact:

Spawn Teleport Problem

Postby Painkiller » Tue Sep 10, 2019 2:28 pm

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)
User avatar
Sam
Junior Member
Posts: 26
Joined: Tue Jul 03, 2018 3:00 pm
Location: Russian Federation
Contact:

Re: Spawn Teleport Problem

Postby Sam » Wed Oct 16, 2019 3:30 pm

Ammmm?... Mod(vec[ z ])?
It's a trap!

Return to “Plugin Development Support”

Who is online

Users browsing this forum: No registered users and 5 guests