AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Module Coding (https://forums.alliedmods.net/forumdisplay.php?f=9)
-   -   Module: Half-Life Weapon Mod (v0.8) (https://forums.alliedmods.net/showthread.php?t=183369)

KORD_12.7 05-10-2012 22:07

Re: Module: Half-Life Weapon Mod (v0.5)
 
Okay. Can we have "weapon_awp" and "weapon_stuff" at one time in player's items inventory with classcreator in CS? Or player's hud will be fucked up? And "weapon_awp" & "weapon_stuff" will have the same weapon ID: CSW_AWP ?

joaquimandrade 05-10-2012 22:35

Re: Module: Half-Life Weapon Mod (v0.5)
 
Quote:

Originally Posted by KORD_12.7 (Post 1706528)
Okay. Can we have "weapon_awp" and "weapon_stuff" at one time in player's items inventory? Or player's hud will be fucked up? And "weapon_awp" & "weapon_stuff" will have the same weapon ID: CSW_AWP ?

In Arkshine plugin there is a part to handle the hud but I don't know if its perfect. About the weapon ID I don't know because I don't know the context of the use of ID's of weapon, I know more of C++ than of HLSDK :twisted:. I will ask Arkshine tomorrow to come here to answer

KORD_12.7 05-10-2012 22:43

Re: Module: Half-Life Weapon Mod (v0.5)
 
Because in Half-Life we can add new weapons by adding their info to ItemInfo array:
PHP Code:

#define MAX_WEAPONS            32

ItemInfo CBasePlayerItem::ItemInfoArray[MAX_WEAPONS]; 

HL have only 15 weapons and so we have 16 empty positions in array to store information about our new weapons. In my module i'm using small hack with hlsdk function
PHP Code:

// Precaches the weapon and queues the weapon info for sending to clients
void UTIL_PrecacheOtherWeapon( const char *szClassname 

to insert info about new weapons to infoarray.

joaquimandrade 05-11-2012 01:10

Re: Module: Half-Life Weapon Mod (v0.5)
 
Quote:

Originally Posted by KORD_12.7 (Post 1706550)
Because in Half-Life we can add new weapons by adding their info to ItemInfo array:
PHP Code:

#define MAX_WEAPONS            32

ItemInfo CBasePlayerItem::ItemInfoArray[MAX_WEAPONS]; 

HL have only 15 weapons and so we have 16 empty positions in array to store information about our new weapons. In my module i'm using small hack with hlsdk function
PHP Code:

// Precaches the weapon and queues the weapon info for sending to clients
void UTIL_PrecacheOtherWeapon( const char *szClassname 

to insert info about new weapons to infoarray.

Ah ok that's why you distinguish CS from HL. I was thinking that just you didnt care about CS in favor of HL.

joropito 05-11-2012 14:44

Re: Module: Half-Life Weapon Mod (v0.5)
 
Quote:

Originally Posted by joaquimandrade (Post 1706336)
...you can do the following: hook the function that create entities, and when they got a specific string that you want like "weapon_stuff" you can provide an object you create yourself. Basically you override the behaviour of creating entity with hooks and it is kind of natural apart for having to add a hook. This applies to any mod.

In fact you may also add a custom dll inside liblist.gam with the key "gamedll[_linux]" (yes, you may have more than 1 gamedll[_linux]) then that dll will contain the functions named as weapon_* and all the code related.

TheUnbeholden 05-25-2012 10:12

Re: Module: Half-Life Weapon Mod (v0.5)
 
How can I add these weapons to my mod Rebellion?

KORD_12.7 05-25-2012 19:47

Re: Module: Half-Life Weapon Mod (v0.5)
 
And what is a mod Rebellion?

TheUnbeholden 05-27-2012 12:31

Re: Module: Half-Life Weapon Mod (v0.5)
 
Its a half-life mod.
http://www.moddb.com/mods/rebellion1

How do I get this weapon pack to work with it. I mean I don't know what you mean by ''compile it'' when you talk about the weapons...

marcelodl 07-30-2012 14:54

Re: Module: Half-Life Weapon Mod (v0.5)
 
Hi there, I'm new here as you can see in my post number.

I'm having trouble when installing this Weapon Mod. I just copied the files to the correct directories, then I install some of the (Opfor-based) weapons plugins, but all of them show me a "bad load" when I use the amx_plugins command. Other plugins just run normally, like the "floating weapons", since they don't require Weapon Mod.

If there is something I should do to make it work, just say it please. I'm not used to programming neither amxx scripting, and I just learned how to install plugins so it isn't quite obvious for me.

Thanks a lot.

GordonFreeman (RU) 08-06-2012 04:08

Re: Module: Half-Life Weapon Mod (v0.6)
 
updated


All times are GMT -4. The time now is 21:51.

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