SkreamerVirii
Administrator
Full Member
Posts: 133
|
|
« on: September 03, 2008, 11:20:45 PM » |
|
In this tutorial i will be showing you how to add addtional weapons to both classes in the mp version of the game i will be focusing on the enginner because wlli think this guy has potential
i will adding the venom to his list of main weapons its not choosable in any menus but when you hit the 3 key on your keyboard a second time the venom will appear as ione of your weapons this isnt anything fancy it just adds a little variety in the gameplay So lets get started g_clients.c and go to around line 790 and find this part of the code // Engineer gets dynamite if ( pc == PC_ENGINEER ) { COM_BitSet( client->ps.weapons, WP_DYNAMITE ); client->ps.ammo[BG_FindAmmoForWeapon(WP_DYNAMITE)] = 0; client->ps.ammoclip[BG_FindClipForWeapon(WP_DYNAMITE)] = 1; // NERVE - SMF COM_BitSet( client->ps.weapons, WP_PLIERS); client->ps.ammoclip[BG_FindClipForWeapon(WP_PLIERS)] = 1; client->ps.ammo[WP_PLIERS] = 1; } now make it look like this // Engineer gets dynamite if ( pc == PC_ENGINEER ) { COM_BitSet( client->ps.weapons, WP_DYNAMITE ); client->ps.ammo[BG_FindAmmoForWeapon(WP_DYNAMITE)] = 0; client->ps.ammoclip[BG_FindClipForWeapon(WP_DYNAMITE)] = 1; // NERVE - SMF COM_BitSet( client->ps.weapons, WP_PLIERS); client->ps.ammoclip[BG_FindClipForWeapon(WP_PLIERS)] = 1; client->ps.ammo[WP_PLIERS] = 1;
COM_BitSet( client->ps.weapons, WP_VENOM ); client->ps.ammoclip[BG_FindAmmoForWeapon(WP_VENOM)] = 200; client->ps.weapon = WP_VENOM; } Any 2 handed weapons will be assigned to the 3 key So now you know how to blow things up give yourself addtional weapons and ammo In the next tutorial i will show you how to give yourself a scuba suit
|