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

SDK Hooks 2.1 - Updated 2011-9-10


Post New Thread Closed Thread   
 
Thread Tools Display Modes
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 09-01-2010 , 11:15   Re: [EXTENSION] SDK Hooks 1.3 (Updated 2010-05-12)
#831

Quote:
Originally Posted by chu1720 View Post
Is that the "SDKHook_OnTakeDamage" function doesn't work?
Only that in L4D2 you can't modify damage (other than blocking it).
__________________
asherkin is offline
chu1720
Senior Member
Join Date: Mar 2010
Location: Hong Kong
Old 09-02-2010 , 23:37   Re: [EXTENSION] SDK Hooks 1.3 (Updated 2010-05-12)
#832

Quote:
Originally Posted by asherkin View Post
Only that in L4D2 you can't modify damage (other than blocking it).
Than i can block the damage and use "point_hurt" to reproduce the damge.
How can i block the damage?
chu1720 is offline
Send a message via MSN to chu1720
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 09-03-2010 , 06:40   Re: [EXTENSION] SDK Hooks 1.3 (Updated 2010-05-12)
#833

Quote:
Originally Posted by chu1720 View Post
How can i block the damage?
Return Plugin_Handled in the callback.
__________________
asherkin is offline
SPHunt3r
New Member
Join Date: Aug 2010
Old 09-03-2010 , 12:07   Re: [EXTENSION] SDK Hooks 1.3 (Updated 2010-05-12)
#834

so what does this actually do?
what if i put it on my server, does this change something? less performance? bugs while playing a war?
SPHunt3r is offline
psychonic

BAFFLED
Join Date: May 2008
Old 09-03-2010 , 14:02   Re: [EXTENSION] SDK Hooks 1.3 (Updated 2010-05-12)
#835

Quote:
Originally Posted by SPHunt3r View Post
so what does this actually do?
Exposes more functionality to plugins. Some require it, some can do more when it's available, and many do not use it at all.

Quote:
Originally Posted by SPHunt3r View Post
what if i put it on my server, does this change something? less performance? bugs while playing a war?
On it's own? no, no, and no. It is however possible that an individual plugin using it could do some silly things, but this isn't likely to be the case with any in the approved section.
psychonic is offline
Shit on shoe
Senior Member
Join Date: Jul 2010
Old 09-05-2010 , 17:11   Re: [EXTENSION] SDK Hooks 1.3 (Updated 2010-05-12)
#836

i use a gungame server! for counterstrike source! what for a version i need ?
Shit on shoe is offline
psychonic

BAFFLED
Join Date: May 2008
Old 09-05-2010 , 17:25   Re: [EXTENSION] SDK Hooks 1.3 (Updated 2010-05-12)
#837

Quote:
Originally Posted by Shit on shoe View Post
i use a gungame server! for counterstrike source! what for a version i need ?
The only one of the downloads that is labeled "CS:S"
psychonic is offline
DeJaDeW
SourceMod Donor
Join Date: Jul 2009
Location: California
Old 09-07-2010 , 16:48   Re: [EXTENSION] SDK Hooks 1.3 (Updated 2010-05-12)
#838

I currently have a problem reviving an old Duke sm plugin with the skhooks.

PHP Code:
#include <sdkhooks>
#include <sdktools>

public OnConfigsExecuted()
{
    
PrecacheModel("models/props_junk/watermelon01.mdl"true);
}

public 
OnEntityCreated(edict, const String:classname[])
{
    
SDKHook(edictSDKHook_SpawnOnEntitySpawned);
}

// entity listener
public OnEntitySpawned(edict)
{
    new 
String:classname[64];
    
GetEdictClassname(edictclassnamesizeof(classname));
    if (
StrEqual(classname"tf_projectile_pipe"))
    {
        
SetEntityModel(edict"models/props_junk/watermelon01.mdl");
    }
    return;

__________________
DeJaDeW is offline
AtomicStryker
Veteran Member
Join Date: Apr 2009
Location: Teutonia!!
Old 09-08-2010 , 04:51   Re: [EXTENSION] SDK Hooks 1.3 (Updated 2010-05-12)
#839

PHP Code:
#include <sdkhooks>
#include <sdktools>

public OnConfigsExecuted()
{
    
PrecacheModel("models/props_junk/watermelon01.mdl"true);
}

public 
OnEntityCreated(edict, const String:classname[])
{
    if (
StrEqual(classname"tf_projectile_pipe"))
    {
        
SetEntityModel(edict"models/props_junk/watermelon01.mdl");
    }
    return;

Try it this way
AtomicStryker is offline
darkjohn20
Junior Member
Join Date: Jun 2009
Old 09-20-2010 , 19:34   Re: [EXTENSION] SDK Hooks 1.3 (Updated 2010-05-12)
#840

Problem solved. To disarm player when you shoot their hand/arm:

PHP Code:
#include <sourcemod>
#include <sdktools>
#include <sdkhooks>
 
public OnClientPutInServer(client)
{
    
SDKHook(clientSDKHook_TraceAttackOnTraceAttack);
}

public 
Action:OnTraceAttack(victim, &attacker, &inflictor, &Float:damage, &damagetype, &ammotypehitboxhitgroup)
{
    if(
hitgroup == || hitgroup == 5)
    {
    
ClientCommand(victim"drop"); 
        return 
Plugin_Changed;
    }
    return 
Plugin_Continue;


Last edited by darkjohn20; 09-20-2010 at 20:36.
darkjohn20 is offline
Closed Thread



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:51.


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