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

Source SDK functions


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
KissLick
Veteran Member
Join Date: Nov 2012
Location: void
Old 03-20-2014 , 15:41   Source SDK functions
Reply With Quote #1

Ciao,

I am total newbie into SM extensions and I would like to know if is possible to use Source SDK functions in SM extensions.

eg. make SM extension using Source SDK function FollowEntity()
KissLick is offline
GoD-Tony
Veteran Member
Join Date: Jul 2005
Old 03-21-2014 , 08:46   Re: Source SDK functions
Reply With Quote #2

Quote:
Originally Posted by KissLick View Post
I am total newbie into SM extensions and I would like to know if is possible to use Source SDK functions in SM extensions.
Yes, it's possible.

Quote:
Originally Posted by KissLick View Post
eg. make SM extension using Source SDK function FollowEntity()
You should be able to replicate the function using a SourceMod plugin instead of going through the extra effort of an extension or sigscanning - CBaseEntity::FollowEntity
__________________

Last edited by GoD-Tony; 03-21-2014 at 08:50.
GoD-Tony is offline
KissLick
Veteran Member
Join Date: Nov 2012
Location: void
Old 03-21-2014 , 21:36   Re: Source SDK functions
Reply With Quote #3

Thanks :-)

Quote:
Originally Posted by GoD-Tony View Post
You should be able to replicate the function using a SourceMod plugin instead of going through the extra effort of an extension or sigscanning - CBaseEntity::FollowEntity
Here I am not sure what exactly do you mean, how am I able to replicate this function?

As I said, I am total newbie into this "lower SM/MM:S/Source SDK" stuff - sorry O:-)
KissLick is offline
arthurdead
Senior Member
Join Date: Jul 2013
Old 03-21-2014 , 23:38   Re: Source SDK functions
Reply With Quote #4

PHP Code:
stock FollowEntity(entityfollowerbool:BoneMerge)
{
    
SetVariantString("!activator"); 
    
AcceptEntityInput(follower"SetParent"entityentity); 
    
SetEntityMoveType(followerMOVETYPE_NONE);
    if(
BoneMerge)
    {
        new 
OldFx GetEntProp(followerProp_Send"m_fEffects");
        
SetEntProp(followerProp_Send"m_fEffects"OldFx|1);
    }
    new 
OldSolidFlags GetEntProp(followerProp_Send"m_usSolidFlags");
    
SetEntProp(followerProp_Send"m_usSolidFlags"OldSolidFlags|0x0004);
    new 
Float:pos[3];
    new 
Float:ang[3];
    
GetEntPropVector(entityProp_Send"m_angRotation"ang);
    
GetEntPropVector(entityProp_Data"m_vecOrigin"pos);
    
TeleportEntity(followerposangNULL_VECTOR);

like that ?

Last edited by arthurdead; 03-21-2014 at 23:46.
arthurdead is offline
KissLick
Veteran Member
Join Date: Nov 2012
Location: void
Old 03-25-2014 , 07:25   Re: Source SDK functions
Reply With Quote #5

Nice! Thanks a lot!!! :-)
KissLick 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 02:35.


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