GolovaRaoul

Scroll Wheel Option only for VIP Players

4 posts in this topic

Hello,

First of all, I'm not sure if this is the right place to place the topic. I'm sorry if it's not.

So since Bohemia only allows cosmetic things, I want to make it so that only players who donated on our website have acces to Base Painting.
Now we use CfgInterActionMenu to give the players the option to Paint their base, and it looks like this:

class SM_Paint: ExileAbstractAction
            {
                title = "Paint";
                condition = "call ExileClient_util_world_isInOwnTerritory";
                action = "'Construction' call SM_Paint";
            };

Now I know I need to edit the condition, but to what? I don't really care how a player is being declared as VIP; in the database or just clientside.

Thanks for responding :)
GolovaRaoul

Share this post


Link to post
Share on other sites

You can use the condition just like you would use if statements condition. In your case i would do something like(not tested):

condition = "(call ExileClient_util_world_isInOwnTerritory) AND ((getPlayerUID _this) in getArray(missionConfigFile >> 'CfgVIPPlayers' >> 'UIDs'))"

And a missionConfig addition like this:

class CfgVIPPlayers
{
    UIDs[]=
    {
        "123456789",
		"987654321"
    };
};

 

if you want UIDs in your DB you could call an additional function in the condition that sends a network request and returns true if playerUID in Database.

Edited by The Walking Bread
  • Like 1

Share this post


Link to post
Share on other sites
Advertisement

Nope I'm not sure if you can make it work with a scroll wheel action.

What I did, in the base painting file, i had a paint_config.sqf or something like that. I made an array with player UID's, and if the current player isn't in that array, you will get a toast notification saying "You need to buy it on our website". So players still see a scroll wheel action. Which maybe isn't bad, some kind of advertisement or something ;P

I wanted to give you the code I made but now I remember that I gave acces to everyone at some point and removed that check.

Share this post


Link to post
Share on other sites
Advertisement

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.