How can I enforce prop limit check when using stacker?

As the title says, I need to know how to enforce the prop limit when using the stacker tool. I’m not a coder and I’ve barely modified things but I can’t figure this one out so any help is appreciated.

I’m trying to implement this for the improved stacker tool. http://forum.facepunch.com/showthread.php?t=1399120

Hi spazshot.

I’ve been a little busy and haven’t been working on Improved Stacker lately. I see you are not the only one requesting adding something like hook.Call( “PlayerSpawnProp”, GAMEMODE, ply, entModel ) and hook.Call( “PlayerSpawnedProp”, GAMEMODE, ply,entModel, ent ).

I originally did not put this in because it already calls ply:GetSWEP():CheckLimit( “props” ), which is a wrapper for ply:CheckLimit( “props” ), and I am so used to overriding functions like these for my own prop protection addon because of the horrible inconsistency there is between addons (some calling only the undo library, some using ply:CheckLimit and undo, some using undo and the PlayerSpawn* hooks, some using the PlayerSpawned* hooks, etc).

I did push an update to the GitHub version that adds PlayerSpawnProp and PlayerSpawnedProp but I haven’t tested it out yet (https://github.com/Mista-Tea/improved-stacker/commit/0accde8558c06e1af8e809824d5e1c12617fffb2). I can get to work on it right now.

Alternatively, I do have my own StackerEntity hook getting called every time an entity is created in the stack, and you can use that in the meantime. It would just be something like:


hook.Add( "StackerEntity", "PropProtection", function( ent, owner )
    -- run your prop protection checks here
    
    if ( failed checks ) then 
        ent:Remove()
        return false
    end
end )

For the future, feel free to make a GitHub issue/request instead so that I can properly address it for everyone, instead of having developers like yourself make custom edits to the tools. You can post issues here: https://github.com/Mista-Tea/improved-stacker/issues?state=open

Alright, I’ve finished testing the PlayerSpawnProp and PlayerSpawnedProp hooks and updated the workshop version to reflect the changes: https://github.com/Mista-Tea/improved-stacker/commit/8dd672bef1a5dfedcfa10a325adc940608ea65e7

If you have any issues, I encourage you to either make a GitHub ticket or post in the official Improved Stacker thread.

Thank you Mista Tea.

I was unsure if you were still active on the project and I had a big issue with people exploiting prop limit so I needed a bit of an urgent fix which is why I didn’t post on the Improved Stacker thread or the github.

I did see the limit check you added on the github when I looked a few days ago and I tested it and the entire stacker tool wasn’t working just as other people have reported.

Everything seems fine now though so again thanks. I’ll be sure to utilize the github for any requests/problems.