1

Topic: Problem with UZI-Weapon

Hey Ladies and Gentleman!

I have tried to code a new weapon! An Uzi, it works like the normal Gun but the shoots should be even faster, it is enough that you push the mouse once so it will give autofire and a tee looses 2 hp by every projectil hit. And it isn't a standard weapon you have to find it on map. The tunning and the implementation in the tileset are done ;D wasn't that difficould but now stock by the autofire ... i cant find the cmd where the gun uses his push the button cmd to +fire !! ahhhhh help i need xD In my head it is simple copy the autofire from shotgun implement a new weapon weapon 6 and mod the gun ... but i cant find the sh** autofire for the shotgun ... i hope somebody can help me!

2

Re: Problem with UZI-Weapon

Open "src/game/server/entities/characters.cpp" and search for "void CCharacter::FireWeapon()". Some lines below you'll find

bool FullAuto = false;
if(m_ActiveWeapon == WEAPON_GRENADE || m_ActiveWeapon == WEAPON_SHOTGUN || m_ActiveWeapon == WEAPON_RIFLE)
    FullAuto = true;

Now add your weapon to the if-statement so that FullAuto is true if the active weapon is the uzi.

3

Re: Problem with UZI-Weapon

Thanks man, this looks like a lot of work ... xD I thought the code would be a little bit more "simple" ^^