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

SDK Hooks 2.1 - Updated 2011-9-10


Post New Thread Closed Thread   
 
Thread Tools Display Modes
krolus
Senior Member
Join Date: May 2009
Location: Russia, Omsk
Old 04-13-2010 , 06:05   Re: [EXTENSION] SDK Hooks 1.3 (Updated 02/02/10)
#511

I use sdkhooks 1.3, sm 1.3.1
Why when i write and compile
PHP Code:
public OnEntityCreated(entity, const String:classname[]){
    if (
StrEqual(classname,"tf_projectile_rocket")){
        
PrintToChatAll("created %d",entity);
    }

For each rocket i get 2 messages. Why is this happening?
Attached Thumbnails
Click image for larger version

Name:	rocketz.png
Views:	254
Size:	23.3 KB
ID:	63635  
__________________
kAmmomod is deprecated. Take a look at MGE Training

Last edited by krolus; 04-13-2010 at 06:08.
krolus is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 04-13-2010 , 08:48   Re: [EXTENSION] SDK Hooks 1.3 (Updated 02/02/10)
#512

If I remember correctly from when I messed with rockets a while ago, that's just how the rocket launcher works.
__________________
asherkin is offline
krolus
Senior Member
Join Date: May 2009
Location: Russia, Omsk
Old 04-13-2010 , 11:28   Re: [EXTENSION] SDK Hooks 1.3 (Updated 02/02/10)
#513

Just checked. This happens not only with rockets.
PHP Code:
public OnEntityCreated(entity, const String:classname[]){
    
PrintToChatAll("created %s",classname);

Attached Thumbnails
Click image for larger version

Name:	entityz.png
Views:	269
Size:	80.2 KB
ID:	63653  
__________________
kAmmomod is deprecated. Take a look at MGE Training
krolus is offline
doom1killer123
New Member
Join Date: Apr 2010
Old 04-15-2010 , 19:58   Re: [EXTENSION] SDK Hooks 1.3 (Updated 02/02/10)
#514

uhhh im having trouble installing it, you see i, have no idea how to install it. HELP ME!!!
doom1killer123 is offline
Send a message via AIM to doom1killer123
deriggs007
Senior Member
Join Date: May 2009
Location: USA
Old 04-15-2010 , 21:09   Re: [EXTENSION] SDK Hooks 1.3 (Updated 02/02/10)
#515

RTFM
deriggs007 is offline
Send a message via MSN to deriggs007
Thrawn2
Veteran Member
Join Date: Apr 2009
Old 04-17-2010 , 06:50   Re: [EXTENSION] SDK Hooks 1.3 (Updated 02/02/10)
#516

PHP Code:
public Action:Event_PlayerBuiltObject(Handle:event, const String:name[], bool:dontBroadcast)
{
    new 
iEnt GetEventInt(event"index");
    
SDKHook(iEntSDKHook_OnTakeDamageOnTakeDamage);
}

public 
Action:OnTakeDamage(victim, &attacker, &inflictor, &Float:damage, &damagetype) {
    
LogMessage("dmg taken");

huhm, i cant hook objects like sentries, dispenser etc.
is that intended and cant be done?
Thrawn2 is offline
Bushinator
Junior Member
Join Date: Mar 2010
Old 04-17-2010 , 10:48   Re: [EXTENSION] SDK Hooks 1.3 (Updated 02/02/10)
#517

Hey, I've got a TF2 server which I want to restrict weapons on, and I found out that SDK Hooks could do it.
But I don't know how to use it, and I need some help. How can I add weapon restrictions to TF2?

I'm thankful for all replies to my question

Last edited by Bushinator; 04-17-2010 at 10:51.
Bushinator is offline
D-Skript
BANNED
Join Date: Apr 2010
Location: 127.0.0.1
Old 04-17-2010 , 20:39   Re: [EXTENSION] SDK Hooks 1.3 (Updated 02/02/10)
#518

Nice Topic, Interesting to read through
D-Skript is offline
Kigen
BANNED
Join Date: Feb 2008
Old 04-17-2010 , 22:53   Re: [EXTENSION] SDK Hooks 1.3 (Updated 02/02/10)
#519

It seems to be a double hooking of event creation I think. I've also seen a double call to OnEntityCreated() in CS:S.
Kigen is offline
DJ Tsunami
DJ Post Spammer
Join Date: Feb 2008
Location: The Netherlands
Old 04-18-2010 , 04:59   Re: [EXTENSION] SDK Hooks 1.3 (Updated 02/02/10)
#520

That can only happen if SDK_OnAllLoaded is called twice. I haven't seen it happen when I was testing.
__________________
Advertisements | REST in Pawn - HTTP client for JSON REST APIs
Please do not PM me with questions. Post in the plugin thread.
DJ Tsunami 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 06:31.


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