|
|
|
First open the mp.dll workspace in Microsoft Visual Studios. Then open multiplay_gamerules.cpp and go to line 452.
you should see something like:
if ( addDefault )
{
pPlayer->GiveNamedItem( "weapon_crowbar" );
pPlayer->GiveNamedItem( "weapon_9mmhandgun" );
pPlayer->GiveAmmo( 68, "9mm", _9MM_MAX_CARRY );// 4 full reloads
}
GiveNamedItem means the game will give the named item when the player spawns. GiveAmmo is self explanitory.
so for my sanity, lets give the player the MP5 and the 357 Magnum. So we sould change the above to:
if ( addDefault )
{
pPlayer->GiveNamedItem( "weapon_python" ); //the python is the magnum
pPlayer->GiveAmmo( 68, "357box", _357_MAX_CARRY );//this is the ammo for the magnum
pPlayer->GiveNamedItem( "weapon_mp5" );//the auto rifle
pPlayer->GiveAmmo( 68, "mp5clip" _9MM_MAX_CARRY );//this gives us the mp5 ammo
}
Compile the mp.dll and place it in your mod's dlls folder.
More than 2 weapons can be given, all you need to do it add
pPlayer->GiveNamedItem( "weapon_yourchoice" ); and its ammo which would be
pPlayer->GiveAmmo( 68, "ammotype" AMMO_MAX_CARRY );
PLEASE dont forget the semi-colen (;) at the end of the line!
Other weapons to choose from are:
weapon_crowbar
weapon_9mmhandgun
weapon_python
weapon_mp5
weapon_crossbow
weapon_shotgun
weapon_rpg
weapon_gauss
weapon_egon
weapon_hornetgun
weapon_handgrenade
weapon_tripmine
weapon_satchel
weapon_snark
MP5 Grenades
Their ammo is as follows (in the same order):
Weapon name | Max Ammo Definition | ammo type |
crowbar | none | none |
9mmhandgun | _9MM_MAX_CARRY | 9mm |
python (magnum) | _357_MAX_CARRY | 357box |
mp5 | _9MM_MAX_CARRY | mp5clip |
crossbow | BOLT_MAX_CARRY | crossbowclip |
shotgun | BUCKSHOT_MAX_CARRY | buckshotbox |
rpg | ROCKET_MAX_CARRY | rpgclip |
gauss | URANIUM_MAX_CARRY | uraniumbox |
egon | URANIUM_MAX_CARRY | uraniumbox |
hornetgun (hivehand) | HORNET_MAX_CARRY* | none |
handgrenade | HANDGRENADE_MAX_CARRY | none |
tripmine | TRIPMINE_MAX_CARRY | none |
satchel | SATCHEL_MAX_CARRY | none |
Snarks | SNARK_MAX_CARRY | snarkbox |
mp5 Grenades | M203_GRENADE_MAX_CARRY | m203box |
Any questions or suggestions should be sent to me:
coda@elp.rr.com