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

[REQ] Disable Zeus Damage for teammate


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
digin
Member
Join Date: Nov 2019
Old 01-06-2020 , 08:55   [REQ] Disable Zeus Damage for teammate
Reply With Quote #1

can someone help me with this?

this plugin i using for disable knife damage for teammate but when i try to changed the "knife" to "taser" the taser damage still enable

PHP Code:
#include <sourcemod> 
#include <sdktools> 
#include <cstrike> 

public Plugin:myinfo = { 
    
name "Block Friendly Knife"
    
author "The Count"
    
description "Blocks knife damage if on friendly player."
    
version "1"
    
url "" 


public 
OnPluginStart(){ 
    
HookEvent("player_hurt"Event_PlayerHurtEventHookMode_Pre); 


public 
Action:Event_PlayerHurt (Handle:event, const String:name[], bool:dontBroadcast){ 
new 
String:wep[20]; 
new 
victim GetClientOfUserId(GetEventInt(event"userid")); 
new 
attacker GetClientOfUserId(GetEventInt(event"attacker")); 
GetEventString(event"weapon"wepsizeof(wep)); 

if(
strcmp(wep"knife"false)==0){ 
if(
GetClientTeam(victim) == GetClientTeam(attacker)){ 
SetEventInt(event"dmg_health"0); 
SetEventInt(event"dmg_armor"0); 
return 
Plugin_Changed


return 
Plugin_Continue

digin 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 13:41.


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