Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[Tutorial] Simple Logic Weapon Recoil and Spread

Elite Diviner
Joined
Nov 28, 2014
Messages
427
Reaction score
249
Hello Ragezoners
For some people who cannot configure the recoil of their weapons and spread by the base date follow the tutorial


Look at this

Code:
if (wpn->getCategory()==storecat_SHTG) spread *= 1.2f;


add above news recoil's and spread's

Code:
//DouglasPRO:: New Logic spread and recoil, 'ASSAULT RIFLES'
    if (wpn->getItemID() == 101172) spread *= 0.0f && recoil *= 0.3f;//SIG SAUER 556
    if (wpn->getItemID() == 101210) spread *= 0.3f && recoil *= 0.4f;//SCAR NIGHT STALKER
    if (wpn->getItemID() == 101193) spread *= 0.4f && recoil *= 0.2f;//SCAR NORMAL
    if (wpn->getItemID() == 101173) spread *= 0.4f && recoil *= 0.3f;//IMITAR 21
    if (wpn->getItemID() == 101002) spread *= 0.5f && recoil *= 0.7f;//M16
    if (wpn->getItemID() == 101055) spread *= 0.6f && recoil *= 0.6f;//M4
    if (wpn->getItemID() == 101040) spread *= 0.2f && recoil *= 0.4f;//M4 SEMI
    if (wpn->getItemID() == 101169) spread *= 0.8f && recoil *= 0.7f;//MASSADA
    if (wpn->getItemID() == 101005) spread *= 0.6f && recoil *= 0.7f;//G36
//DouglasPRO:: finshed logic spread and recoil 'ASSAULT RIFLES', to add new weapons in her game set the spread and recoil here !


Anyway this was a simple way to set up your gun I hope I have helped some people
:thumbup1::eek:tt1:​
 
Initiate Mage
Joined
Oct 20, 2013
Messages
4
Reaction score
1
Good brother.
Thanks for sharing your experiences.
 
Newbie Spellweaver
Joined
Sep 13, 2015
Messages
11
Reaction score
8
This can be configured in itemsDB.xml It's fast

spread="2.1" recoil="7"
 
Back
Top