PDA

View Full Version : seconds after death


Pings
07-19-2008, 02:25 AM
I have seen a few ideas from DOD:S made into plugins for DOD here. What someone should make is. The how ever many seconds after death the other team drops their weapons. So the winning team can mop up the losing team. Just like it is in DOD:S


Set seconds after death with cvar.
Losing team loses all their weapons.
Admins don't lose pistol, main gun, knife, and or nades, or lose them all with cvar.

Akula
09-30-2008, 09:27 AM
I was away to post the exact same message but seen this.

Any chance some of you guys can have a look at creating this ?

Im not too fussed about admins keeping weapons , the whole losing team should lose them in my opinion.

Dr.G
09-30-2008, 05:59 PM
Yeah maybe that would be fun... But iam not sure its easy to totaly strip pbl for weapons tho.

Akula
09-30-2008, 06:38 PM
The only thing i can think of thats close to it is the :

amx_evilmelee <player> = Only allow melee weapons for target

maybe a variation of this ???

Tank
09-30-2008, 07:32 PM
strip_user_weapons - Strips all weapons from user

It's an include from fun.inc, basicly it allows you to strip all weapons from the player and when needed you could replace their weapons loadout with that.

Dr.G
09-30-2008, 07:38 PM
Oh... Go on Tank u will soon have that plugin done :D

Tank
09-30-2008, 07:52 PM
Oh... Go on Tank u will soon have that plugin done

LOL, are we talking about the same "Tank" here? I'm no script daddy nor do I have the time atm (uni started 4 weeks ago, I'm planning to start doing something for it tomorrow) to become one.

I'll leave this to the people who actually know what they are doing.

PS: You might want to give this idea another thought though. If you are running stacked teams this will mean that one team, for example axis is going to pwnsauce allies over and over and over. You might just want to put this on round-end, so people only get pissed once instead of over and over :D

If you decide to go with the PS note, here is my never finished Melee On End, you can use it to set the end of gametime (took me a while to find something like that). Now remember, it's nowhere to completion, but I think the coding already done should work though:

//////////////////////////////////////////////////////////////////////////////////
// Module Includes
//
#include <amxmodx>
#include <fun>

///////////////////////////////////////////////////////////////////
// Version Settings
//
#define VERSION "0.1"
#define SVERSION "v0.1 - by The Tank (social.clanservers.com)"

//////////////////////////////////////////////////////////////////////////////////
// Global Variables
//

//////////////////////////////////////////////////////////////////////////////////
// PCVARs
//
new p_enable
new p_acttime
new pt_acttime

//////////////////////////////////////////////////////////////////////////////////
// Task ID
//

//////////////////////////////////////////////////////////////////////////////////
// Plugin Initialization
//
public plugin_init()
{
register_plugin("Tank's Melee On End",VERSION,"The Tank")
register_cvar("Tanks_MeleeOnEnd",SVERSION,FCVAR_SERVER|FCVAR_SPONLY)

p_enable = register_cvar("melee_on_end_enabled","1")
p_acttime = register_cvar("melee_on_end_time","60")

register_event("CurWeapon","enable_melee","a","1=1")


}

public plugin_cfg ()
{
if (get_pcvar_num(p_enable))
{
pt_acttime = max(1, get_pcvar_num(p_acttime))
set_task(float(pt_acttime),"enable_melee", _, _, _, "d")
}
}

public enable_melee ()
{
new max_players[33],inum,i
get_players(max_players,inum)
for(i = 0; i < inum; ++i)
{
if(is_user_connected(max_players[i]))
{
strip_user_weapons(id)
}
}
}

Zor
09-30-2008, 10:01 PM
Nice idea, been thought of, and not really possible. Its programed into the game that you cannot use your weapons after a cap. Only way to do that is if we can get source code and fix it. Unless somone else can think of a workabout.

Sorry!

WARDOG
10-01-2008, 02:19 AM
Give the winning team god mode for x amount of seconds.

Tank
10-01-2008, 07:52 AM
Nice idea, been thought of, and not really possible. Its programed into the game that you cannot use your weapons after a cap. Only way to do that is if we can get source code and fix it. Unless somone else can think of a workabout.

Sorry!

If there is a way to detect who just won the round you can make the frenzy the first minute/first 30 seconds of the new round and then restart the round or something....just spitting ideas as this is a bit over the top for me.

sparky99
10-02-2008, 06:03 AM
Change the flag master (Stripper2) to trigger an entity that would signal a win to a plugin that strips the losing teams weapons and forces a timed end of round?

Zor
10-02-2008, 09:52 AM
Hey sparky your onto something there...you would have to figure out the code in stripper2 and use what you need in the plugin. Then like you said instead of triggering a round end it triggers a timer for 20 secs and then that trigger will trigger the round end once its done. Also have your plugin wait for that 20 sec trigger to go off and like you say strip the other team of weapons. Never would of thought bout that, I used triggers all the time when fixing maps, and used stripper2 plenty of times, just never thought of the 2 together.

Good 1

Zor
10-02-2008, 10:55 AM
Ok, so lets trace this, here is the way it goes in Avalanche:

First we have the Control Master:

{
"origin" "64 320 96"
"axis_capture_target" "score_axis"
"allies_capture_target" "score_allies"
"point_give_delay_time" "20"
"classname" "dod_control_point_master"
}

Next we have the sounds of the win for the allies:
{
"origin" "64 256 96"
"volstart" "10"
"message" "ambience/uswin.wav"
"targetname" "score_allies"
"pitchstart" "100"
"pitch" "100"
"health" "10"
"spawnflags" "57"
"classname" "ambient_generic"
}

Then we have the trigger relay:
{
"classname" "trigger_relay"
"targetname" "score_allies"
"triggerstate" "2"
"target" "flag_state"
"origin" "-480 128 -16"
}

And finally we have the score entity, I think this is the one that does the blocking of weapons use:
{
"origin" "64 288 96"
"score_nextmapdelay" "3"
"message" "MAP_ALLIED_VICTORY1"
"targetname" "score_allies"
"team" "1"
"score_resetplayerstime" "3"
"score_resetitemtime" "3"
"score_points" "50"
"classname" "dod_score_ent"
}

Now having all that if we fit a delay in there somehow such as the round timer that I got from zalec:
{
"origin" "2432 2176 80"
"target" "allies_win"
"round_timer_length" "600"
"spawnflags" "1"
"classname" "dod_round_timer"
}

Or mayhap you could use the trigger multiple:
{
"spawnflags" "0"
"wait" "20"
"target" "allied_documents_msg"
"classname" "trigger_multiple"
}

So having thought it thru well you could probably do something like the following:
{
"origin" "64 320 96"
"axis_capture_target" "axis_win_delay"
"allies_capture_target" "allies_win_delay"
"point_give_delay_time" "20"
"classname" "dod_control_point_master"
}

{
"wait" "20"
"target" "allies_win_delay"
"targetname" "score_allies"
"classname" "trigger_multiple"
}

{
"wait" "20"
"target" "allies_win_delay"
"targetname" "score_allies"
"classname" "trigger_multiple"
}

Which should trigger a 20 second delay until cap. Now the only problem is if somone jumps a flag in that 20 seconds it could possible make it keep the map going, so mayhap use the plugin to restart the map no matter what if that be the case. Will have to test it.


Ok update just tested it with the modifications, going to check the map again to make sure its correct, it let me cap all the flags and then waited...but not 20 sec, just never did anything. So we axis and COULD cap a flag. So need to revisit.

Zor
10-02-2008, 11:40 AM
Ok, guess what! IT WORKS! So very excited, see this is what this community is for! Ok, now I dont have time to create a plugin but here is part of the footwork that you will need to do, from what I can decifer your going to have to use stripper2 code to start off with to learn how to rip out or edit the entity code for each map. Basically you have to find the dod_control_point_master and change the name for the two capture_target to your targetnames in the relays as seen above, then take the names that were in the capture_target and put them in the target area for the relays. Here is an example:

Original:
{
"origin" "-320 -880 100"
"point_give_delay_time" "900"
"cpm_group" "a"
"axis_capture_target" "axis_win"
"allies_capture_target" "allies_win"
"classname" "dod_control_point_master"
}


Modified:
{
"origin" "-320 -880 100"
"point_give_delay_time" "900"
"cpm_group" "a"
"axis_capture_target" "axis_win_delay"
"allies_capture_target" "allies_win_delay"
"classname" "dod_control_point_master"
}
{
"classname" "trigger_relay"
"targetname" "allies_win_delay"
"target" "allies_win"
"delay" "20"
"origin" "-480 -128 -16"
}
{
"classname" "trigger_relay"
"targetname" "axis_win_delay"
"target" "axis_win"
"delay" "20"
"origin" "-480 -200 -16"
}

Then you can code in to strip the users of weapons for the loosing team and the winners just can kill and kill and kill, I would say you don't allow adding of points for this phase of the game. So the kills dont count and the deaths dont count, my opinion.

Anyway, this all started from one guy asking a question and other people putting in their 2 cents!

Cheers!

Dr.G
10-02-2008, 05:37 PM
Yeah! Great job! Tank are u up for the rest :D

Tank
10-02-2008, 07:48 PM
Yeah! Great job! Tank are u up for the rest

As I stated in another thread, I'm truly sorry to break the news to you like this. But I hardly have any knowledge about coding. The plugins I created and am working on is really really basic. It's enough to help people out who never created a plugin which I try to do as much as possible. Im at a point of coding where I need to visit the company who created PAWN (it's located in the netherlands) and kidnapp some dude to teach me how to do it all :D

To be honest, the moment Sparky started posting in this thread I double checked to see we were still posting in English. I'm sorry but I can't help you with this, not yet at least.

Dr.G
10-03-2008, 03:46 PM
hehehe tank i was just kidding m8y :) I will never get how far u are with coding, i just dont get it, i tryed ;)

sparky99
10-03-2008, 08:43 PM
I don't code either I just play around with others code and make lil changes. If you make this plugin with a triggered entity like func_breakable (but not by bullets) put it high up on Ava (or a small ones above all the flag positions, as this tends to drop frame rates), let it/them Gib flags and play a generic end of round theme. Then when a team wins it will rain down FLAGS and play sound while a count down commences. If your really creative you could trigger different flags for the winning team, sounds etc, MiniSparky suggested this to me and showed me this in some of his Psycadelic Dod maps he makes, he does this in the map not in a plugin.
Just his idea really.

Vet
01-27-2009, 01:46 AM
To detect the win, hook dod_score_ent with Ham_Use (pre). Set up whatever options you want and keep superceding until your desired bonus round time is up.

Dr.G
01-27-2009, 08:13 AM
Ok i expected a link here from you, to the one u made... lol

Fysiks
01-28-2009, 05:32 PM
Ok i expected a link here from you, to the one u made... lol

He's probably got that code in a Vault in his basement somewhere that we can't get to it :).

Vet
02-23-2009, 01:44 AM
Ok i expected a link here from you, to the one u made... lolHERE (http://forums.alliedmods.net/showthread.php?t=86242) it is. Enjoy.