Raised This Month: $73 Target: $400
 18% 

Death Zone


Post New Thread Reply   
 
Thread Tools Display Modes
hubington
Junior Member
Join Date: Aug 2007
Old 09-04-2008 , 19:49   Re: Death Zone
Reply With Quote #11

Firstly, hats off to you sir, just got it up and running on a map and I'm loving it.

few questions

1) At the moment I'm trying to tweek the zones however when ever I want to tweek them I have to wipe them all and then re-enter the lot. Could you tell me where the data is stored so that I can just edit the variables in the file rather than re-ploting.

2) it's only giving an alert when people first enter for me and I'm using it in areas I don't mind people walking through but I don't want them stopping there. As such they can end up walking through quite a few times, so I wondered it you could advise what I need to change to have that warning come up every time somoene enters a zone, not just the first time they do so.


Many Thanks in advance!
__________________
If it's stupid, but it works, it's not stupid
hubington is offline
hubington
Junior Member
Join Date: Aug 2007
Old 09-05-2008 , 05:47   Re: Death Zone
Reply With Quote #12

I've managed to answer my first question for myself. For anyone else who is wondering it goes to cstrike/addons/sourcemod/data/ each map has it's own text file called dz_[map name].txt

Another question Ive got though if I've got some irregularly shaed tunnels that I'd like to treat at 1 zone however if I put the whole tunnel in 1 zone then that zone also covers areas I don't want to be death zones. I've had two ideas about how to get around this and given your familiarity I wondered if you could give me any advice about modify it for this.

My first idea is to create a new zone called a safe zone that overrides the deathzones and then paint safe zones on the areas where the deathzone isn't wanted.

my second is to put in a way to link the deathzones so lay down 3 overlapping zones and then tell the system to treat them as just 1 zone.

My worry at the moment is that someone is going to work out where te zones overlap and just strafe between the 2 zones where the corners are.
__________________
If it's stupid, but it works, it's not stupid
hubington is offline
SWAT_88
SourceMod Donor
Join Date: Jan 2008
Location: Austria
Old 09-05-2008 , 18:12   Re: Death Zone
Reply With Quote #13

Quote:
Originally Posted by hubington View Post
2) it's only giving an alert when people first enter for me and I'm using it in areas I don't mind people walking through but I don't want them stopping there. As such they can end up walking through quite a few times, so I wondered it you could advise what I need to change to have that warning come up every time somoene enters a zone, not just the first time they do so.
FYI: I'm the lead programmer of this plugin.

Look at the paramters of dz_setzone; the last paramter is EscapeTime.
This time presents how much time the players have until they will die.
They must leave the zone in the specified time, otherwise they will die.
@first time:
? The warning appears each visit to this zone; not only the first time - every time they visit.

Quote:
Another question Ive got though if I've got some irregularly shaed tunnels that I'd like to treat at 1 zone however if I put the whole tunnel in 1 zone then that zone also covers areas I don't want to be death zones. I've had two ideas about how to get around this and given your familiarity I wondered if you could give me any advice about modify it for this.
Make a small zone, like a wall.
Set the Zone's EscapeTime to 0.
And anybody who want's enter the tunnel will die. No crossing zones, because you don't have the whole tunnel as zone.
__________________
SWAT_88 is offline
hubington
Junior Member
Join Date: Aug 2007
Old 09-05-2008 , 18:37   Re: Death Zone
Reply With Quote #14

I've only had it on for a day or so but I only seem to get the message that pops up in the middle of screen giving me the countdown with an audiable alert once.

I don't want them to not use tunnel I just don't want them to hang around in it. Hence my wanting to link several zones that would cover the tunnel without falling outside it.

in addition while looking at the code I notice a way to improve performance.

In the function CalculatePlayerInZone which I imagine fires many times each round you have a section that reads

if (ZoneMinZ > ZoneMaxZ)
{
Temp = ZoneMinZ;
ZoneMinZ = ZoneMaxZ;
ZoneMaxZ = Temp;
}

however you can pull this from that section if you make a change to the function CommandSetZone

change the section that said

else if (g_SetCoords[7] == 0.0)
{
g_SetCoords[7] = PlayerCoords[2];
ReplyToCommand(client, "Maximum height setted. (zMax: %f)\nNext will be the Reason.", PlayerCoords[2]);
}

to

else if (g_SetCoords[7] == 0.0)
{
if (PlayerCoords[2] < g_SetCoords[6])
{
g_SetCoords[7] = g_SetCoords[6]
g_SetCoords[6] = PlayerCoords[2]
}
g_SetCoords[7] = PlayerCoords[2];
ReplyToCommand(client, "Maximum height setted. (zMax: %f)\nNext will be the Reason.", PlayerCoords[2]);
}

Then you have made sure the data is formated properly just once before it's saved rather than needing to check it everytime you scan a player which saves on cycles.

It may be the same logic can be applied to the X & Y co-ordinates too but the Z ones are a lot more simple to read and I've not got round to following the rest of it yet.

If you have any ideas on why I'm not getting the audable warnings & count downs it would be much appreceated. For the record I'm running the std version for the moment so it isn't that I've broken it.
__________________
If it's stupid, but it works, it's not stupid
hubington is offline
Jason Argo
Member
Join Date: Apr 2008
Location: Sydney, Australia
Old 09-05-2008 , 21:03   Re: Death Zone
Reply With Quote #15

Hi SWAT_88,

Could you add a Cvar that allows for an expiry of zones for each round, like dz_roundexpire 60, that zone would work for the first minute of each round. This would be a near perfect solution to spawn killing on surf maps, spawn protection just doesn't work as each map is different and players go different ways on the map resulting in players being unprotected and others not being able to kill each other. Having zones of death for a particular amount of time at the beginning of each round would be great, thanks if you look into this request.
__________________

"Computers in the future may have only 1,000 vacuum tubes and perhaps only weigh 1.5 tonnes"


- Popular Mechanics magazine, March 1949.
Jason Argo is offline
hubington
Junior Member
Join Date: Aug 2007
Old 09-06-2008 , 05:51   Re: Death Zone
Reply With Quote #16

So long as you want it to effect ALL zones not that you specify an expiry for each zone, I think I can help you (i.e. a global experation from round start then all zones stop working till the next round). You could then get a plugin that lets you change the public values by map if you wanted to vary the time frame from map to map. Technically either is possaible but that way should be quite quick where as the other would be extreamly involved and require a whole load of testing that I don't really have an enviroment set up for.

I don't belive I can post an attachment though so if that sounds like it could do the trick then send me a pm with your email and I'll give it my best and forward it on to you. All I ask in exchange is you drink a cold beer under the suns rays for me, being in England I have to experiance good weather vicariously.

Also if any of the Devs on this project want me to forward what I do to them so they can make it avalialbe to everyone then just let me know.
__________________
If it's stupid, but it works, it's not stupid
hubington is offline
hubington
Junior Member
Join Date: Aug 2007
Old 09-06-2008 , 18:16   Re: Death Zone
Reply With Quote #17

SWAT_88, I've been looking at the code and it would seem that your using the players coordinates to help work out where the 4th x/y coordinate for the deathzone should be.

Am I right in that assumption and if so, why?

The cube should be determined by the existing markers alone, by including the players location you include the possiablity for some irregular movements in where the zones end making it very difficult to acuratly lay them.
__________________
If it's stupid, but it works, it's not stupid
hubington is offline
SWAT_88
SourceMod Donor
Join Date: Jan 2008
Location: Austria
Old 09-09-2008 , 16:44   Re: Death Zone
Reply With Quote #18

Quote:
Originally Posted by hubington View Post
So long as you want it to effect ALL zones not that you specify an expiry for each zone, I think I can help you (i.e. a global experation from round start then all zones stop working till the next round). You could then get a plugin that lets you change the public values by map if you wanted to vary the time frame from map to map. Technically either is possaible but that way should be quite quick where as the other would be extreamly involved and require a whole load of testing that I don't really have an enviroment set up for.

I don't belive I can post an attachment though so if that sounds like it could do the trick then send me a pm with your email and I'll give it my best and forward it on to you. All I ask in exchange is you drink a cold beer under the suns rays for me, being in England I have to experiance good weather vicariously.

Also if any of the Devs on this project want me to forward what I do to them so they can make it avalialbe to everyone then just let me know.
Yes, of course, because I have no time at the moment.
Therefore it would be really nice if you want to optimize the plugin and add some features.
You could send me a pm if you are finished.

Thanks in Advance.
__________________
SWAT_88 is offline
Smookydope
New Member
Join Date: Oct 2008
Old 10-06-2008 , 19:06   Re: Death Zone
Reply With Quote #19

Hallo Leute ,

habe mir folgendes Plugin runtergeladen und Installiert.

http://forums.alliedmods.net/showthr...ght=death+zone

Habe auch schon erfolgreich Todeszonen für alle definiert was ich anhand der Dateien in /cstrike/addons/sourcemod/data/ sehen kann die dort für jede Map angelegt werden.
Beispiel für aim_ak-colt :
Code:
4,1775.249389,-700.075683,-237.643554,-703.586120,-239.328048,-766.718688,15.050565,176.185302,rusher,0
Mein problem ist einfach das nix passiert wenn da jemand reinläuft.

Wäre nett wenn mir da mal jemand weiterhelfen könnte und mir einen tipp gibt was ich verkehrt mache.

Schonmal vielen dank im vorraus.

Gruß Smooky
Smookydope is offline
skyline
Junior Member
Join Date: May 2008
Old 10-07-2008 , 14:27   Re: Death Zone
Reply With Quote #20

Cant seem to get this mod to work on my server properly, I have a linux server and up to date sourcemod but also use rpg and dm. Im trying to coverspawn zones (on map surf_japan_v10) but when i set a zone, you go into the zone, and the timer starts counting, but screws up, it doesnt count down properly and if you kill someone while in the zone it resets :S and you never end up exploding. any idea's where ive gone wrong with this at all? cheers for help
skyline 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 17:25.


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