Raised This Month: $ Target: $400
 0% 

blocking player_hurt


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
frozenice
Junior Member
Join Date: Oct 2007
Location: germany, thüringen
Old 10-12-2007 , 14:43   blocking player_hurt
Reply With Quote #1

PHP Code:
#include <sourcemod>

public Plugin:myinfo = {
    
name "No Damage",
    
author "frozenice",
    
description "Disables damaging others!",
    
version "0.2",
    
url "http://frozenice.de"
};

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

public 
Action:Event_PlayerHurt(Handle:event, const String:name[], bool:dontBroadcast)
{
    new 
victimId GetEventInt(event"userid")
    new 
attackerId GetEventInt(event"attacker")
    if (
victimId != attackerId)
    {
        return 
Plugin_Handled
    
}
    
    return 
Plugin_Continue

doesn't block it!
why? is there some pre-processing from the engine or sth? (tried in Fortress Forever btw)
frozenice is offline
Send a message via ICQ to frozenice Send a message via AIM to frozenice Send a message via MSN to frozenice Send a message via Yahoo to frozenice
 



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 18:19.


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