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

Entcontrol


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
LeGone
Senior Member
Join Date: Dec 2006
Location: Germany
Old 10-14-2013 , 03:08   Entcontrol
Reply With Quote #1

This is the extension part behind the Entcontrol-Plugin.
There are 2 Parts - Extension and plugin.
The plugin-part is only needed for spawning NPCs.

Main Functions

  • Integrated Webserver
  • Entity-Outputs
  • Parse .nav-files (CS:S only?)
  • Extract items from VPK, BSP, GCF, NCF, PAK, VPK, WAD, XZP
  • CRC32, MD5, Hamming-Distance, Hash, Gaussian-Random-Hash (mostly untested)
  • Spawn NPCs (CS:S only)


Integrated Webserver
All files a stored under sourcemod/configs/www.
You can find the server running here.
Files can be "adminized" by inserting the flag into the very first line: {b}<html>....

Every plugin has the ability to use the webserver-forward. This way it is possible to write webinterfaces for your own plugins.
Iīm using this feature for the entcontrol-webinterface. Click here to see it in "action" (itīs still very early ... so there is not much to see, yet)

Entity-Outputs
Everyone knows about AcceptEntityInput but what about the outputs?
With entcontrol itīs possible to get these outputs.
You can see it in action if you check the entcontrol-webserver-entitylist here.
Just click some entity index and see the inputs and outputs.

Parse .nav-files
You may use the nav-files to find hiding spots.
These spots can be used for spawning players or items.
If the .nav file is compressed into the .vpk-file it will be extracted automatically.

Extract items from VPK, BSP, GCF, NCF, PAK, VPK, WAD, XZP
Using HLLib it is possible to extract files from these package-files.

Code:
/**
 * Extension-Natives
 */

// + Entities
native EC_Entity_GetOutputCount(entity, String:sOutputName[]);
native bool:EC_Entity_GetOutputFirst(entity, String:sOutputName[]);
native bool:EC_Entity_GetOutputAt(entity, String:sOutputName[], i);
// - Entities

// + Navigation(.nav needed) - Used to spawn players/npcs/...
// Thanks to AnthonyIacono - https://github.com/AnthonyIacono for his navigation-parsing-code
native bool:EC_Nav_Load(); // .nav-files will automatically extracted from .vpk file
native bool:EC_Nav_CachePositions();
native bool:EC_Nav_GetNextHidingSpot(Float:randomPosition[3]);
// - Navigation

// + Webserver
// Not working? Look into your logfile: "Not enough space on the stack"? Type the following to increase the stackspace to 131072 bytes (131072/4=32768 cells)
// #pragma dynamic 32768
#define EC_MAXHTTPRESULT 131072
forward Action:EC_OnWebserverCallFunction(const userID, const String:function[], const String:arg[], String:result[]); // resultsize is max 131072 bytes
native EC_Web_GetPort();
// - Webserver

// + HLLib - http://nemesis.thewavelength.net/index.php?p=35
native bool:EC_HLLib_OpenFile(const String:function[]); // BSP, GCF, NCF, PAK, VPK, WAD, XZP and uncompressed ZIP package formats are supported.
native bool:EC_HLLib_ItemExist(const String:item[]);
native bool:EC_HLLib_Extract(const String:source[], const String:destination[]);
native EC_HLLib_Close();
// - HLLib

// + Dlib - http://dlib.net/
native EC_Dlib_CRC32(const String:text[]);
native EC_Dlib_MD5(const String:text[]); // text is in/out
native EC_Dlib_HammingDistance(num1, num2);
native EC_Dlib_Hash(const String:text[]);
native Float:EC_Dlib_GaussianRandomHash(num1, num2, num3);
// - Dlib

/**
 * Plugin-Natives
 */
// + NPCs
// Possible NPC-Names:
// npc_antlion,npc_antlionguard,npc_barney,npc_dog,npc_gman,npc_headcrab,npc_police,npc_soldier,npc_sentrygun,npc_vortigaunt,npc_synth,npc_zombie,...
native EC_NPC_Spawn(String:sNPCName[], Float:x, Float:y, Float:z);
// - NPCs
This is a bit of chaos:
Why do I release some extension that is already released under my entcontrol-plugin-thread?
Most of the people donīt know about the functionality behind entcontrol, so it thought about making this thread to let other developers know about this. And maybe someone might find use of some features

This is why the download can only be found in the original thread:
Download
Or the Sourcecode at GITHUB
__________________
Want to control Entities? Spawn NPCs? Create Portals?
EntControl

Last edited by LeGone; 03-08-2016 at 10:00.
LeGone is offline
LeGone
Senior Member
Join Date: Dec 2006
Location: Germany
Old 10-14-2013 , 03:09   Re: Entcontrol
Reply With Quote #2

Reserved
__________________
Want to control Entities? Spawn NPCs? Create Portals?
EntControl
LeGone is offline
iGANGNAM
AlliedModders Donor
Join Date: Sep 2012
Location: Lithuania
Old 10-14-2013 , 09:16   Re: Entcontrol
Reply With Quote #3

Is it possible to control NPCs? for example attack only few targets, go to some location? And is it possible to make a new one npc? I mean with custom models, attacks etc.

Last edited by iGANGNAM; 10-14-2013 at 09:18.
iGANGNAM is offline
LeGone
Senior Member
Join Date: Dec 2006
Location: Germany
Old 10-14-2013 , 13:03   Re: Entcontrol
Reply With Quote #4

NPCs are just modified hostage_entities. I donīt know how to modify the path they are moving, but it is possible to change the target they are attacking or following. There is something called "owner", this might be what you want to do (attacking only a few targets).
So it is implemented right now, you can see it if you spawn sentryguns ... they should not attack the one who spawned them. But there is currently no "cool" way to choose the targets before spawning them

You can create new npcs, but not without sourcepawn skills. If you got the knowledge then just copy the zombie.sp file and modify it the way you like the new NPC to be.
The other way is to write down what NPC you want, then I might code it for you =)
__________________
Want to control Entities? Spawn NPCs? Create Portals?
EntControl
LeGone is offline
zipcore
Veteran Member
Join Date: Mar 2010
Location: m_flZipcore
Old 10-17-2013 , 14:15   Re: Entcontrol
Reply With Quote #5

luvit
__________________
zipcore is offline
Denae84
New Member
Join Date: Oct 2013
Old 10-19-2013 , 07:04   Re: Entcontrol
Reply With Quote #6

what a nice list.. This is very helpful for me in future. I really try it...
__________________
leep
Denae84 is offline
LeGone
Senior Member
Join Date: Dec 2006
Location: Germany
Old 10-29-2013 , 11:15   Re: Entcontrol
Reply With Quote #7

Thx
If you need any feature, tell me about your idea ^^
__________________
Want to control Entities? Spawn NPCs? Create Portals?
EntControl
LeGone is offline
iGANGNAM
AlliedModders Donor
Join Date: Sep 2012
Location: Lithuania
Old 10-29-2013 , 12:34   Re: Entcontrol
Reply With Quote #8

Quote:
Originally Posted by LeGone View Post
Thx
If you need any feature, tell me about your idea ^^
Go ahead implant to extension custom weapons, custom vehicles.Maybe some hud texts.Revive unsupporterted extensions features.

Last edited by iGANGNAM; 10-29-2013 at 12:37.
iGANGNAM 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 04:59.


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