AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Unapproved/Old Plugins (https://forums.alliedmods.net/forumdisplay.php?f=27)
-   -   WallClimb (climb on walls) (https://forums.alliedmods.net/showthread.php?t=72867)

Python1320 06-17-2008 13:53

WallClimb (climb on walls)
 
6 Attachment(s)
WallClimb 1.0

Description
With this plugin you can climb on walls. What else can I say?

Download
Use "WallClimb_v1.0.sma" for counter strike and "WallClimb_v1.0_nocstrike.sma" for other mods

ChangeLog
v1.0f
- Switched to pcvars
- Fixed small plugin registration problem
- Plugin is now using only fakemeta instead of both engine and fakemeta, thanks to GHW_Chronic
- Fixed major flaw on _nocstrike version

v0.1-0.7
- Internal builds

Known bugs
- Climbing is not actually climbing but it has the same effect
- Player can climb on roof also
note: Setting amx_climb_method to 0 will disable roofclimbing but the side-effect is that it also disables steering.
- (In use mode) You have to jump once or you can't climb

Todo
- Climb-timelimit to stop players climbing forever
- amx_givewallclimb or something similar (suggested by Zizor. in alpha)
- advanced user access control (levels) (suggested by Zizor. Not done)
- New climbing code (from other plugin, not released, not implemented)
- Better wall detecting (from other plugin, not released, not implemented)
- Optimize old code (partially done in alpha)
- Create a new climbing video (guess...)
- Get some time to do all this (pending)

Credits
Thanks to cheap_suit for his mazing climbing code
GHW_Chronic for pointing out my small bug and for converting the plugin to use only fakemeta

Videos
http://www.youtube.com/watch?v=T3BxdaixAaw

Compiling
As usual but you need this: http://forums.alliedmods.net/showthread.php?t=28284

Tags
Wallclimb , wall climb , climb on walls , wallwalk , walljump , climbing
(easier to find with forum search)

Cvars and commands
Code:

Say
 - "/climbon" "/climboff"  --  Enables/disables [B]players[B] wallclimb (does not override amx_climb)
 - "/Buyclimb"  --  If buymode is activated use this to buy it

Console
 - climbon climboff  --  Read from above
 - buyclimb  --  Read from above

 - amx_climb (1) --  Enable(1) or disable(0) the plugin

 - amx_climb_mode (0)
  - "0" Hold jump and up/down button to climb
  - "1" Hold use key and up/down and press jump
  - "2" Both modes

 - amx_climb_team (2)  --  (for cstrike only) Select the team which can use climbing
  - "0" Terrorists
  - "1" Counter-Terrorists
  - "2" Everyone

 - amx_climb_method (1)
  - "0" Old climbing code (not supported, not recommended to use)
      - I only left it there because in that mode steering doesn't work and also you can't climb on roof
  - "1" New method (suggested)
 - amx_climb_speed (240) --  How fastly use climbs (suggestion: Don't change)

 - amx_climb_buy  (0) -- Control buying (cstrike only)
  - "0" Disable buying
  - "1" Enable buying
  - "2" Enable buying but remove after death
 - amx_climb_cost (5000) -- How much it costs to buy it

Edit: I had some time to code the plugin. It's still alpha. In this case it means it's not so thoroughly tested.
Small unofficial changelog:

- added cvar amx_climb_default to control if users climbing is enabled by deafult.

- Added admin control to disable/enable users climbing - amx_climb_set (@ct, @t @all, nick) on/off. For example amx_climb_set @all off
- Please note that users can still do /climbon /climboff to control this same behaviour. Will be fixed in future releases.

- Optimized code (hopefully)
- Both cstrike and non-cstrike build are now in same file. For non-cstrike version open the file and remove line #define use_cstrike
That's all if I remember correctly, and please, come bug me if you find out that something doesn't work or works weirdly because I'm damn busy or lazy these days.

DA 06-17-2008 13:57

Re: WallClimb
 
Nice idea. You have to use *_pcvar instead of *_cvar to get this plugin approved.

Python1320 06-17-2008 14:25

Re: WallClimb
 
Ok done, anything else I should modify?

Fry! 06-17-2008 14:45

Re: WallClimb
 
I will try. =)

Python1320 06-17-2008 14:56

Re: WallClimb
 
I've got a server on fiber if anyone wants to try it

You can contact me from http://rtc4.mine.nu/contact.html

msn preferred but I'm also on amxmodx's irc channel

GHW_Chronic 06-17-2008 15:08

Re: WallClimb
 
Code:

register_plugin("WallClimb", "WallClimb by Python1320, Climbing Gear by Cheap_Suit", "1.0f")
Your syntax is out of order. It goes plugin name - version - author

Python1320 06-17-2008 15:19

Re: WallClimb
 
Damn, fixed
Weird me...

GHW_Chronic 06-17-2008 15:23

Re: WallClimb
 
Fixed lines 247-269 to be from engine to fakemeta (you had engine's include commented out yet still had 4 lines that used engine functions)

Code:
    if (get_pcvar_num(p_climb_method) == 0) {   // Old method  !!!! (not supported but left here if someone finds it better)     new Float: fVelocity[3]     new Float:pcvar_speed = get_pcvar_float( p_climb_speed );     pev(id,pev_velocity,fVelocity)             new Buttons = pev(id,pev_button)     if(get_pcvar_num(p_climb_mode) == 1 && Buttons & /*IN_JUMP*/ IN_USE && (Buttons & IN_FORWARD || Buttons & IN_BACK) )     {         if(fVelocity[0] == 0.0 || fVelocity[1] == 0.0)         {             fVelocity[1] = 10.0             fVelocity[2] = pcvar_speed             set_pev(id,pev_velocity, fVelocity)         }     } else if(get_pcvar_num(p_climb_mode) == 0 && Buttons & IN_JUMP/*IN_USE*/  && (Buttons & IN_FORWARD || Buttons & IN_BACK) )     {         if(fVelocity[0] == 0.0 || fVelocity[1] == 0.0)         {             fVelocity[1] = 10.0             fVelocity[2] = pcvar_speed             set_pev(id,pev_velocity, fVelocity)         }     }

Tested and seems to work fine.

Python1320 06-17-2008 15:27

Re: WallClimb
 
ok, thanks a lot. And yes, I did some testing to see which functions would screw up without engine. looks like I forgot to reverse my testings.

EDIT: Modified the code and reuploaded it.

Python1320 06-26-2008 14:58

Re: WallClimb v1.0b
 
Thanks to xariotx (don't know his forum username) for testing my plugin on non-cstrike-mod. He told me that it didn't work at all. I had included some counter-strike variables and events on the _nocstrike version.
Fixed now!


All times are GMT -4. The time now is 03:22.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.