I have two questions regarding to PySnip / pyspades scripts.
1. How can i change the amount of blocks for the given player without refilling all weapons and grenades? self.blocks = 50 doesn't work for me. While this actually sets blocks instance variable to 50, this value will not affect the GUI's value and when it reaches 0, we can't place blocks anymore. I want to give the player an infinite amount of blocks in some cases.
2. I want to write a script with ability to revive players.
Code: Select all
Yes, the player will revived, but the game's respawn counter will not change and when it reaches 0, the player will be moved to the spawn location again. What can i do to change this effect?def on_position_update(self):
x, y, z = self.get_location()
for player in self.protocol.players.values():
xa, ya, za = player.get_location()
if self.team == player.team and 5 > xa-x > -5 and 5 > ya-y > -5 and 5 > za-z > -5:
if player.hp is None:
player.spawn(player.get_location())
return connection.on_position_update(self)