3 Relatively Simplistic Problems?

I have been scripting a gamemode for the last 3 weeks, I have come VERY far, over 2000 lines in my cl_init file, over a combined total of 3000 lines in my server side lua files, over 23 scripted entities, a few sweps and stools.

There are 4 issues I am running into and cannot figure them out on my own.

  1. resource.AddFile() will NOT send files to my clients
    shared.lua

if SERVER then
	resource.AddFile("materials/vgui/silkicons/money.png")
	resource.AddFile("materials/vgui/silkicons/cart.png")
	resource.AddFile("materials/vgui/silkicons/printer.png")
	resource.AddFile("materials/vgui/silkicons/bomb.png")
	resource.AddFile("materials/vgui/silkicons/plugin.png")
	resource.AddFile("materials/vgui/silkicons/lightning.png")
	resource.AddFile("materials/vgui/silkicons/car.png")
end

I have each of these files inside the Content folder in my gamemode, I am too suborned to move them into the actual server’s materials folder :S

2a. I have a few scripted entities that use multiple props. These entities specifically do not allow my clients to move them with their phys-gun unless FPP is turned off.
2b. When a player spawns these specific entities only ONE of the props involved is returned in the Spawn() function therefore only ONE of the props is actually owned by the player, the rest are owned by the world.


function ENT:SpawnFunction( ply, tr )

	if ( !tr.Hit ) then return end
	local SpawnPos = tr.HitPos + tr.HitNormal * 36
	local ent = ents.Create( "BZ_Oil_Refinery" )

	ent:SetPos( SpawnPos )

	local platform = ents.Create( "prop_physics" )
	local AddForward = ent:GetForward() * 80
	local AddUp = ent:GetUp() * -25
	SpawnPos:Add( AddForward )
	SpawnPos:Add( AddUp )
	platform:SetPos( SpawnPos )
	platform:SetModel( "models/props_lab/teleplatform.mdl" )

	ent:SetParent( platform )
	ent.BZ_Platform = platform
	platform:Spawn()
	local Ang = ent:GetAngles()
	Ang:RotateAroundAxis(Ang:Up(), -105)
	ent:SetAngles( Ang )
	ent:Spawn()
	ent:Activate()

	local weld = constraint.Weld(ent,platform,0,0,0,true)
	weld:SetParent( platform )
	weld:Activate()

	return ent
end

I have tried to play around with which entity is returned in multiple ways all with failure.

  1. How do you make it impossible for the duplicator to duplicate items? People are duplicating some items that ruin the game for them.

  2. HOW ON EARTH DO I REMOVE AN ENTITY FROM THE PLAYERS UNDO LIST SO THEY CANNOT UNDO IT WITH THEIR UNDO KEY??!?
    lawl.

thank you all for your help it is most appreciated!

BUMP

**1. **Those files are already on the client

**2. **You’ll have to set the owner based on whichever prop protection you are using, or use CPPI ( which nearly every prop protection supports)

**3. **If you’re using FPP, there is a menu for blocking entities by class.

**3. **Here maybe?

Try this thread as well, one problem at a time.

I checked and those files are not already on the client, what is their path so I can access them?
Is it possible to set Entity.Owner = ply ? I’m going to try this next
The other links only allow me to add something to the undo list not remove it

You can find most of those icons under materials/icon16.

Thank you very much, all my icons are now displaying properly on-screen.

I am still having trouble getting specific entities, when they are created, to not go into the player’s ‘undo’ list…

If anyone wants to see all the progress I’ve made I have a 64 slot server hosted through xenonservers here: 50.31.22.121:27015