Garry's Mod

Garry's Mod

[ANP] Global Defence Force
out-dis-bih 26. nov. 2022 kl. 13.00
What are the npc spawn names?
for example, 'npc_combine_s' or 'npc_citizen'

copying from the spawn menu the names are '[GDF] Soldier' and '[GDF] Captain' etc but using those names only spawns default hl2 citizen skins when inputted.

thanks in advance.
< >
Viser 11 av 1 kommentarer
Teniente Coronel 27. jan. 2023 kl. 18.29 
The mod usses the "Name" system, meaning that in order to spawn one of the GDF NPCs, you first have to spawn npc_citizen and then set their name to GDF xxxx.
Honestly I do not know how to do it from in game, howhever, by coding, Ihave come to this :

function replacement()
for k, v in pairs( ents.FindByClass( "npc_citizen" ) ) do

local chance = math.Rand(1,100)
if chance > 75 then
v:SetName("[GDF] Soldier")
end
end

end

It first discovers the npc_citizen, and then, by chance, it replaces them with the GDF
< >
Viser 11 av 1 kommentarer
Per side: 1530 50