nebual / nadmodpp Goto Github PK
View Code? Open in Web Editor NEWNPP - Simple Prop Protection for Garry's Mod servers
NPP - Simple Prop Protection for Garry's Mod servers
I've noticed an issue with Nadmod on servers where if a player changes their name in Steam, all of the players props become ownerless and cannot be cleaned up with the admin panel for Nadmod. The props after they are ownerless can only be removed by using the remover or with admin Cleanup Everything. Just as somewhat of a solution to this, I could say possibly use Steam ID for prop ownership
As the title says, when your PP friend leaves the server, there's no way to remove him/her, can be annoying at times... While allowing a temporary PP to somebody, and then forgetting about it...
Went to do spawnmenu_reload to fix the stuck purple selection box in the prop menu, I had to rejoin my server after being unable to open the spawn menu after doing so. When I press Q, I get this error:
[Nadmod Prop Protection] lua/autorun/client/cl_nadmodpp.lua:141: attempt to call method 'ClearControls' (a nil value)
1. AdminPanel - lua/autorun/client/cl_nadmodpp.lua:141
2. v - lua/autorun/client/cl_nadmodpp.lua:261
3. Call - lua/includes/modules/hook.lua:84
4. Run - gamemodes/sandbox/gamemode/spawnmenu/spawnmenu.lua:238
5. unknown - gamemodes/base/gamemode/cl_spawnmenu.lua:11
6. unknown - lua/includes/modules/concommand.lua:54
When looking at a prop, I get constant script errors:
[Nadmod Prop Protection] lua/autorun/client/cl_nadmodpp.lua:82: 'ChatFont' isn't a valid font
I find it kinda weird since ChatFont is listed as a default font in the GMod wiki, but I'm not sure what's going on here
New props - spawned after player already joined are received properly by the clientside,
but props that already were spawned before player connected will display N/A and won't have ownership on client (server's CPPIGetOwner will still return the correct player)
NADMOD.SendPropOwners() works properly (tho client might not receive it since it's instantly called on PlayerInitialSpawn).
From my initial tests client receives only a small chunk of that containing weapons he's spawned with.
Sent IDs: 0-109 (last 10 being my props)
Received IDs: 83-94.
All that with few skipped of course due to IDs being unique.
I dislike networking to extend where I'm not even gonna start thinking of what's happening there, sorry @thegrb93 ;c
If you join an empty server, and then spawn a bot through the RCON/server console, you cannot open the Q menu until you rejoin the server due to the following error:
[Nadmod Prop Protection] lua/autorun/client/cl_nadmodpp.lua:238: attempt to concatenate a nil value
1. ClientPanel - lua/autorun/client/cl_nadmodpp.lua:238
2. v - lua/autorun/client/cl_nadmodpp.lua:250
3. Call - lua/includes/modules/hook.lua:84
4. Run - gamemodes/sandbox/gamemode/spawnmenu/spawnmenu.lua:228
5. unknown - gamemodes/base/gamemode/cl_spawnmenu.lua:11
6. unknown - lua/includes/modules/concommand.lua:54
[Nadmod Prop Protection] lua/autorun/client/cl_nadmodpp.lua:204: attempt to concatenate a nil value
1. func - lua/autorun/client/cl_nadmodpp.lua:204
2. unknown - lua/includes/extensions/net.lua:32
This will only happen if you've opened the Nadmod client settings at least once.
Now, this is not necessarily a bug or anything but I am trying to disable this option as I do not want it to be a thing if possible.
If you enable "use protection" and try to click to the air/walls/floor (not props or entities) you will get
14:20:07 [ERROR] addons/nadmodpp/lua/autorun/server/nadmod_pp.lua:246: attempt to index a nil value 1. fn - addons/nadmodpp/lua/autorun/server/nadmod_pp.lua:246 2. unknown - addons/ulib/lua/ulib/shared/hook.lua:109
The reason of this error is NADMOD.Props[ent:EntIndex()].Name
. For some reason ent = player that tried to use.
So the solution is add and !ent:IsPlayer()
before NADMOD.Props[ent:EntIndex()].Name
to check if the ent is not equals player.
Full fixed 246 line:
if !NADMOD.PPConfig["use"] or NADMOD.PlayerCanTouch(ply, ent) or (ent:IsValid() and !ent:IsPlayer() and NADMOD.Props[ent:EntIndex()].Name == "W") then
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.