We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 434f13b + 9c6a616 commit af0129fCopy full SHA for af0129f
gamemode/core/hooks/sv_hooks.lua
@@ -9,10 +9,17 @@ function GM:PlayerInitialSpawn(client)
9
local index = math.random(1, table.Count(ix.faction.indices))
10
local faction = ix.faction.indices[index]
11
12
+ local models = faction:GetModels( client )
13
+
14
+ local model = models[ math.random( #models ) ]
15
+ if ( istable( model ) ) then model = model[ 1 ] end
16
17
+ if ( !isstring( model ) ) then model = "models/gman.mdl" end
18
19
local character = ix.char.New({
20
name = client:Name(),
21
faction = faction and faction.uniqueID or "unknown",
- model = faction and table.Random(faction:GetModels(client)) or "models/gman.mdl"
22
+ model = model,
23
}, botID, client, client:SteamID64())
24
character.isBot = true
25
0 commit comments