Skip to main content

create_class

Function create_class 

Source
pub unsafe fn create_class(
    component: *mut IClassesComponent,
    skin: i32,
    team: i32,
    spawn: Vector3,
    angle: f32,
    weapons: &[WeaponSlot; 13],
) -> *mut IClass
Expand description

IClassesComponent::create(skin, team, spawn, angle, weapons) — a spawn class, what AddPlayerClass creates on the script side.

The weapons array is passed by reference, so it only has to outlive the call.

§Safety

component must be a live IClassesComponent.