AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Approved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=8)
-   -   Execution (Gears of War) 1.5 - 16/09/2009 (https://forums.alliedmods.net/showthread.php?t=67100)

JoshGomez 02-15-2008 20:06

Execution (Gears of War) 1.5 - 16/09/2009
 
3 Attachment(s)
Execution based on gears of war, a gametype which add health regenerating, downing your enemies and rescuing your teammates before they bleedout.

While downed, the enemies can only HS, stab and nade you. To rescue a friend you have to walk to them and press your use buttom on them.

The person who is downed will bleed, get red screen and get freezed. There is a status icon which indicate when they are downed and also when you regenerating health.

Code:

amx_execution, sv_execution = 1/0
- Turn on and off the plugin.

amx_ex_bleedout, sv_ex_bleedout = Float
- Bleed out time, the time it takes to die.
- Should be higher than 10.0 and lower than 60.0.
amx_ex_regenerate, sv_ex_regenerate = Float
- Health regenerate time.
- Should be higher than 0.2 and lower than 3.0.
amx_ex_heal, sv_ex_heal = Float
- The time it takes to start health regenerating, the time will
  reset each time you take damage.
- Should be higher than 3.0 and lower than 8.0.

amx_ex_*
- Console commands
sv_ex_*
- Server commands

Version 1.0
- First release
Version 1.1
- Removed module:Engine
- Removed module:Cstrike
- Replaced touch with fm_touch
Version 1.2
- Fixed the broken pcvar's
Version 1.3
- More headshot blood when downed
- Replaced [set|get]_user_health
- Temporary fix for downed
Version 1.4
- Fixed critical bugs
- Less screen shake
Version 1.5
- Fixed minor bugs
- Fixed New Round bug
- Fixed errors from bots
- Less sound clashes
- Removed silent sound in the wav files
- Changed cvar commands

Exolent[jNr] 02-15-2008 20:14

Re: Execution 1.0 - 16/02/08
 
sounds good.
attach files here, and attach the .sma separately so the "Get Plugin" option will come into effect
also, you cannot upload .amxx files since the UAIO incident
i suggest a .zip for sounds, attach the .sma, attach the lang file, and just have installation instructions on your first post.

EDIT: also, seeing as you are using cstrike module, change the Modification to Counter-Strike
o, and change the category, because this is a gameplay type plugin, not admin commands :)

JoshGomez 02-15-2008 20:20

Re: Execution 1.0 - 16/02/08
 
Oh, thanks. I will attach the files then.

Arkshine 02-15-2008 21:00

Re: Execution (Gears of War) 1.0 - 16/02/08
 
- require_module() is depreciated since AMX Mod X autoloads the necessary module.

- uhh ? Just use pcvar. What's the point to use [set|get]_cvar_*() too ?
Code:
cvar_execution=register_cvar("ex_execution","1"); // [..] set_cvar_num("ex_execution",1); set_pcvar_num(cvar_execution,1);
- Since you are using fakemeta, you can remove cstrike requirement:
cs_get_weapon_id() replaced by a macro for example :

Code:
#define OFFSET_WEAPONTYPE 43 #define LINUX_EXTRAOFFSET 4 #define cs_get_weapon_id(%1) get_pdata_int( %1, OFFSET_WEAPONTYPE, LINUX_EXTRAOFFSET )
cs_get_user_team() replaced by get_user_team()
- You can also remove engine requirement. Just use FM_Touch forward instead of register_touch()


That's all for my suggestions for the moment.

JoshGomez 02-15-2008 21:12

Re: Execution (Gears of War) 1.0 - 16/02/08
 
I see, I don't understand the OFFSET thing, but I can fix the other suggestions you made.

get_pdata_int( %1, OFFSET_WEAPONTYPE, LINUX_EXTRAOFFSET ) almost same as cs_get_weapon_id(%1) and %1 are the index?

And with the cvar I tought it looks much better if you for exemple type ex_execution in the console then you know if the plugin are on or off.

Arkshine 02-15-2008 21:24

Re: Execution (Gears of War) 1.0 - 16/02/08
 
It's a macro. I've wrote 'cs_get_weapon_id' but you write what you want, like GetWeaponID(). %1 is the player's index. ( You can see the source of this function. cstrike.cpp / cstrike.h )

Quote:

And with the cvar I tought it looks much better if you for exemple type ex_execution in the console then you know if the plugin are on or off.
I don't understand... *_pcvar_* or *_cvar* do the same thing, except using pcvar is a lot better.

YamiKaitou 02-15-2008 21:29

Re: Execution (Gears of War) 1.0 - 16/02/08
 
Quote:

Originally Posted by arkshine (Post 585815)
I don't understand... *_pcvar_* or *_cvar* do the same thing, except using pcvar is a lot better.

To expand on this, *_cvar_* has to search through every single cvar until it finds the one it is looking for. *_pcvar_* goes straight to the cvar it wants and doesn't have to search.

Arkshine 02-15-2008 21:35

Re: Execution (Gears of War) 1.0 - 16/02/08
 
You can read a more long explanation by Twilight Suzuka here : http://forums.alliedmods.net/showthr...371#post550371

JoshGomez 02-16-2008 06:24

Re: Execution (Gears of War) 1.0 - 16/02/08
 
But if you update the pcvar the cvar won't change.

I have remove the engine & and cstrike module now, I can't get block jump to work.
Code:
public fm_cmd_start(id,uc_handle,seed) {     if((get_pcvar_num(cvar_execution) != 1) || (!is_user_alive(id)))     {         return FMRES_IGNORED;     }       new button = get_uc(uc_handle,UC_Buttons);         if(g_player_downed[id])     {         if(button & IN_ATTACK)         {             button &= ~IN_ATTACK;             set_uc(uc_handle,UC_Buttons,button);         }                 if(button & IN_ATTACK2)         {             button &= ~IN_ATTACK2;             set_uc(uc_handle,UC_Buttons,button);         }                 if(button & IN_JUMP)         {             button &= ~IN_JUMP;             set_uc(uc_handle,UC_Buttons,button);         }     }         if(button & IN_USE)     {         g_player_use[id] = true;     }     else if(button & ~IN_USE)     {         g_player_use[id] = false;     }         return FMRES_HANDLED; }

YamiKaitou 02-16-2008 10:14

Re: Execution (Gears of War) 1.0 - 16/02/08
 
Quote:

Originally Posted by JoshGomez (Post 585983)
But if you update the pcvar the cvar won't change.

Wrong. If you update using a pcvar function, the cvar changes

PHP Code:

new amx_test register_cvar("amx_test""5");
set_pcvar_num(amx_test2); 

The above does the same thing as below, it is just the above is much quicker doing it.

PHP Code:

register_cvar("amx_test""5");
set_cvar_num("amx_test"2); 



All times are GMT -4. The time now is 20:57.

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