AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Approved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=8)
-   -   Spawn Damage Preventer v0.1.1 (https://forums.alliedmods.net/showthread.php?t=115060)

fezh 01-09-2010 20:26

Spawn Damage Preventer v0.1.1
 
1 Attachment(s)
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 -

Asd' 01-09-2010 20:29

Re: Spawn Damage Preventer v0.1.0
 
n1, Good job.

fezh 01-09-2010 20:31

Re: Spawn Damage Preventer v0.1.0
 
Quote:

Originally Posted by Asd' (Post 1049848)
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.

ConnorMcLeod 01-09-2010 20:35

Re: Spawn Damage Preventer v0.1.0
 
This willl just fail to catch next player team...

PHP Code:

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



fezh 01-09-2010 21:51

Re: Spawn Damage Preventer v0.1.1
 
Plugin updated with the same features but avoiding most bugs about getting user's team.

xPaw 01-10-2010 04:31

Re: Spawn Damage Preventer v0.1.1
 
You should add Ham_TakeDamage hook, because when you throw a grenade, TraceAttack is not called.

Javivi 01-10-2010 07:11

Re: Spawn Damage Preventer v0.1.1
 
hey fezh, you are not using #define MAX_PLAYERS.

joropito 01-10-2010 12:08

Re: Spawn Damage Preventer v0.1.0
 
Quote:

Originally Posted by fezh (Post 1049851)
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

ÜnLoCo 04-22-2010 16:22

Re: Spawn Damage Preventer v0.1.1
 
Hello
can you adjust this plugin to prevent damage from the other team !
it will be cool on awp_map ! no spawn kill please :nono:
Thank You


All times are GMT -4. The time now is 09:44.

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