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

Entity System v1.1


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
xfusionlockx
AlliedModders Donor
Join Date: Aug 2014
Old 04-04-2019 , 14:26   Entity System v1.1
Reply With Quote #1

A couple months ago, I wrote a basic entity control system for props and prop ownership so I didn't have to each time I want to write a new building plugin.

Features:
Quote:
  • Prop Ownership
  • Prop Naming
  • Getting Entity Type
    • Cycler - cycler
    • Door - prop_door_rotating
    • Dynamic - prop_dynamic
    • Light - prop_light
    • NPC - npc_
    • Physics - prop_physics
    • Unknown
  • Setting Render Color
  • Setting Entity Motion
  • Extra Information Storing
  • Teleporting To Crosshair
Changelog:
Quote:
  • v1.1 - Updated a critical flaw in the system so now it'll actually work.
  • v1.0 - Added the system.
It's pretty simple and easy to use. I plan on writing up better documentation.

Prop Spawning Example: [4/8/19: Updated]
Code:
int iProp = CreateProp(Entity Name (cycler, prop_dynamic_override, prop_physics_override), Entity Model, Prop Name);
	
EntitySystem iEntity = EntitySystem(iProp);
	
iEntity.SetColor(255, 255, 255, 255);
	
iEntity.TeleportToCrosshair(iClient);
	
iEntity.Owner = iClient;
entitysystem.inc v1.1 Download

Last edited by xfusionlockx; 04-08-2019 at 15:03. Reason: Updated thread for v1.1.
xfusionlockx is offline
404UserNotFound
BANNED
Join Date: Dec 2011
Old 04-04-2019 , 16:37   Re: Entity System v1.0
Reply With Quote #2

This is the perfect thing for this entity management system I'm working on that allows for on-the-fly editing of any entity.
404UserNotFound is offline
SHUFEN
Senior Member
Join Date: Jun 2014
Location: Japan, Tokyo
Old 04-05-2019 , 22:01   Re: Entity System v1.0
Reply With Quote #3

looks good! Thanks.
SHUFEN is offline
Send a message via Skype™ to SHUFEN
xfusionlockx
AlliedModders Donor
Join Date: Aug 2014
Old 04-08-2019 , 15:04   Re: Entity System v1.1
Reply With Quote #4

Well, it's updated so it'll work properly now.
xfusionlockx is offline
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 05-15-2019 , 07:43   Re: Entity System v1.1
Reply With Quote #5

Missing CloseHandle

PHP Code:
    public void TeleportToCrosshair(int iClient)
    {
        
float fAngles[3], fFinalAngles[3], fFinalOrigin[3], fOrigin[3];
        
        
GetClientEyePosition(iClientfOrigin);
        
GetClientEyeAngles(iClientfAngles);
        
GetClientAbsAngles(iClientfFinalAngles);
        
        
Handle hTraceRay TR_TraceRayFilterEx(fOriginfAnglesMASK_SOLIDRayType_InfiniteOFilterPlayer);
        
        if (
TR_DidHit(hTraceRay))
        {
            
TR_GetEndPosition(fFinalOriginhTraceRay);
            
            
TeleportEntity(this.iEntityfFinalOriginfFinalAnglesNULL_VECTOR);
        }
    } 
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
Dragokas is offline
xfusionlockx
AlliedModders Donor
Join Date: Aug 2014
Old 06-08-2019 , 04:42   Re: Entity System v1.1
Reply With Quote #6

Quote:
Originally Posted by Dragokas View Post
Missing CloseHandle

PHP Code:
    public void TeleportToCrosshair(int iClient)
    {
        
float fAngles[3], fFinalAngles[3], fFinalOrigin[3], fOrigin[3];
        
        
GetClientEyePosition(iClientfOrigin);
        
GetClientEyeAngles(iClientfAngles);
        
GetClientAbsAngles(iClientfFinalAngles);
        
        
Handle hTraceRay TR_TraceRayFilterEx(fOriginfAnglesMASK_SOLIDRayType_InfiniteOFilterPlayer);
        
        if (
TR_DidHit(hTraceRay))
        {
            
TR_GetEndPosition(fFinalOriginhTraceRay);
            
            
TeleportEntity(this.iEntityfFinalOriginfFinalAnglesNULL_VECTOR);
        }
    } 
Thank you, I've decided to re-build this from the ground up while developing a mod with it. The old version was rushed and not fully tested.
xfusionlockx 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:01.


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