1. Post #1
    men232's Avatar
    March 2010
    50 Posts
    Hi

    I have a server with the gamemode darkrp. Often the server Mingi block spawn prop. Is there a script or addon to solve this problem?

    (User was banned for this post ("Wrong section" - Gran PC))
    Reply With Quote Edit / Delete Windows 7 Ukraine Show Events

  2. Post #2
    Gold Member
    Matt W's Avatar
    October 2011
    240 Posts
    You could use ents.FindInSphere to get the location of spawn and then remove any props inside.

    Example:
     
    
    function SpawnProtection()
    	for k,v in pairs(ents.FindInSphere(Vector(1,1,1), 256) do -- You need to replace 1,1,1 with the co-ordinates of your map (use getpos in console)
    		if v:GetClass() == "prop_physics" then v:Remove() end
    	end
    end
    
    hook.Add("Think", "SpawnProtection", SpawnProtection)
    


    ^^
    Something like that.
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events Disagree Disagree x 1Informative Informative x 1 (list)

  3. Post #3
    men232's Avatar
    March 2010
    50 Posts
    Matt W. thx :)
    Reply With Quote Edit / Delete Windows 7 Ukraine Show Events

  4. Post #4

    May 2012
    9 Posts
    excuse me

    How would one incorporate this code?

    Plug into a previous script?

    Perhaps paste in a txt file and put in lua folder?


    any help is appreciated thanks


    Ive been searching 3 hours and read many stickys
    Reply With Quote Edit / Delete Windows 7 United States Show Events Dumb Dumb x 1 (list)

  5. Post #5
    Awesome Gmod Servers!
    brandonj4's Avatar
    September 2011
    2,065 Posts
    excuse me

    How would one incorporate this code?

    Plug into a previous script?

    Perhaps paste in a txt file and put in lua folder?


    any help is appreciated thanks


    Ive been searching 3 hours and read many stickys
    You would make a file with the extention ".lua" and place inside of garrysmod/lua/autorun/client or garrysmod/lua/autorun/server depending on the type of code. In this case it would be serverside because the server has to delete the prop.
    Reply With Quote Edit / Delete Windows 7 Canada Show Events