

local NPCModels = GetNPCModels("models") local ModelList = vgui.Create("DListView") RunConsoleCommand( "swe_spawner_weapon ", panel: GetLine(row): GetColumnText( 1)) Create( "DListView ")įor k, v in pairs(list. RunConsoleCommand( "swe_spawner_type ", panel: GetLine(row): GetColumnText( 1)) Preset: AddOption( "Default ", ConVarsDefault)įor k, v in pairs(table. Local ConVarsDefault = TOOL: BuildConVarList() print(string.sub( realDir, 1, string.len( realDir ) - 1 ). Local mdl = string.sub(realDir, 1, string.len(realDir) - 1). print(string.sub( realDir, 1, string.len( realDir ) - 1 ). if not fileFound and util.IsValidRagdoll(realDir. for a, pm in pairs(player_manager.AllValidModels()) do GetExtensionFromFilename(v) = "mdl " then Self: GetOwner(): PrintMessage( 3, "Found NPC! ") Self: GetOwner(): PrintMessage( 3, "Right click does not work in singleplayer! ") Self: GetOwner(): AddCleanup( "npcs ", ent) If ( not ent: IsValid()) then return true endĮnt: SetCurrentWeaponProficiency(proficiency) Local ent = self: SpawnNPC( self: GetOwner(), trace. Local NPC_prof = self: GetClientInfo( "proficiency ") Local NPC_health = self: GetClientInfo( "health ") Local NPC_wep = self: GetClientInfo( "weapon ") Local NPC_type = self: GetClientInfo( "type ") NPC: SetKeyValue( "additionalequipment ", Equipment)
FrequencyIf (Equipment and Equipment ~= "none " and valid) then Number of NPCs that will spawn before this spawner is exhausted. NPC: SetKeyValue( "spawnflags ", SpawnFlags)įor _, v in pairs(list. bor(SF_NPC_FADE_CORPSE, SF_NPC_ALWAYSTHINK)

NPC: SetModel( self: GetClientInfo( "model ") or NPCData. Model or self: GetClientInfo( "model ") ~= " ") then OnFloor and Vector( 0, 0, 1): Dot(Normal) < 0.95) then For spawning cars/helicopter/npc go to the skyscraper and press. (You can use scripted spawner or spawn your own)-3 place 5vs5 NPC scripted assault.-20vs20 NPC scripted battle.-Subway.-3 buildings with interior.-Good optimisation. Education 5 days ago-NPC navigation-Scripted car traffic. OnCeiling and Vector( 0, 0, - 1): Dot(Normal) < 0.95) then return nil end What are some of your must have add ons for gmod : gmod. AdminOnly and not Player: IsAdmin()) then return end = WEAPON_PROFICIENCY_PERFECTįunction TOOL:SpawnNPC( Player, Position, Normal, Class, Equipment) Add( "tool.swe_spawner.right ", "Get the class of the targeted NPC ") Add( "tool.swe_spawner.left ", "Spawn the custom NPC ") Add( "tool.swe_sc ", "Spawn an NPC with custom attributes ") Learn more about bidirectional Unicode characters To review, open the file in an editor that reveals hidden Unicode characters. This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below.
