Creating a Custom Role

How to make your own role.

Go to your roles folder: wos-renegadesquad-xxx/lua/wos/prs/role-sys/roles Create a new Lua file in that folder. Example: mycoolrole.lua Paste the given template below and fill in the fields with your own content.

wOS.RenegadeSquad.Roles:RegisterRole({
    Name = "Template",
    Description = "A general template to create more roles!", -- Role description displayed in the upgrade list.
    Loadout = { "swep_example", "swep_example_1" }, -- Weapons the role will spawn with.
    Model = "player/example/example.mdl", -- Model assigned to players using role.
    BodyGroups = { -- Bodygroup set assigned to players on spawn.
        [5] = 1,
    },
    PlayerCost = 50,
    PlayerLocked = false,
    SquadCost = 50,
    SquadLocked = false,
    UserGroups = { "exampleusergroup" }, -- Restrict role to an allegiance (Set to false to be available for all).
    Allegiances = { -- Allegiance that this role is restricted to (Set to false to be available for all).
        [ "Example Allegiance" ] = true, 
    },

    CertifRequirements = { -- Certifications required to purchase and switch to this role.
        [ "Example Certification"] = true,
    },

    OnSpawn = function( ply )
    
    end,
})
wikOS powered By wiltOS Technologies