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

[ANY] HL2 items (1.5.2)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
kadet.89
Veteran Member
Join Date: Nov 2012
Location: Serbia
Old 08-04-2015 , 08:05   [ANY] HL2 items (1.5.2)
Reply With Quote #1



This extension adds some half life 2 items to the game:

Code:
item_healthcharger		(recharges health)
item_suitcharger		(recharges armor in CSS,but you can charge anything you want)
item_healthkit			( +25HP)
item_battery			( +10 armor)
item_healthvial			( +10HP)
item_antidote			( does nothig yet)
Cvars:
sk_healthkit 25 (max amount of hp to restore with item_healthkit )
sk_healthcharger 25 (max amount of hp to restore with item_healthcharger )
sk_suitcharger 25 (max amount of armor to restore with item_suitcharger )
sk_suitcharger_citadel 25
sk_suitcharger_citadel_maxarmor 50

KeyValues (properties) and inputs/outputs work fine. But, as hummer does not support these items, all the properties should be specified manually:

Code:
entity
{
	"id" "276"
	"classname" "item_healthcharger"
	"angles" "0 90 0"
	connections
	{
		"OnPlayerUse" "light,Toggle,,0,-1"
	}
	"origin" "-372 32 89.8277"
}
It works well with my windows server, but, as it's based on the tfdodgeball extension and has got all the necessary signatures and offsets for linux, it should work under linux as well. All the gametype -specific staff has been cut off (except for css armor), the extension should work well with any source engine game

links:
CSS NPC https://forums.alliedmods.net/showthread.php?t=161331 (they are going to close code.google.com!!)
TFDodgeball https://forums.alliedmods.net/showthread.php?t=127034
CEntity https://forums.alliedmods.net/showthread.php?t=87500

TODO:
add item_longjump
add item_item_crate
add *ammo items
add npc_*

Special thanks to asherkin, pRED* and raydan

requirements:
SourceMod 1.7.2

how to use:
1) You can add these entities to your maps directly with the hummer editor
2) If you want to see this entities on the classic maps without recompilation, you may use this extension: https://forums.alliedmods.net/showthread.php?t=39439

A useful video about signing: https://www.youtube.com/watch?v=4T03pckoB5g

You can now add any new entity type to the game (including NPC)
Feel free to ask me any questions in this thread
Attached Images
File Type: jpg logo.jpg (93.5 KB, 2436 views)
Attached Files
File Type: 7z loader.7z (3.8 KB, 290 views)
File Type: 7z gamedata.7z (2.7 KB, 304 views)
File Type: dll hlitems.ext.dll (937.5 KB, 491 views)
File Type: 7z source.7z (98.2 KB, 370 views)
File Type: 7z box6.bsp.7z (5.0 KB, 223 views)
File Type: 7z box6.vmf.7z (1.9 KB, 225 views)
File Type: txt linux_compiling.txt (1.9 KB, 476 views)
File Type: 7z AMBuildScript.7z (4.9 KB, 215 views)

Last edited by kadet.89; 09-19-2016 at 11:42.
kadet.89 is offline
Send a message via Skype™ to kadet.89
kadet.89
Veteran Member
Join Date: Nov 2012
Location: Serbia
Old 08-05-2015 , 11:54   Re: [ANY] HL2 items (1.5.1)
Reply With Quote #2

The extension is updated. datamaps, inputs, outputs, keyvalues (properties) now work

Last edited by kadet.89; 08-07-2015 at 13:23.
kadet.89 is offline
Send a message via Skype™ to kadet.89
DJPlaya
Senior Member
Join Date: Nov 2014
Location: Germany
Old 07-18-2016 , 21:18   Re: [ANY] HL2 items (1.5.2)
Reply With Quote #3

Does it still work?
"based on the tfdodgeball extension" - "TFDodgeball... dose't currently work correctly"
__________________
My biggest Projects: Kigen AC Redux, Forlix Floodcheck Redux
DJPlaya is offline
Send a message via Skype™ to DJPlaya
kadet.89
Veteran Member
Join Date: Nov 2012
Location: Serbia
Old 07-23-2016 , 09:44   Re: [ANY] HL2 items (1.5.2)
Reply With Quote #4

Yes, it still works under linux/windows

Last edited by kadet.89; 07-23-2016 at 09:46.
kadet.89 is offline
Send a message via Skype™ to kadet.89
Mayor Gamer
Senior Member
Join Date: Nov 2012
Location: GetLocationOfUser(me);
Old 07-26-2016 , 05:32   Re: [ANY] HL2 items (1.5.2)
Reply With Quote #5

So this extension adds actually working Half-Life 2 items?
Been so long since I wanted this to be done. Good job! I'll test it when I come back home. It seems great.
__________________
Mayor Gamer is offline
kadet.89
Veteran Member
Join Date: Nov 2012
Location: Serbia
Old 09-16-2016 , 15:10   Re: [ANY] HL2 items (1.5.2)
Reply With Quote #6

Mayor Gamer, yes its a full port if the items (with sounds, effects and animations)

Linux build for cs:s.
Attached Files
File Type: 7z hl2items.ext.2.css.7z (718.6 KB, 244 views)
File Type: 7z hl2ents_sources.7z (134.7 KB, 241 views)

Last edited by kadet.89; 09-16-2016 at 15:13.
kadet.89 is offline
Send a message via Skype™ to kadet.89
blacklagoon
Senior Member
Join Date: Jun 2012
Old 09-16-2016 , 18:30   Re: [ANY] HL2 items (1.5.2)
Reply With Quote #7

Thanks man!
blacklagoon is offline
kadet.89
Veteran Member
Join Date: Nov 2012
Location: Serbia
Old 09-17-2016 , 03:23   Re: [ANY] HL2 items (1.5.2)
Reply With Quote #8

A linux instruction is attached. I've also attached my AMBuildScript.7z to the thread. If you build a release version (not debug) remove this: '-Wno-error' from it. There are some bad mistakes in the extension that can't be ignored. This line: -stdlib=libstdc++' forces the compiler to build the extension statically with libstdc, it may not be necessary.
For windows use this:

Start/Пуск -> Settings (Optional)-> Control Panel/Панель управление -> System/Система -> Advanced/Дополнительные параметры системы -> Environment Variables/Параметры среды

ADD:
HL2SDKCSS C:\...\...\hl2sdk-css
MMSOURCE C:\...\...\mmsource
SOURCEMOD C:\...\...\sourcemod-central

Then replace the variables here: msvc10/sdk.vcxproj

And I'm afraid it may be difficult to build the windows version against the recent source sdk

Last edited by kadet.89; 09-17-2016 at 05:16.
kadet.89 is offline
Send a message via Skype™ to kadet.89
blacklagoon
Senior Member
Join Date: Jun 2012
Old 09-19-2016 , 17:27   Re: [ANY] HL2 items (1.5.2)
Reply With Quote #9

Hey, i've got it successfully build for csgo but i can't find where to get these offsets (All i found was in CCSPlayer):
Code:
			"GetClientEyeAngles" // Only found CBasePlayer::EyeAngles()
			{
				"windows"       "129"
				"linux"         "130"
			}
			"GetRadius"
			{
				"windows"       "227"
				"linux"         "228"
			}
			
			"DeflectPlayer"
			{
				"windows"       "402"
				"linux"         "409"
			}
			"DispatchKeyValue"
			{
				"windows"	"31"
				"linux"	"30"
			}
			"DispatchKeyValueVector"
			{
				"windows"	"29"
				"linux"	"32"
			}
			"DispatchKeyValueFloat"
			{
				"windows"	"30"
				"linux"	"31"
			}
blacklagoon is offline
kadet.89
Veteran Member
Join Date: Nov 2012
Location: Serbia
Old 09-20-2016 , 08:37   Re: [ANY] HL2 items (1.5.2)
Reply With Quote #10

GetClientEyeAngles:
PHP Code:
int m_angEyeAngles = -1;
QAngle *GetEyeAngles(CBaseEntity *pEntity)
{    
    return (
QAngle *)(((unsigned char *)pEntity) + m_angEyeAngles);    
}
bool Extension::SDK_OnLoad(char *errorsize_t maxlengthbool late)
{
    
gamehelpers->FindSendPropInfo("CCSPlayer""m_angEyeAngles[0]", &info); //uncomment SMEXT_ENABLE_GAMEHELPERS in the smsdk_config.h
    
m_angEyeAngles info.actual_offset;

PHP Code:
#include <itoolentity.h>
IServerTools *servertools NULL;

bool Extension::SDK_OnMetamodLoad(ISmmAPI *ismmchar *errorsize_t maxlenbool late)
{
    
GET_V_IFACE_ANY(GetServerFactoryservertoolsIServerToolsVSERVERTOOLS_INTERFACE_VERSION);

servertools::SetKeyValue is the equal to DispatchKey*

Quote:
// entity query
virtual bool GetKeyValue( CBaseEntity *pEntity, const char *szField, char *szValue, int iMaxLen ) = 0;
virtual bool SetKeyValue( CBaseEntity *pEntity, const char *szField, const char *szValue ) = 0;
virtual bool SetKeyValue( CBaseEntity *pEntity, const char *szField, float flValue ) = 0;
virtual bool SetKeyValue( CBaseEntity *pEntity, const char *szField, const Vector &vecValue ) = 0;
As to the other functions, I'm pretty sure they are member functions, but to find their offsets first we need to know their base classes.

Last edited by kadet.89; 09-20-2016 at 12:08.
kadet.89 is offline
Send a message via Skype™ to kadet.89
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 19:43.


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