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 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 spawn(self): """Spawn the entity.""" spawn_entity(self.index)