[tab]Description:[/tab] gSurf is a script that makes it so when a player picks up a prop, the player is nocollided with that prop. So in essence, this player cannot prop surf. Props still collide with other players and everything else, as does the player that is holding the prop. The effect goes away when the player drops or freezes the prop.
[tab]Download:[/tab] http://www.garrysmod.org/downloads/?a=view&id=91834 [/release]
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.)
Sorry about the repost!
Also, sorry for the repost, but where I originally posted it, in addons, is where you post if you don’t want your post to be noticed. Also, I was sleepy and drunk when I named the topic, so it sounded like a map instead of what it actually was. If any of the mods has a problem with it, just PM me and I’ll do -something-. But I do ask that if you’re a mod, you go and delete this post.