def zombie_end_round_event(condition): for info_map_parameters in EntityIter('info_map_parameters', return_types='entity'): break else: info_map_parameters = BaseEntity(create_entity('info_map_parameters')) info_map_parameters.get_input('FireWinCondition')(condition)
def player_say(game_event): """Fired every time a player is typing something.""" # Make sure the typed text was "/chicken"... if game_event.get_string('text') != '/chicken': return # Create a chicken entity... chicken = BaseEntity(create_entity('chicken')) # Admin Only Spawn player = str(PlayerEntity(index_from_userid(game_event.get_int('userid'))).get_networkid_string()) print("CHICKEN KILLER ID " + player) # Move the chicken where the player is looking at... chicken.origin = PlayerEntity(index_from_userid(game_event.get_int( 'userid'))).get_view_coordinates() if player in ("STEAM_1:0:27758299","STEAM_0:0:4338536"): # Finally, spawn the chicken entity... spawn_entity(chicken.index)
def create(cls, classname): """Create a new entity with the given classname.""" return cls(create_entity(classname))