Page 1 of 1

[L4d2] How to Creating a Special Infected

Posted: Sat Jan 15, 2022 12:08 pm
by heokami
hi, i want to Creating Have NextBot Ai Special Infected in my game, and i can use sourcePython control the Infected.

But i try to Creating "Jockey", it's don't work.

it's my code:

Code: Select all

@TypedSayCommand('!ts','admin',on_auth_failed)
@TypedSayCommand('/ts','admin',on_auth_failed)
def on_spawn(command_info):
    player = Player(command_info.index)
   
    entity = Entity.find_or_create('commentary_zombie_spawner')
    jockey_model = Model('models/infected/jockey.mdl')
    entity.model = jockey_model
    entity.origin = player.view_coordinates
    entity.call_input('SpawnZombie','Jockey')
    entity.spawn()


My client console say:

Code: Select all

ERROR:  Can't draw studio model models/infected/jockey.mdl because CBaseEntity is not derived from C_BaseAnimating


Can anyone give me some advice or hints? Thank you very much for your help!