Raised This Month: $32 Target: $400
 8% 

Setting entity model


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
TheDS1337
Veteran Member
Join Date: Jun 2012
Old 01-13-2017 , 09:08   Setting entity model
Reply With Quote #1

Is there any way to wrap the the SetEntityModel function in a Sourcemod extension? I saw the SDKTools sourcecode but its a pain in the ass lmao, is there any other method?
TheDS1337 is offline
psychonic

BAFFLED
Join Date: May 2008
Old 01-13-2017 , 09:48   Re: Setting entity model
Reply With Quote #2

The general intent of SM extensions is be able to add API to SM plugins. SM plugins already have SetEntityModel available to them.

It can be done and isn't terribly difficult as there are direct examples of calling vfuncs in other first-party extensions, but you may want to reconsider your approach.
psychonic is offline
TheDS1337
Veteran Member
Join Date: Jun 2012
Old 01-13-2017 , 10:07   Re: Setting entity model
Reply With Quote #3

Quote:
Originally Posted by psychonic View Post
The general intent of SM extensions is be able to add API to SM plugins. SM plugins already have SetEntityModel available to them.

It can be done and isn't terribly difficult as there are direct examples of calling vfuncs in other first-party extensions, but you may want to reconsider your approach.
True what you said, but I want to set the player model inside the module just so things dont get messed up, but it seems that I'll have to go the other way around. I'll set the models, health, speed and gravity in a plugin I guess
TheDS1337 is offline
KyleS
SourceMod Plugin Approver
Join Date: Jul 2009
Location: Segmentation Fault.
Old 01-13-2017 , 21:27   Re: Setting entity model
Reply With Quote #4

Quote:
Originally Posted by DeagLe.Studio View Post
True what you said, but I want to set the player model inside the module just so things dont get messed up, but it seems that I'll have to go the other way around. I'll set the models, health, speed and gravity in a plugin I guess
A SourceMod Extension is meant to be an Extension for the SourcePawn language. You're absolutely better off keeping logic, and deterministic behaviour, in a Plugin.
KyleS is offline
Reply


Thread Tools
Display Modes

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


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