Raised This Month: $100 Target: $400
 25% 

Surf_AG-Final Manager


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Gameplay        Approver:   Hawk552 (427)
atomen
Veteran Member
Join Date: Oct 2006
Location: Stockholm, Sweden
Old 10-11-2009 , 17:57   Surf_AG-Final Manager
Reply With Quote #1

PHP Code:
/*********************************************
*
*             Surf_AG-Final Manager
*
*             Description:
*
*    A plugin which alters the gameplay
*    of surf_ag-final. Has 2 different features;
*
*    # No Kill In Weapon Room
*
*    When you enter the weapon room you will not
*    be able to shoot and you will recieve godmode.
*    When you leave it you will instantly be able
*    to shoot and you will be damageable again.
*
*    # Make Jail Hollow
*
*    Since the whole jail isn't an entity it isn't
*    possible to delete it completely therefore it
*    only deletes the inside of it(completely hollow).
*    It also adjusts all the angles for the teleports.
*
*    Cvars:
*        - amx_ag_wpnrm_protection "1"
*            | Enables/Disables weapon
*            | room protection.
*
*        - amx_ag_remove_jail "0"
*            | Makes the jail hollow
*
*    Notice: For the cvars to take effect
*        a map change is required!
*
**********************************************/ 
Surf_AG-Final is available @ http://www.fpsbanana.com/maps/113269
Attached Files
File Type: sma Get Plugin or Get Source (surf_ag-final.sma - 2187 views - 3.1 KB)
__________________
atomen is offline
Send a message via MSN to atomen
Jon
Veteran Member
Join Date: Dec 2007
Old 10-11-2009 , 18:40   Re: Surf_AG-Final Manager
Reply With Quote #2

- If the touched entities in fwdTouched( ) have the same classname you can use register_touch for less calls.
- Add an alive check in fwdCmdStart( ), consider using hamsandwich instead.

Last edited by Jon; 10-11-2009 at 18:43.
Jon is offline
Nextra
Veteran Member
Join Date: Apr 2008
Location: Germany
Old 10-11-2009 , 19:22   Re: Surf_AG-Final Manager
Reply With Quote #3

Well done, hope you have tested this thoroughly.

Here are some things you could change:
- I believe the first check you should do in fwdTouch is ( 1 < id < maxplayers ).
- I'm not really sure wether checking is_user_connected in that touch forward is required but if it really is - cache that value on client_connect/client_disconnect.
- Both of those model-arrays are way too big.
__________________
In Flames we trust!
Nextra is offline
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 10-12-2009 , 02:30   Re: Surf_AG-Final Manager
Reply With Quote #4

I'd prefer

if( g_FwdSpawn > 0 && get_pcvar_num(pWpnRm))
__________________
xPaw is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 10-12-2009 , 03:03   Re: Surf_AG-Final Manager
Reply With Quote #5

You don't reset godmode after touch, is there any reason for that ?


Also, you may consider using register_touch from engine, that way you won't have to check for player and for valid ent.

register_touch("func_wall", "player", "FuncWall_Touch_By_Player")

public FuncWall_Touch_By_Player( iWall, iPlayer )


End, you may use Tries for model check, Ham for spawn forward and for TraceAttack instead of CmdStart.


@xPawn
This is the same, only advantage would be to save a var.
__________________
- tired and retired -

Last edited by ConnorMcLeod; 10-12-2009 at 03:13.
ConnorMcLeod is offline
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 10-21-2009 , 13:20   Re: Surf_AG-Final Manager
Reply With Quote #6

There are a few mistakes and optimizations that can be made, however it is acceptable.

If you would like any information regarding possible adjustments you could make or things you could do to make this better, please feel free to post here or PM me.

Approved.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
ServO
Senior Member
Join Date: Nov 2009
Location: Are you asking me out?
Old 11-04-2009 , 04:36   Re: Surf_AG-Final Manager
Reply With Quote #7

Nice pluging!
ServO is offline
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 00:11.


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