Raised This Month: $ Target: $400
 0% 

One die, all die


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Gameplay       
axeld
Junior Member
Join Date: May 2010
Old 05-02-2010 , 18:22   One die, all die
Reply With Quote #1

Description
One die, all die kills the entire team once one player gets killed.
Due to request it now supports range checking.
(Note that the one with range checking is onedie_alldie_range.sma, not onedie_alldie.sma)

CVars
  • amx_alldie_enabled 1/0 - Controls wether the plugin is enabled or not.
  • amx_allow_suicide 0/1/2 - 0, Disallow 1, Allow 2, Kick upon suicide attempt
  • amx_alldie_stop_nature 1/0 - Controls if the plugin should punish upon deaths by trigger_hurt and worldspawn
  • amx_alldie_range - How far away can a player be from another player in his own team before punishing upon death, default 500. 0 disables and kills everyone when someone dies.
  • amx_alldie_shields 0/1/2/3 - 0 No one will get a free shield, 1 everyone will get a free shield (if they want that is), 2 only CT's get free shields, 3 only T's get free shields.
Note: To get a free shield use the command "+getshield".

Credits
- Borren
- The amx team
- wrecked_
Attached Files
File Type: sma Get Plugin or Get Source (onedie_alldie.sma - 826 views - 2.2 KB)
File Type: sma Get Plugin or Get Source (onedie_alldie_range_b2.sma - 754 views - 3.9 KB)

Last edited by axeld; 06-02-2010 at 18:26.
axeld is offline
DruGzOG
Veteran Member
Join Date: Nov 2007
Location: Unknown
Old 05-02-2010 , 18:43   Re: One die, all die
Reply With Quote #2

This plugin is pathetic.

Though you have a good scripting habit.
__________________
DruGzOG is offline
Send a message via AIM to DruGzOG
minimiller
Veteran Member
Join Date: Aug 2007
Location: United Kingdom
Old 05-02-2010 , 18:50   Re: One die, all die
Reply With Quote #3

seems a bit pointless imo. if u want ppl to stick together more, kill players that are further than a cvariable radius away
also, the cvar for kill in console or not is stupid. u should block it anyway because it will only get abused
in your loop, cs_get_user_team(players[i]) should be cached and it would be easier to cache cs_get_user_team(victim) into CsTeams:team aswell
__________________
minimiller is offline
Send a message via MSN to minimiller
<VeCo>
Veteran Member
Join Date: Jul 2009
Location: Bulgaria
Old 05-03-2010 , 04:22   Re: One die, all die
Reply With Quote #4

Use pcvars.
__________________
<VeCo> is offline
axeld
Junior Member
Join Date: May 2010
Old 05-03-2010 , 10:18   Re: One die, all die
Reply With Quote #5

- "Use pcvars."
I'll try to fix that, as i understand correctly it should go something like:
new pcVar_var = register_cvar("amx_mycvar", "value")
So that i don't call it from the engine excessively
Thanks.

- "if u want ppl to stick together more, kill players that are further than a cvariable radius away"
That somewhat fits the purpose but that's not really what the plugin was intended to do. Also, that is probably done a few times already, why make another?

- "the cvar for kill in console or not is stupid. u should block it anyway because it will only get abused"
If this plugin would get approved, someone would probably at some time feel the need of using kill, why remove freedom?
axeld is offline
Nextra
Veteran Member
Join Date: Apr 2008
Location: Germany
Old 05-03-2010 , 11:11   Re: One die, all die
Reply With Quote #6

Maybe you should add the option to vary the punishment for the other players. Removing only some health or removing money could be interesting options to instant kill. Killing all players could become frustrating very quickly, while I think a rather subtle punishment might be more engaging.
Also that system is very easy to abuse, one player could just stupidly run around and get killed every round just to mess up the game and get everyone killed.

Other suggestions:
- pcvars are a necessity.
- Instead of blocking suicide completely you could also let the player suicide without killing his team.
- Why do you receive the values as float when you compare them as integers? Compiler warning?
- There is no reason to re-assign your own values to the different teams, just do this:
Code:
new CsTeams:team = cs_get_user_team( victim )
//...
new id;
for (new i=0; i<num; i++)
{
    id = players[i];
    
    if(cs_get_user_team(id) == team)
        user_kill(id, 1);
}
- Instead of doing string comparison for the killer you could just use either of the following:
Code:
// Get the killer id first
new killer = read_data(1);

// ...
if(is_user_connected(killer))
{
    //killer is a player, not worldspawn or trigger_hurt
}

// For this you need to store get_maxplayers() in a global variable, I called it g_iMaxPlayers

if(1<= killer <= g_iMaxPlayers)
{
    //killer is a player
}
- You should only create the players array and the victim and num variables if they are going to be used.
- In Forward_ClientKill return FMRES_SUPERCEDE when the cvar is 0, no need for if/else, one if condition is enough.
__________________
In Flames we trust!

Last edited by Nextra; 05-03-2010 at 11:25.
Nextra is offline
grimvh2
Veteran Member
Join Date: Nov 2007
Location: Fishdot Nation
Old 05-04-2010 , 14:51   Re: One die, all die
Reply With Quote #7

If you really want the team to stick together u should make it so when how bigger the group is, how more damage they can do and how more defense they got. but not like on dies, all dies because thats just shit.
__________________
I am out of order!
grimvh2 is offline
ServO
Senior Member
Join Date: Nov 2009
Location: Are you asking me out?
Old 05-06-2010 , 15:52   Re: One die, all die
Reply With Quote #8

What is actully the point with this mod?
__________________
Zombie Dominance

To Do:
- Learn AMXx Script...

Last edited by ServO; 05-06-2010 at 15:59.
ServO is offline
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 05-06-2010 , 16:56   Re: One die, all die
Reply With Quote #9

I'm gonna go out on a limb and say that I actually kinda like this personally, although I could easily see it getting annoying if you have a really bad player on your team. The coding is really bad, though. I'm guessing axeld did Java before Pawn by the looks of his code.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 05-06-2010 , 17:11   Re: One die, all die
Reply With Quote #10

Quote:
Originally Posted by DruGzOG View Post
This plugin is pathetic.
You're pathetic.
__________________
hleV is offline
Reply



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 21:32.


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