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)

GordonFreeman (RU) 04-21-2012 03:16

Module: Half-Life Weapon Mod (v0.8)
 
4 Attachment(s)

Author: KORD_12.7
Version: 0.8


Description:
With this module you can write some plugins, that add new types of weapon and ammo to Half-Life.
Create new weapon by your self. You need only a basic knowledge of the AMXX scripting. Its easy.

Supporeted mods:
Weapons Limit:
  • Default: 17
  • With default weapons replacing: 31

Credits:
AMXX Dev Team - for great scripting engine.
Arkshine - for support and helping .
6a6kin - for AntiJos module source code.
GordonFreeman - for help with testing.
Koshak - for support and testing.
Lev - for constant support.
noo00oob - idea.
Valve - for awesome game Half-Life and SDK.

Changelog:
Changelog

GordonFreeman (RU) 04-21-2012 03:16

Re: Module: Half-Life Weapon Mod (v0.8)
 
How to use?

Installation

Eextract archive to your amxmodx folder on the server (with file overwriting if needed).
Note: Do not enable this module via addons/amxmodx/configs/modules.ini folder otherwise its can working incorrectly.

Configuration

All configuration files are in amxmodx/configs/weaponmod folder. Main configuration file is weaponmod.ini. In main file you can set weapon and ammo blocking (stripping), and also set startup equipment on spawn. You can preset any configs for certain maps. Exp. crossfire map configuration file must have following name: weaponmod-crossfire.ini

Detailed description about weaponmod.ini file:
Spoiler


In amxmodx/configs/weaponmod/spawnpoints folder you can find configuration for weapon and ammo spawning on the maps. You can easy add any weapons/ammo to the map with WeaponMod Spawner Config Editor plugin.

In amxmodx/configs/weaponmod/mods folder you can find weaponmod configuration (offsets,signatures etc.).

Weapons:

Opposing Force:Team Fortress Classic:Unreal Tournament:Counter-Strike Online:Other:
Config Editor:
WeaponMod Addon: Spawner Config Editor
FAQ

Q: Where is source code?
A: Here: https://svn.aghl.ru:8443/svn/HLModules/weaponmod/trunk

Q: How to download those sources?
A: You can do this with any SVN client, Tortoise SVN for example.

Q: How to install new weapons?
A: This is easy. Lookup for needed gun in upper text, download it and install on your server, like a typical amxx plugin.

Q: Im installed new weapons, but how to spawn them on maps?
A: Use WeaponMod Spawn Config Editor plugin.

Q: Server crashing with Host_Error: no precache: models/w_bgrap.mdl error.
A: Update your Weaponbox Models plugin.

Q: Why bots doesnt using new weapons?
A: Bots using new weapons if they have crowbar in theirs inventory (weapon_crowbar).

Q: Why my server is crashing with ED_Alloc: No edicts yet error?
A: Do not enable this module via amxmodx\configs\modules.ini.


Q: How can I use it?
A: "You can't." (c) Lev

payampap 04-21-2012 04:57

Re: Module: Half-Life Weapon Mod (v0.3 Beta)
 
oh look.
Greate Flavour For This Game, HL

Sp@jk 04-21-2012 15:48

Re: Module: Half-Life Weapon Mod (v0.3 Beta)
 
wow, this is great, can this be done for CS ?

KORD_12.7 04-21-2012 19:54

Re: Module: Half-Life Weapon Mod (v0.3 Beta)
 
For CS? Nope.

joropito 04-22-2012 10:34

Re: Module: Half-Life Weapon Mod (v0.3 Beta)
 
I like it.
You should upload the source code, not only a link to the svn

GordonFreeman (RU) 04-23-2012 09:33

Re: Module: Half-Life Weapon Mod (v0.4)
 
Update

Arkshine 04-23-2012 09:46

Re: Module: Half-Life Weapon Mod (v0.4)
 
Some interesting stuff. Why KORD_12.7 is not posting that himself ?

GordonFreeman (RU) 04-23-2012 09:58

Re: Module: Half-Life Weapon Mod (v0.4)
 
Arkshine, he is lazy

Arkshine 04-23-2012 10:26

Re: Module: Half-Life Weapon Mod (v0.4)
 
Willing to post a random weapon, but not willing to post his own modules ? Doesn't make sense.

GordonFreeman (RU) 04-23-2012 10:35

Re: Module: Half-Life Weapon Mod (v0.4)
 
Ask him

KORD_12.7 04-23-2012 18:56

Re: Module: Half-Life Weapon Mod (v0.4)
 
Yep, i am too lazy to post my own module :D

kiki33hun 04-25-2012 08:05

Re: Module: Half-Life Weapon Mod (v0.4)
 
Good module, thanx!

NiHiLaNTh 04-26-2012 04:58

Re: Module: Half-Life Weapon Mod (v0.4)
 
I'd like to suggest to add:

Spoiler

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

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

yokomo 05-09-2012 08:34

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

Originally Posted by KORD_12.7 (Post 1694049)
For CS? Nope.

Arrr you should convert this for CS too. The are no WeaponMod for CS.

KORD_12.7 05-09-2012 09:04

Re: Module: Half-Life Weapon Mod (v0.5)
 
Technically impossible to add new weapons to CS with AMXX. In CS we can only edit existed weapons.

NiHiLaNTh 05-09-2012 09:24

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

Originally Posted by KORD_12.7 (Post 1705510)
Technically impossible to add new weapons to CS with AMXX. In CS we can only edit existed weapons.

agree, though there are thing called Class Creator under Rage module. :)

Edit. Does this module suppots give_item? I tried to use it: give_item(id, "weapon_rg6") and it said unable to create item. :?

GordonFreeman (RU) 05-09-2012 09:41

Re: Module: Half-Life Weapon Mod (v0.5)
 
NiHiLaNTh,
Code:
stock wpnmod_give_item(const iPlayer, const szItem[]) {      new Float: vecOrigin[3];      pev(iPlayer, pev_origin, vecOrigin);            new iItem = wpnmod_create_item(szItem, vecOrigin);            if (pev_valid(iItem))      {           set_pev(iItem, pev_spawnflags, pev(iItem, pev_spawnflags) | SF_NORESPAWN);           dllfunc(DLLFunc_Touch, iItem, iPlayer);                     return iItem;      }            return -1; }

joaquimandrade 05-10-2012 15:55

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

Originally Posted by KORD_12.7 (Post 1705510)
Technically impossible to add new weapons to CS with AMXX. In CS we can only edit existed weapons.

It's not impossible with hacking. When you do like
PHP Code:

create_entity("weapon_awp"

hl searches in the dll of your game for a function with the name "weapon_awp". That function is responsible to create a C++ object that is child of CBaseEntity. If you check the thing Nilhant refered in the post above or the weapon that Arkshine created with Rage you can see that 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.

You can see here http://forums.alliedmods.net/showpos...9&postcount=82
A plugin with module that actualy does this and lets you do
PHP Code:

give_item(id,"weapon_boomerang"


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

alencore 09-10-2012 06:23

Re: Module: Half-Life Weapon Mod (v0.6)
 
This is cool! Hope you can make recoil and rate of fire easily configured as well.

NiHiLaNTh 09-10-2012 08:29

Re: Module: Half-Life Weapon Mod (v0.6)
 
Recoil is pev_punchangle / EV_VEC_punchangle.
As for firerate thats Offset_flNextPrimaryAttack.

alencore 09-10-2012 12:43

Re: Module: Half-Life Weapon Mod (v0.6)
 
wow tnx for the quick guide NiHiLaNTh will try it soon! oh yeah!

claudiuhks 09-11-2012 07:53

Re: Module: Half-Life Weapon Mod (v0.6)
 
It sounds to be cool.
I will come again adding feedbacks after testing it!

alencore 09-12-2012 07:47

Re: Module: Half-Life Weapon Mod (v0.6)
 
I'm having a blast with this weapon mods. Seems the shockroach is my favorite firing at 0.02 rps LoL it's almost like
a lazer beam gun up straight and a whipping balls of doom. Will soon make video showing my weapons of doom LoL!

For those having problem you gotta re-compile them using amxmodx 1.8.2 compiler of course make sure weapon mod module is installed.

Edit...
Tried combining oldy but goodie OZ deathmatch (using hl won) + weapon mod it kinda works but can't cycle the weapons as if
it's fixed to slot3 only. It could have been super mega fun all stock weapons + weapon mods all fully configurable.

EDIT...
I'm visiting this thread everyday hoping for new weapon or updates hehe, adik!

I hope all this weapon mod addons would have a clear script on bot support to remove some crashes when bots
suddenly picsk them up.

alencore 10-03-2012 01:47

Re: Module: Half-Life Weapon Mod (v0.6)
 
Bump! plz read!
I hope all this weapon mod addons would have a clear script on bot support to remove some crashes when bots
suddenly picsk them up.

KORD_12.7 10-03-2012 05:01

Re: Module: Half-Life Weapon Mod (v0.6)
 
alencore, i played with bots for tests a long time. Everything was ok. Which bots do you use? Mine is "jk_botti" v1.42.

alencore 10-19-2012 08:37

Re: Module: Half-Life Weapon Mod (v0.6)
 
I think it's bec. I edited rpg7 reloading time tends to crash the game when it reloads or may be bec. of jk_botti.
It's stable now but I'm using Parabot steam version I got from your forum.

albert123 10-20-2012 11:49

Re: Module: Half-Life Weapon Mod (v0.6)
 
Hey. Does it support for Sven Co-op ?

NiHiLaNTh 10-20-2012 15:38

Re: Module: Half-Life Weapon Mod (v0.6)
 
Dont think so. SC uses modified heavily modified game library, so it only supports HL / AG.


All times are GMT -4. The time now is 20:56.

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