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

team immune to func_vehicle damage


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
`666
AlliedModders Donor
Join Date: Jan 2006
Old 10-16-2007 , 12:23   team immune to func_vehicle damage
Reply With Quote #1

Can some one please make plugin that gives damage immunity from func_vehicle if it is player that from your own team who is driving it.

thanks.
`666 is offline
Jheshka
Senior Member
Join Date: Dec 2005
Old 10-17-2007 , 09:10   Re: team immune to func_vehicle damage
Reply With Quote #2

Good idea for a plugin, kind of annoying on some maps...

[offtopic]The guy in your signature sucks at knifing[/offtopic]
__________________
James
Jheshka is offline
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 10-17-2007 , 09:33   Re: team immune to func_vehicle damage
Reply With Quote #3

Try this : Tell me if works, if not i will try something else...:s

Note:*This blocks any vehicle damage. Dunno if i can get vehicle owner team... :/

Code:
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
 
#define PLUGIN "Anti Vehicle Damage"
#define VERSION "1.0"
#define AUTHOR "Alka"

public plugin_init() {
 
 register_plugin(PLUGIN, VERSION, AUTHOR);
 
 RegisterHam(Ham_TakeDamage, "player", "HookDamage");
}
 
public HookDamage(idVictim, idInflictor, idAttacker, Float:Damage, Dmgbits)
{
 if(!is_user_alive(idVictim))
  return HAM_IGNORED;
 
 if(idVictim == idAttacker)
  return HAM_IGNORED;
 
 new VehicleEnt = engfunc(EngFunc_FindEntityByString, VehicleEnt, "classname", "func_vehicle");
 
 if(idInflictor != VehicleEnt)
  return HAM_IGNORED;
 
 new Float:NewDamage = 0.0;
 
 ExecuteHam(Ham_TakeDamage, idVictim, any:idInflictor, any:idAttacker, any:NewDamage, any:Dmgbits);
 
 return HAM_IGNORED;
}
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
`666
AlliedModders Donor
Join Date: Jan 2006
Old 10-17-2007 , 11:04   Re: team immune to func_vehicle damage
Reply With Quote #4

Compiled with no errors, sorry but can't test it now, because i got stable version of amxx running, & too bad what it blocks damage for all players. I hope some one figures out how to detect team players.

thanks anyway Alka
`666 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 14:51.


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