AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Module Coding (https://forums.alliedmods.net/forumdisplay.php?f=9)
-   -   Module: Counter-Strike Weapon Mod [1.7.1] (https://forums.alliedmods.net/showthread.php?t=308229)

killerZM 10-07-2018 11:52

Re: Module: Counter-Strike Weapon Mod [1.6.3]
 
off-topic sorry
where did you learn using C++ to make CS modules ?

HamletEagle 10-07-2018 12:12

Re: Module: Counter-Strike Weapon Mod [1.6.3]
 
Quote:

Originally Posted by killerZM (Post 2618724)
off-topic sorry
where did you learn using C++ to make CS modules ?

There are tons of sites/books to learn C++ from.

killerZM 10-07-2018 15:22

Re: Module: Counter-Strike Weapon Mod [1.6.3]
 
Quote:

Originally Posted by HamletEagle (Post 2618728)
There are tons of sites/books to learn C++ from.

i am not talking about C++ i am talking about HL SDK and such

Ghosted 10-08-2018 02:21

Re: Module: Counter-Strike Weapon Mod [1.6.3]
 
I've learned HLSDK by creating modifications of halflife via its code, and learned C++ via GOOGLING

killerZM 10-08-2018 17:40

Re: Module: Counter-Strike Weapon Mod [1.6.3]
 
ok

metal_upa 11-02-2018 16:43

Re: Module: Counter-Strike Weapon Mod [1.6.3]
 
Quote:

Weapon Type Can Be Pistol (P228), ShotGun (XM1014), Rifle (AK47), Sniper (AWP).
What about dual gun weapons?
For example i wanna make dual mp5 weapon. How? i see no replacement for Dual-Elites weapon.

Ghosted 11-02-2018 18:12

Re: Module: Counter-Strike Weapon Mod [1.6.3]
 
Quote:

Originally Posted by metal_upa (Post 2622343)
What about dual gun weapons?
For example i wanna make dual mp5 weapon. How? i see no replacement for Dual-Elites weapon.

That would require a bit code.
RegisterWeaponForward on primary attack post and then send weapon animation.
animation will be left or right depends on which was previous. you can do this by using custom entity variable than is not used by original dll. for example EV_INT_iuser4/pev_iuser4 and set 1/0. 0 will be left 1 will be right.

Example:

Code:

MyHookedForward(Weapon)
{
static IsRight = entity_get_int(Weapon, EV_INT_iuser4);
SendWeaponAnim(Weapon, IsRight ? <YourRightAnimation> : <YourLeftAnimation>);
entity_set_int(Weapon, EV_INT_iuser4, !IsRight);
}


metal_upa 11-08-2018 14:48

Re: Module: Counter-Strike Weapon Mod [1.6.3]
 
Quote:

Originally Posted by Ghosted (Post 2622346)
That would require a bit code.
RegisterWeaponForward on primary attack post and then send weapon animation.
animation will be left or right depends on which was previous. you can do this by using custom entity variable than is not used by original dll. for example EV_INT_iuser4/pev_iuser4 and set 1/0. 0 will be left 1 will be right.

Example:

Code:

MyHookedForward(Weapon)
{
static IsRight = entity_get_int(Weapon, EV_INT_iuser4);
SendWeaponAnim(Weapon, IsRight ? <YourRightAnimation> : <YourLeftAnimation>);
entity_set_int(Weapon, EV_INT_iuser4, !IsRight);
}


You module crash too much on rehlds server, no error log given. I just create a simple weapon replacement for rifle.

BTW this is just a basic weapon replacement:
Spoiler


Can you make a complete documentation of this module, your wiki seems to be out dated.

Ghosted 11-09-2018 06:02

Re: Module: Counter-Strike Weapon Mod [1.6.3]
 
Quote:

Originally Posted by metal_upa (Post 2623154)
Can you make a complete documentation of this module, your wiki seems to be out dated.

Sorry but i'm currently working on 1.7 version which will also add support for linux, cant tell when it will be done.

PS: I will test module on rehlds/hlds & regame/game.

metal_upa 11-10-2018 07:32

Re: Module: Counter-Strike Weapon Mod [1.6.3]
 
Quote:

Originally Posted by Ghosted (Post 2623224)
Sorry but i'm currently working on 1.7 version which will also add support for linux, cant tell when it will be done.

PS: I will test module on rehlds/hlds & regame/game.

I would like to use this module to make custom weapons on my server.

Bug found: GiveAmmo(id, WAmmoType_762Nato, 100)
it capped value at 90? why not go more than that?


Nevermind, my bad.. i need to create custom ammo first. Looking forward for your new update.


All times are GMT -4. The time now is 06:02.

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