Jump to content
masterfirewall

Change chest patch based on UID

Recommended Posts

Hello!

 

I am starting to learn how to mod and wanted to try to have the chest armor updated dynamically. I am sure this can be done server-side, but I was curious if it can pull the player UID within a chest rig mod. So the UID is grabbed by the mod on equip; after grabbing the UID it checks against a preset array of UIDs and determines which patch to put on their armor.

 

Basically, I want to avoid having ten million sets of chest armor to update when a significant change hits my unit.

 

This was my latest attempt at what I am trying to do but it is failing to convert from .cpp to .bin.  I do have actual UIDs within the allowedUID array, I removed them to post the code.

 

class cfgWeapons
{
    class UIDCheck
    {
        allowedUID = ["UID1","UID2", "UID3"];
        if (getPlayerUID player in allowedUID) then 
        {
            chest_patch = "MOD_NAME\data\ins\Base_USMC_Patch.paa";
            systemChat "Your loadout has been added";
        }
        else {
                chest_patch = "MOD_NAME\data\ins\USMC_ID_16_Corpsman.paa";
            }
    };
//Continues as normal

 

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×