gm_surf: A Simple Solution to Prop Surfing

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 [ :frowning: ]
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? :stuck_out_tongue:

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 :stuck_out_tongue:

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 :stuck_out_tongue:

**FAQ: **
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.)

So in theory I can pick up a prop, stick it in the middle of someone, let go and they’re stuck?

No, collision is only disabled with the player that picked it up. I did have that problem at first, though :stuck_out_tongue:

Good try, but someone could just weld two props to eachother and physgun one of them while using the other to surf or prop-push.

Hmm. I’ll look into that. I’ve never had anyone mention it :o

EDIT: Oh Deco, I think I’ve defeated your argument :stuck_out_tongue:

It doesn’t stop people from making floating prop stairs but its a good start.

#luahelp is full of trolls

wouldn’t this enable people to walk though props
I.e Grab prop that’s welded to the world and then just walk through it.