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!

[tutorials]fix 3rd(3 person mode) mode can't seen weapon Attachments

Newbie Spellweaver
Joined
Nov 3, 2017
Messages
17
Reaction score
1
yeah!@lomoda,better than noting,we are New people,It's not as good as !but ,i love this game and ragezone,And thank you for helping our new eldest brother
 
Junior Spellweaver
Joined
Oct 25, 2017
Messages
158
Reaction score
17
yeah!@lomoda,better than noting,we are New people,It's not as good as !but ,i love this game and ragezone,And thank you for helping our new eldest brother
No problem man
 
Newbie Spellweaver
Joined
Nov 3, 2017
Messages
17
Reaction score
1
:junglejane:THX ikaruz115 too!!!!!!!!!!!!!!:love:
@Lomoda its more than only this.... to make that everyone see's your attm you have to make the netcode but well its copy pasta and rename than you have to fix the wepon skl. at your backside + a game crash but I made a tut to fix all this...
:eek:tt:.Love it ,good job!!
 
Last edited:
Newbie Spellweaver
Joined
Apr 19, 2008
Messages
23
Reaction score
5
:)likewarz is so cute!
if net code is so easy!
follow me!
1.
enum WeaponAttachmentTypeEnum
{
WPN_ATTM_INVALID=-1,
WPN_ATTM_MUZZLE=0,
WPN_ATTM_UPPER_RAIL=1,
WPN_ATTM_LEFT_RAIL=2,
WPN_ATTM_BOTTOM_RAIL=3,
WPN_ATTM_CLIP=4,
WPN_ATTM_RECEIVER=5, // not visual
WPN_ATTM_STOCK=6, // not visual
WPN_ATTM_BARREL=7, // not visual
WPN_ATTM_MAX
};
2.
// struct used to pass network weapon attachments that affect remote player
struct wiNetWeaponAttm
{
DWORD LeftRailID;
DWORD MuzzleID;
(is there add your attach)
wiNetWeaponAttm()
{
LeftRailID = 0;
MuzzleID = 0;
(is there add your attach)
}
};
3.
void obj_Player::OnNetPacket(const PKT_S2C_SetPlayerAttachments_s& n)
{
// only remote players can change loadout this way
if(NetworkLocal)
return;

r3d_assert(n.wid == wiCharDataFull::CHAR_LOADOUT_WEAPON1 || n.wid == wiCharDataFull::CHAR_LOADOUT_WEAPON2);
Weapon* wpn = m_Weapons[n.wid];
if(!wpn) {
return;
}

// set wpn attachment
CurLoadout.Attachment[n.wid].attachments[WPN_ATTM_MUZZLE] = n.Attm.MuzzleID;
CurLoadout.Attachment[n.wid].attachments[WPN_ATTM_LEFT_RAIL] = n.Attm.LeftRailID;
(is there add your attach)
wpn->setWeaponAttachmentsByIDs(CurLoadout.Attachment[n.wid].attachments);

// workaround to enable flashlight particle (OnEquip will enable flashlight light)!
// also we assume that remote player can change attachment only for currently equipped weapon
wpn->OnUnequip();
wpn->OnEquip(isFlashlightOn);
}
Hope help yours!:sleep:
becouse i am so busy! so i can't code it so details,this will help yours!Thx evryone!
 
Skilled Illusionist
Joined
Nov 27, 2018
Messages
335
Reaction score
65
TNX its Worked )

xingbarking - [tutorials]fix 3rd(3 person mode) mode can't seen weapon Attachments - RaGEZONE Forums


Use only FPS model

In order for this function to work, you need to have 2 models with bones.
 
Last edited:
Back
Top