Jump to content
Casio91Fin

Add Flags to Params

Recommended Posts

Hey.
 

I've been pondering how could get exchanged via the flag textures parameters?

 

example description:

Description.ext 

class Params

 

class Team_Blue_Flag
    {
        title = "BLUE: Replace the flag image";
        values[] = {0,1,2,3,4,5,6,7,8,9};
        texts[]  = {"BLUE","Argentina","Australia","Austria","Belgium","Brazil","Canada","Chile","China"};
        default = 2;

   };

class Team_Red_Flag

 {
        title = "RED: Replace the flag image";
        values[] = {0,1,2,3,4,5,6,7,8,9};
        texts[]  = {"RED","Argentina","Australia","Austria","Belgium","Brazil","Canada","Chile","China"};
        default = 5;

   };

 

This is what I could do, but how it are changed picture the flag?

     

 

Share this post


Link to post
Share on other sites
if (isServer) then {

#define GVAR_PARAM(NUM)	(paramsArray select NUM)
#define GVAR_BLUEFLAG (["\path\to\flag\RED.paa","\path\to\flag\Argentina.paa","\path\to\flag\Australia.paa","\path\to\flag\Austria.paa","\path\to\flag\Belgium.paa","\path\to\flag\Brazil.paa","\path\to\flag\Canada.paa","\path\to\flag\Chile.paa","\path\to\flag\China.paa"] select GVAR_PARAM(0))
#define GVAR_REDFLAG (["\path\to\flag\RED.paa","\path\to\flag\Argentina.paa","\path\to\flag\Australia.paa","\path\to\flag\Austria.paa","\path\to\flag\Belgium.paa","\path\to\flag\Brazil.paa","\path\to\flag\Canada.paa","\path\to\flag\Chile.paa","\path\to\flag\China.paa"] select GVAR_PARAM(1))

_flag setFlagTexture GVAR_BLUEFLAG;
_flag2 setFlagTexture GVAR_REDFLAG;
};

https://community.bistudio.com/wiki/setFlagTexture

  • Like 1

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

×