Jump to content
AfkMan

How to get custom assigned role in script

Recommended Posts

Hi there!
I've got this files. Role selection system is working. Now i need to launch a script based on an actual roleDescr string. How can i find in onPlayerRespawn.sqf what was really selected by user?

Here's a screenshot and code:

Screenshot

//rifle.sqf


class dude1
{
displayName = "RifleMan Dude";  //shows up in selection menu
icon = "\A3\Ui_f\data\GUI\Cfg\Ranks\sergeant_gs.paa";  //standart icon
role = "Dudes";//Role the respawn inventory is assigned to, like a parent folder
roleDescr = "Dude"; //try to get this in onPplayerRespawn.sqf



};


//description.ext

class CfgRoles
{
    class Bitches  //Class name used in CfgRespawnInventory, kinda parent folder
    {
        displayName = "Bitches";//Name of the role, displayed in the respawn menu
        icon = "a3\missions_f_exp\data\img\classes\assault_ca.paa";//Icon shown next to the role name in the respawn screen
		
    };
	class Dumbasses  //Class name used in CfgRespawnInventory
    {
        displayName = "Dumbasses";//Name of the role, displayed in the respawn menu
        icon = "a3\missions_f_exp\data\img\classes\assault_ca.paa";//Icon shown next to the role name in the respawn screen
    };
	class Dudes  //Class name used in CfgRespawnInventory
    {
        displayName = "Dudes";//Name of the role, displayed in the respawn menu
        icon = "a3\missions_f_exp\data\img\classes\assault_ca.paa";//Icon shown next to the role name in the respawn screen
    };
};

class CfgRespawnInventory
{
    #include "loadouts\rifle.sqf"
	#include "loadouts\rifle2.sqf"
	#include "loadouts\rifle3.sqf"
};

 

Share this post


Link to post
Share on other sites

See THIS thread

Share this post


Link to post
Share on other sites
Just now, Larrow said:

See THIS thread

Yes! Thanks! It finally works!!!

 

HERE is a solution post for others! 

BTW, cant find that vars in Biki

Share this post


Link to post
Share on other sites
Just now, AfkMan said:

BTW, cant find that vars in Biki

Not all internal vars used by BI's systems are covered in the Biki. Needs some reading/experimenting on the users behalf to find out how to modify BI's systems. Whether this is unpacking the game files or by using the functions viewer.

Share this post


Link to post
Share on other sites
12 minutes ago, Larrow said:

Not all internal vars used by BI's systems are covered in the Biki. Needs some reading/experimenting on the users behalf to find out how to modify BI's systems. Whether this is unpacking the game files or by using the functions viewer.

Yeah, quiet right. I was trying for two weeks. All because roleDescription aint working.

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

×