Raised This Month: $95 Target: $400
 23% 

Toggleable Noclip


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Admin Commands        Approver:   Emp` (115)
GHW_Chronic
SourceMod Donor
Join Date: Sep 2004
Location: Texas
Old 06-04-2008 , 21:44   Toggleable Noclip
Reply With Quote #1

Simple plugin. Allows you to toggle noclip on yourself via a bind.

Command (flag m):
  • bind [key] +noclip
Attached Files
File Type: sma Get Plugin or Get Source (GHW_Toggleable_Noclip.sma - 3814 views - 995 Bytes)

Last edited by GHW_Chronic; 06-04-2008 at 22:35.
GHW_Chronic is offline
Send a message via AIM to GHW_Chronic
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 06-04-2008 , 22:21   Re: Toggleable Noclip
Reply With Quote #2

Wow Chronic, I'm kinda surprised. 20 or so lines and you screwed up a few things:

-> Remove #define VERSION or use it
-> register_concmd to register_clcmd
-> Change cmd_noclip to:

Code:
public cmd_noclip(id,level,cid) {     if(cmd_access(id,level,cid,1))         set_user_noclip(id,1)     return PLUGIN_HANDLED }

Seriously, did you even write this?
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
GHW_Chronic
SourceMod Donor
Join Date: Sep 2004
Location: Texas
Old 06-04-2008 , 22:36   Re: Toggleable Noclip
Reply With Quote #3

you got me on the i copy and pasted my intro but didnt change the register_plugin line part as well as the more efficient method of toggling noclip on however do you have a reason behind register_concmd for -noclip instead of register_clcmd? As far as I can tell that is prefectly fine.
GHW_Chronic is offline
Send a message via AIM to GHW_Chronic
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 06-05-2008 , 00:08   Re: Toggleable Noclip
Reply With Quote #4

Using register_concmd registers it to both the client and server console. That implies that the server can use the command. Thus, it's better to just use register_clcmd.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
GHW_Chronic
SourceMod Donor
Join Date: Sep 2004
Location: Texas
Old 06-05-2008 , 01:44   Re: Toggleable Noclip
Reply With Quote #5

however register_clcmd doesn't show up for the query amx_help performs. amx_help being a very commonly used command using concmd allows new admins to find out about the command.
GHW_Chronic is offline
Send a message via AIM to GHW_Chronic
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 06-05-2008 , 12:38   Re: Toggleable Noclip
Reply With Quote #6

What 0_o

AFAIK it shows up depending on how you register it - if you used clcmd, only clients will see it in their menu. If you used concmd, both will. I'm not totally sure about that but, I'll check if you want.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
GHW_Chronic
SourceMod Donor
Join Date: Sep 2004
Location: Texas
Old 06-05-2008 , 13:36   Re: Toggleable Noclip
Reply With Quote #7

it could be because I've only tested plugins on a listenserver for the last 4 years but that was my distinct impression.
edit: tested in my listenserver and +noclip, +hook, +grab, +rope which are all concmds show up however the clcmds dont (-noclip, -hook, -grab, -rope)

Last edited by GHW_Chronic; 06-05-2008 at 13:53.
GHW_Chronic is offline
Send a message via AIM to GHW_Chronic
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 06-05-2008 , 15:11   Re: Toggleable Noclip
Reply With Quote #8

You should make a toggle bind, instead of one you have to hold.
So that people don't have to use hl scripts such as this:

Code:
alias togglenoclip noclip_on
alias noclip_on "+noclip; alias togglenoclip noclip_off"
alias noclip_off "-noclip; alias togglenoclip noclip_on"

bind mouse3 togglenoclip
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 06-05-2008 , 19:19   Re: Toggleable Noclip
Reply With Quote #9

I remember having various toggle commands like this on my server. Noclip, godmode, bury, etcetera. The godmode was funny because I'd toggle it randomly and people would flip out and told me they knew they hit me
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
GHW_Chronic
SourceMod Donor
Join Date: Sep 2004
Location: Texas
Old 06-05-2008 , 21:49   Re: Toggleable Noclip
Reply With Quote #10

v3x is a mean person, and I was going to add godmode but decided against it for that reason
as well there are noclip plugins out there, this one has its specific reasons and I think it is good how it is.
How you comin on clcmd vs. concmd hawk? is it the same on a ded server as it is on my listenserver (which i would be forced to suspect it is)?
GHW_Chronic is offline
Send a message via AIM to GHW_Chronic
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:00.


Powered by vBulletin®
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Theme made by Freecode