Raised This Month: $ Target: $400
 0% 

Buyzone Protect


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
gui1porpis
Member
Join Date: Jan 2009
Location: Brodowski, SP, Brazil
Old 03-06-2017 , 19:51   Buyzone Protect
Reply With Quote #1

Hello, I would like to know if there is any plugin that does protection on buyzone for surf maps.

Example:

Player who is out of buyzone can attack what is inside the buyzone (cage of surf_style2)

Both can not get attacked inside the buyzone.

I found something similar, but not to attack when one is out and the other is inside the buyzone.
https://forums.alliedmods.net/showpo...08&postcount=3
__________________
gui1porpis is offline
Send a message via MSN to gui1porpis Send a message via Skype™ to gui1porpis
Relaxing
AlliedModders Donor
Join Date: Jun 2016
Location: White Plains
Old 03-07-2017 , 04:10   Re: Buyzone Protect
Reply With Quote #2

https://forums.alliedmods.net/showthread.php?p=923637
__________________
Relaxing is offline
gui1porpis
Member
Join Date: Jan 2009
Location: Brodowski, SP, Brazil
Old 03-07-2017 , 20:43   Re: Buyzone Protect
Reply With Quote #3

But this plugins will only work on surf_ski_2 correct? I wanted one that decried just the buyzone and was already acting the protection.
__________________
gui1porpis is offline
Send a message via MSN to gui1porpis Send a message via Skype™ to gui1porpis
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 03-08-2017 , 13:30   Re: Buyzone Protect
Reply With Quote #4

You can attack players inside the buyzone if you're outside it, but players inside it can not get attacked?!
If 2+2 is 4, then this doesn't make any sense. Please read carefully what you have written.

If you meant that you can't damage players while you're inside a buyzone, here:

PHP Code:
#include <amxmodx>
#include <cstrike>
#include <hamsandwich>

public plugin_init()
{
    
register_plugin("No Shooting from Buyzone""1.0""OciXCrom @ alliedmods.net")
    
RegisterHam(Ham_TakeDamage"player""OnPlayerDamagePre"0)
}

public 
OnPlayerDamagePre(iVictimiInflictoriAttackerFloat:flDamageiDamageBits)
{
    if(!
is_user_connected(iAttacker) || !is_user_connected(iVictim) || iAttacker == iVictim)
        return 
HAM_IGNORED
        
    
return cs_get_user_buyzone(iAttacker) ? HAM_SUPERCEDE HAM_IGNORED

__________________

Last edited by OciXCrom; 03-08-2017 at 13:32.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
gui1porpis
Member
Join Date: Jan 2009
Location: Brodowski, SP, Brazil
Old 03-08-2017 , 17:33   Re: Buyzone Protect
Reply With Quote #5

Quote:
Originally Posted by OciXCrom View Post
You can attack players inside the buyzone if you're outside it, but players inside it can not get attacked?!
If 2+2 is 4, then this doesn't make any sense. Please read carefully what you have written.

If you meant that you can't damage players while you're inside a buyzone, here:

PHP Code:
#include <amxmodx>
#include <cstrike>
#include <hamsandwich>

public plugin_init()
{
    
register_plugin("No Shooting from Buyzone""1.0""OciXCrom @ alliedmods.net")
    
RegisterHam(Ham_TakeDamage"player""OnPlayerDamagePre"0)
}

public 
OnPlayerDamagePre(iVictimiInflictoriAttackerFloat:flDamageiDamageBits)
{
    if(!
is_user_connected(iAttacker) || !is_user_connected(iVictim) || iAttacker == iVictim)
        return 
HAM_IGNORED
        
    
return cs_get_user_buyzone(iAttacker) ? HAM_SUPERCEDE HAM_IGNORED

With this code, when I'm in buyzone can I attack anyone outside? Example: surf_style2
__________________
gui1porpis is offline
Send a message via MSN to gui1porpis Send a message via Skype™ to gui1porpis
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 03-08-2017 , 18:39   Re: Buyzone Protect
Reply With Quote #6

No.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
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 20:22.


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