Raised This Month: $ Target: $400
 0% 

Dynamic Objects and Properties - v.0.0.32 - [2018.05.08]


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Chief149
Member
Join Date: Sep 2010
Old 07-25-2016 , 11:34   Re: Dynamic Objects and Properties - v.0.0.16 - [2016.07.14]
Reply With Quote #11

Well there's a little too much code to post, but here's the basics.

My plugin has two arrays:
Code:
any g_Entity[2049];
EntityType g_EntityType[2049];
When the map starts, every entity on the map is given one of my subclasses of Dynamic. Whether it be BEntity, BNpc, BDoor, etc. Every entity on the map, and every entity created later on is given an associated object and type stored in the two above arrays.

When the player presses E on an NPC for instance, the plugin does this:
Code:
int iEnt = player.GetAimTarget(); //player is a BClient, representing a Client. No problems here
if(iEnt > 0 && iEnt < 2049 && g_EntityType[iEnt] == EntityType_Npc)
{
    BNpc npc = g_Entity[iEnt];
    npc.PressE(player); //this is where the problem eventually happens
}

Last edited by Chief149; 07-25-2016 at 11:34.
Chief149 is offline
 



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 12:43.


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