Raised This Month: $51 Target: $400
 12% 

[ANY] Map Zones (with forwards)


Post New Thread Reply   
 
Thread Tools Display Modes
CenT
Senior Member
Join Date: Aug 2009
Location: FRANCE
Old 06-24-2014 , 13:46   Re: [ANY] Map Zones (with forwards)
Reply With Quote #111

Root, you can do an upgrade this plugin to CS: GO please?

https://forums.alliedmods.net/showthread.php?p=1433894
CenT is offline
Root_
Veteran Member
Join Date: Jan 2012
Location: ryssland
Old 06-24-2014 , 14:15   Re: [ANY] Map Zones (with forwards)
Reply With Quote #112

CenT I dont maintain other's plugins unless I want to make redux. This one is different, but based on Anti-rush you provided. However, you can create another plugin along with this one and use code like that.
Code:
#include <sdktools> #include <sdkhooks> public OnPluginStart() {     switch (EngineVersion:GetEngineVersion())     {         case Engine_DODS: HookEvent("dod_round_start",      OnRoundStart, EventHookMode_PostNoCopy);         case Engine_TF2:  HookEvent("teamplay_round_start", OnRoundStart, EventHookMode_PostNoCopy);         default:          HookEventEx("round_start",        OnRoundStart, EventHookMode_PostNoCopy);     } } public OnRoundStart(Handle:event, const String:name[], bool:dontBroadcast) {     // Diactivate/activate my zone by name     ServerCommand("sm_diactzone myzone");     CreateTimer(30.0, Timer_ActivateMyZone, _, TIMER_FLAG_NO_MAPCHANGE); } public Action:Timer_ActivateMyZone(Handle:timer) {     // Activate/diactivate my zone after 30 seconds on round start     ServerCommand("sm_actzone myzone");     // Lets find its entity     decl String:class[MAX_NAME_LENGTH*2], zone; zone = -1;     while ((zone = FindEntityByClassname(zone, "trigger_multiple")) != -1)     {         if (IsValidEntity(zone)         && GetEntPropString(zone, Prop_Data, "m_iName", class, sizeof(class))         && StrEqual(class[8], "myzone", false)) // Yet again compare by name         {             // Set pushaway collision group             SetEntProp(zone, Prop_Send, "m_CollisionGroup", 17);         }     } }
__________________


dodsplugins.com - Plugins and Resources for Day of Defeat
http://twitch.tv/zadroot
Root_ is offline
404UserNotFound
BANNED
Join Date: Dec 2011
Old 07-02-2014 , 13:36   Re: [ANY] Map Zones (with forwards)
Reply With Quote #113

Quote:
Originally Posted by Root_ View Post
TF2 Melee bug has been resolved.
To enable/disable godmode you should create zone with custom punishment and get this plugin. After doing that, download attached plugin and test it.

After naming/renaming a zone you should define its name in chat. Other than that make sure you are running SourceMod 1.5.1+, otherwise you will not able to name/rename it at all.
I took the godmode zones plugin and simplified it by using this code:

PHP Code:
public Action:OnEnteredProtectedZone(client, const String:prefix[])
{
    static 
Handle:ShowZones   INVALID_HANDLE;
    if (!
ShowZonesShowZones FindConVar("sm_zones_show_messages");

    if (
<= client <= MaxClients)
    {
        
SetEntProp(clientProp_Data"m_takedamage"01);
    }
}

public 
Action:OnLeftProtectedZone(client, const String:prefix[])
{
    static 
Handle:ShowZones   INVALID_HANDLE;
    if (!
ShowZonesShowZones FindConVar("sm_zones_show_messages");

    if (
<= client <= MaxClients)
    {
        
SetEntProp(clientProp_Data"m_takedamage"21);
    }

But I do have a question. How exactly does the zones plugin pull the name of the function for the menu when selecting a custom punishment for a zone.

Like, I'm looking at the godmode zone plugin and I don't see anything that would indicate how the zones plugin generated a name for the function of godmoding players in a zone.

I mean, I may just be imagining things but I swore the custom punishment option brought up stuff like "God mode player" or something.
404UserNotFound is offline
ArchangelGabriel
Member
Join Date: Jan 2014
Location: United States
Old 07-02-2014 , 17:18   Re: [ANY] Map Zones (with forwards)
Reply With Quote #114

Would it be possible to rewrite one of the existing punishments and change it to something else?
__________________
ArchangelGabriel is offline
404UserNotFound
BANNED
Join Date: Dec 2011
Old 07-06-2014 , 22:45   Re: [ANY] Map Zones (with forwards)
Reply With Quote #115

You should probably do manage attachments and upload the .SP and compiled .SMX as attachments to your main post.

Maybe then it'd be considered to be Approved
404UserNotFound is offline
Root_
Veteran Member
Join Date: Jan 2012
Location: ryssland
Old 07-07-2014 , 07:21   Re: [ANY] Map Zones (with forwards)
Reply With Quote #116

Sorry for the late reply.
Quote:
Originally Posted by abrandnewday View Post
I took the godmode zones plugin and simplified it by using this code:

PHP Code:
public Action:OnEnteredProtectedZone(client, const String:prefix[])
{
    static 
Handle:ShowZones   INVALID_HANDLE;
    if (!
ShowZonesShowZones FindConVar("sm_zones_show_messages");

    if (
<= client <= MaxClients)
    {
        
SetEntProp(clientProp_Data"m_takedamage"01);
    }
}

public 
Action:OnLeftProtectedZone(client, const String:prefix[])
{
    static 
Handle:ShowZones   INVALID_HANDLE;
    if (!
ShowZonesShowZones FindConVar("sm_zones_show_messages");

    if (
<= client <= MaxClients)
    {
        
SetEntProp(clientProp_Data"m_takedamage"21);
    }

You also need to check zone name (unless there are only one custom punishment and only for godmode). See example plugin

Quote:
Originally Posted by abrandnewday View Post
But I do have a question. How exactly does the zones plugin pull the name of the function for the menu when selecting a custom punishment for a zone.

Like, I'm looking at the godmode zone plugin and I don't see anything that would indicate how the zones plugin generated a name for the function of godmoding players in a zone.

I mean, I may just be imagining things but I swore the custom punishment option brought up stuff like "God mode player" or something.
I dont quite understand you. To be clear, plugin calls global starttouch/endtouch forwards when player enteres or leaves a zone with custom punishment. It looks like this
Code:
case CUSTOM: {     // Start appropriate OnEntered/Left zone forwards in custom punishment to deal with other plugins     Call_StartForward(StartTouch ? OnEnteredProtectedZone : OnLeftProtectedZone);     // Add zone (caller) entity index     Call_PushCell(caller);     // Add the client id when its passing a zone     Call_PushCell(activator);     // Add zones prefix for this forward too, so plugins can print messages with proper prefix     Call_PushString(PREFIX);     // And finally call the forward     Call_Finish(); }
Quote:
Originally Posted by ArchangelGabriel View Post
Would it be possible to rewrite one of the existing punishments and change it to something else?
You want to change default punishments, right? Just use custom ones and create own, its not that hard. If you want to suggest more, feel free to request.

Quote:
Originally Posted by abrandnewday View Post
You should probably do manage attachments and upload the .SP and compiled .SMX as attachments to your main post.

Maybe then it'd be considered to be Approved
It doesnt makes sense. You can easily download whole plugin and review it tho
__________________


dodsplugins.com - Plugins and Resources for Day of Defeat
http://twitch.tv/zadroot
Root_ is offline
404UserNotFound
BANNED
Join Date: Dec 2011
Old 07-07-2014 , 09:41   Re: [ANY] Map Zones (with forwards)
Reply With Quote #117

Quote:
Originally Posted by Root_ View Post
feel free to request.
- God mode player
- Buddha mode player
- Slay player
- God mode bots
- Buddha mode bots
- Slay bots

There's so much more that could be done to this plugin in the way of zone functions.

You could choose the function then choose Players, Bots or Both, then furthermore which team and display teams based on the game.
404UserNotFound is offline
Root_
Veteran Member
Join Date: Jan 2012
Location: ryssland
Old 07-07-2014 , 10:57   Re: [ANY] Map Zones (with forwards)
Reply With Quote #118

Quote:
Originally Posted by abrandnewday View Post
- God mode player
- Buddha mode player
- Slay player
- God mode bots
- Buddha mode bots
- Slay bots

There's so much more that could be done to this plugin in the way of zone functions.

You could choose the function then choose Players, Bots or Both, then furthermore which team and display teams based on the game.
Good point. I will add more options to 'team filter' later, such as All Terrorists, Players Terrorists, Bots Terrorists, All CT's, Player CT's, Bots CT's.
__________________


dodsplugins.com - Plugins and Resources for Day of Defeat
http://twitch.tv/zadroot
Root_ is offline
XefolyN
Junior Member
Join Date: Sep 2014
Location: Australia
Old 09-21-2014 , 21:39   Re: [ANY] Map Zones (with forwards)
Reply With Quote #119

Great plugin, I have one problem though. I want to use this plugin to make a VIP only door for a VIP room. Only people with a specific flag can walk through it, not just admins.

Is this possible?
__________________
Proud Owner of Brotherhood of traders
XefolyN is offline
Send a message via Skype™ to XefolyN
fiala06
AlliedModders Donor
Join Date: Mar 2009
Location: Eugene, OR
Old 10-01-2014 , 23:58   Re: [ANY] Map Zones (with forwards)
Reply With Quote #120

Thank you so much for this plugin. This has saved me a ton of headaches!

I was wondering if its possible to control what weps are allowed with the melee only zone. I have a boxing ring in my server and people complain about demos being able to use charge and dead ringers primarily (alternate attacks for weps). Is there any way I can block those from the zone also?
fiala06 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 22:06.


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