I searched several hours the forum and your wiki about how to simply respawn a player. I just followed all older topics (from 2012 to 2015) and tried to get it working with the latest prebuilt binary files (downloaded today). All I got so far is a simply none working respawn (or a server crash at all).
This is the last code I tried (copied from other threads around here):
Code: Select all
def respawnPlayer(self, player):
playerEnt = Player(player)
playerEnt.set_property_int('m_iPlayerState', 0)
playerEnt.set_property_int('m_lifeState', 512)
playerEnt.respawn()
Would be great if someone could help me :)
At least I got another question directly related to this one: If only two players on the server and one dies the round will end. But I wanted an "endless" round only end after round time limit. Is there a way to get that stuff working (without having to spawn 2 bots and keep them hidden under the map or somewhere else)?
Thanks!