AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [Rage Module?] Multiple weapons on one ID (https://forums.alliedmods.net/showthread.php?t=254665)

wiwi249 01-04-2015 12:45

[Rage Module?] Multiple weapons on one ID
 
Hello,
I'm posting a problem according to my recent problem. I've created a plugin that gives a special weapon - SR-25 with Thermal Sight (can be found on youtube). While giving the weapon it changes the weapon's entity classname to weapon_sr25, and sets its pev_iuser1 to a certain value, so I can check later, if the player is really using the SR-25 or its base weapon (SG550) .
The problem appears, that if i buy the SG550 firstly, then I force the plugin to give me the SR-25 weapon, the both weapons start to "mix". On the weapon list i have the SR-25 only and the only way I can switch between SR-25 and SG550 is using the quick weapon change key, otherwise I can choose SR-25 or the secondary only.
My question is - is there any way I can make the SR-25 to be seen by engine as a totally new weapon, but using the SG550 Weapon ID, so that a player can hold both and select both of these weapons? Of course, even if I would have to use any special modules, I'd love to achieve that.
I was thinking even on editing the mp.dll, but it's against the Valve EULA and even though, I would propably have to use some client-side modules anyway.
Regards,
Vic.

wiwi249 01-04-2015 19:17

Re: Multiple weapons on one ID
 
Bump.
I've found that code made by Arkshine.
https://forums.alliedmods.net/showpo...1&postcount=83
A little buggy, but nevermind. I've checked the code for the base weapon of the hivehand, and it's AK47. Accutally, when I force the plugin to give me the hive while holding the AK47, it drops. Is there a way I can make the AK47 stay there and have it as two weapons on the weaponlist, using rage (seems to be the only reasonable option)?
Regards.

wiwi249 01-11-2015 18:14

Re: [Rage Module?] Multiple weapons on one ID
 
I'm bumping the topic.

Arkshine 01-12-2015 03:41

Re: [Rage Module?] Multiple weapons on one ID
 
If you care about showing weapon sprites in hud (menu, etc.), it will be complicated, because there is no free slots to add a "new" weapon (or maybe just one, the last, 31, as it's an array of 32 and there are 30 weapons in CS), and you will need to rely on existing weapons with sending WeaponList to update hud.
A new weapon based on ak47, you can't display both at the same time. To display new weapon, You will probably need to use WeaponList on a player's current unused weapon.


All times are GMT -4. The time now is 15:26.

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