AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Approved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=8)
-   -   Surf_AG-Final Manager (https://forums.alliedmods.net/showthread.php?t=106103)

atomen 10-11-2009 16:57

Surf_AG-Final Manager
 
1 Attachment(s)
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

Jon 10-11-2009 17:40

Re: Surf_AG-Final Manager
 
- 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.

Nextra 10-11-2009 18:22

Re: Surf_AG-Final Manager
 
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.

xPaw 10-12-2009 01:30

Re: Surf_AG-Final Manager
 
I'd prefer

if( g_FwdSpawn > 0 && get_pcvar_num(pWpnRm))

ConnorMcLeod 10-12-2009 02:03

Re: Surf_AG-Final Manager
 
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.

Hawk552 10-21-2009 12:20

Re: Surf_AG-Final Manager
 
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.

ServO 11-04-2009 03:36

Re: Surf_AG-Final Manager
 
Nice pluging!


All times are GMT -4. The time now is 07:46.

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