View Single Post
joaquimandrade
Veteran Member
Join Date: Dec 2008
Location: Portugal
Old 05-10-2012 , 15:55   Re: Module: Half-Life Weapon Mod (v0.5)
Reply With Quote #20

Quote:
Originally Posted by KORD_12.7 View Post
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"
joaquimandrade is offline