Anti-Prop Surf (gSurf)
- version 1.11
This is a very short and simple addon I’ve been working on. I originally scripted it to be part of a gamemode I’m tinkering with, and then I got people asking me for it, so I decided to put together an addon! And yeah, I know. Anyone with half a brain that knows GMod Lua can and probably has scripted something like this. I’m mainly throwing this out there for the people that either:
A: Don’t have half a brain [ ]
or B: Aren’t familiar with Gmod Lua in the least bit.
So, let’s clear a few things up.
[li]This is my first ever release.[/li][li]I’m not a pro/expert/leet Lua Scripter. I’m just someone that screws around with gamemodes.[/li][li]If this is messy, or you know how I could improve upon it, either bitch me out, or gimme a lesson :D[/li][li]This was never meant to be a public release, but hey, what the hell. Figured I’d be nice :P[/li][li]This addon isn’t dependent on anything. (Except for a Gamemode :P)[/li][li]Oh, and also. Feel free to Steal/Copypaste/Use this code in any way you want. All I ask is that maybe you leave a little comment credit :P[/li][/ul]
What this does:
When a player picks up a prop with the physgun, they are essentially nocollided with the prop. When they freeze or drop the prop, the two become un-nocollided. Simple, right?
How to use:
Just drop the gm_surf folder in addons. Also, there’s a cvar called sv_allow_prop_surf. It Defaults to 0. Setting it to 1 will allow all players to prop surf.
Lemme give a shout out to:
Luahelp - For answering all my dumbass questions and helping me become what I am, in terms of scripting ability
Nocturnal Gaming - For its members relentlessly test EVERYTHING that I produce. And for being my home community
Garry - For the occasional help and for completely defying what a game can and can’t be.
AMT - For originally teaching me Gmod Lua in the first place. I’d have never learned anything if it werent for him
Q: If a player sticks a prop in someone and lets go, is the player stuck?
A: No. Collisions are only disabled between the entity being grabbed, and the player grabbing it.
Q: Does this cover entities constrained to the entity being grabbed?
A: Yep (Thanks for pointing that out, Deco Da Man.)