Raised This Month: $66 Target: $400
 16% 

Spawn Damage Preventer v0.1.1


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   General Purpose        Approver:   Exolent[jNr] (178)
fezh
Veteran Member
Join Date: Dec 2008
Location: BANNED
Old 01-09-2010 , 21:26   Spawn Damage Preventer v0.1.1
Reply With Quote #1

Spawn Damage Preventer v0.1.1

- Description -
This plugin avoids getting damage from team mates based on a simple idea: if the victim is in his/her buy zone (assuming it's located near player's spawn) the victim won't recieve any damage from his/her teammates.
This plugin was created for servers with friendly fire activated, just for avoid those stupid players who hit/kill team mates to annoy.

- Modules -
CStrike, HamSandwich

- Changelog -
Code:
- Version: 0.1.1 (January 10, 2010)
* Updated to try to avoid most bugs about getting user's team.

- Version: 0.1.0 (January 9, 2010)
* First public release.
- Download -
Attached Files
File Type: sma Get Plugin or Get Source (SpawnDamagePreventer.sma - 2959 views - 964 Bytes)
__________________
"There is no knowledge, that is not power"

Last edited by fezh; 01-09-2010 at 23:00.
fezh is offline
Asd'
Senior Member
Join Date: Jun 2009
Location: Argentina
Old 01-09-2010 , 21:29   Re: Spawn Damage Preventer v0.1.0
Reply With Quote #2

n1, Good job.
__________________
Asd' is offline
Send a message via MSN to Asd'
fezh
Veteran Member
Join Date: Dec 2008
Location: BANNED
Old 01-09-2010 , 21:31   Re: Spawn Damage Preventer v0.1.0
Reply With Quote #3

Quote:
Originally Posted by Asd' View Post
n1, Good job.
Thanks, but anyway I don't think searching for buy zones during damage is the best way to do this plugin's work. I'm open to suggestions if people think so.
__________________
"There is no knowledge, that is not power"
fezh is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 01-09-2010 , 21:35   Re: Spawn Damage Preventer v0.1.0
Reply With Quote #4

This willl just fail to catch next player team...

PHP Code:
public ClCmd_ChangeTeamiPlayer )
{
    
g_iPlayerTeamiPlayer ] = _:cs_get_user_teamiPlayer );

__________________
- tired and retired -
ConnorMcLeod is offline
Old 01-09-2010, 21:36
fezh
This message has been deleted by fezh.
fezh
Veteran Member
Join Date: Dec 2008
Location: BANNED
Old 01-09-2010 , 22:51   Re: Spawn Damage Preventer v0.1.1
Reply With Quote #5

Plugin updated with the same features but avoiding most bugs about getting user's team.
__________________
"There is no knowledge, that is not power"
fezh is offline
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 01-10-2010 , 05:31   Re: Spawn Damage Preventer v0.1.1
Reply With Quote #6

You should add Ham_TakeDamage hook, because when you throw a grenade, TraceAttack is not called.
__________________
xPaw is offline
Javivi
AlliedModders Donor
Join Date: Dec 2008
Old 01-10-2010 , 08:11   Re: Spawn Damage Preventer v0.1.1
Reply With Quote #7

hey fezh, you are not using #define MAX_PLAYERS.
__________________
Javivi is offline
joropito
AlliedModders Donor
Join Date: Mar 2009
Location: pfnAddToFullPack
Old 01-10-2010 , 13:08   Re: Spawn Damage Preventer v0.1.0
Reply With Quote #8

Quote:
Originally Posted by fezh View Post
Thanks, but anyway I don't think searching for buy zones during damage is the best way to do this plugin's work. I'm open to suggestions if people think so.
You could check if player received or not BuyClose msg.
Use a flag and reset it when player spawns.

I've never used that msg but as description says, it seem it'll work.

Quote:
BuyClose

Forces the buy menu to close. This is not called when the player closes the buy menu by himself; it's only called when the game forces him to do so (ie: he walks outside of the buy zone, gets killed, etcetera).
EDIT:

Another way is hooking for StatusIcon msgs and flag when buyzone icon turns on/off

See this tutorial
__________________

Divide et vinces
approved plugins | steam account

I don't accept PM for support. Just ask on forums.
If you're looking for private work, PM me.

Last edited by joropito; 01-10-2010 at 14:42.
joropito is offline
Send a message via MSN to joropito
ÜnLoCo
Member
Join Date: Dec 2009
Location: 35.77N, 10.82E
Old 04-22-2010 , 17:22   Re: Spawn Damage Preventer v0.1.1
Reply With Quote #9

Hello
can you adjust this plugin to prevent damage from the other team !
it will be cool on awp_map ! no spawn kill please
Thank You
__________________
ÜnLoCo 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 04:28.


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