Andrew_S90

Exile Player Rewards

50 posts in this topic

31 minutes ago, hogansheroes said:

how would you do this

checkRewards = 0; //basically everybody can give rewards
checkRewards = 1; //only in AllowedRewardGivers listed, can give rewards

 

Edited by WURSTKETTE

Share this post


Link to post
Share on other sites
Advertisement

just to make sure, what is the idd for infistar again as i forgot to add mine and thought i did

got the idd 57347

this is what happens when you do scripts late at night, you cant see anything

Edited by hogansheroes

Share this post


Link to post
Share on other sites
On 12/16/2017 at 11:33 PM, xDaVIRUS said:

Is there a way to run to all clients on server? without manually adding each UID 

you could do a loop involving forEach allPlayers; and get uids from there

Share this post


Link to post
Share on other sites

Hi guys, I love this concept but am having an issue with it, I have installed it to the letter as per instructions, added a kit to the server rewards pbo as below:

Quote

ChristmasHamper[] =
  {
   "Exile_Item_CanOpener",
   "Exile_Item_ChristmasTinner",
   {"Exile_Item_Beer",4},
   "Exile_Item_Matches",
   "Exile_Item_Moobar"
  };

then added the following to my infistar custom functions, and it shows up in infistar on the server no problem:

Quote

class custom1 {
  type = 2; // targets selected player (_this)
  name = "Xmas Hamper: type = 2";
  code = ["addKitRequest", [getplayeruid player, "ChristmasHamper"]] call ExileClient_system_network_send;

and when I use the function in infistar it adds the rewards to my locker exactly as it's meant to, my problem is that I don't seem to be able to give the reward to other players, even when I target another player in infistar it still gives the reward to me! I have even logged directly into the database and checked the rewards table to confirm that this is the case.

I have the custom function setup as a type 2 = function targets the selected player (it will be _this),

should I be setting this up as a different type? i.e. type 0 = just execute

or should I be swapping "getplayeruid player" with "_this" in the custom function of infistar?

I would really appreciate someone explaining how I should be setting this up so that my admins can give other players the rewards because at the moment we only seem to be able to reward ourselves regardless of who is targeted in infistar, I fear I have missed the point somewhere, please excuse my stupidity but I'm not a natural born coder and have been playing with this for a week before asking here.

I know I could add the rewards directly to the database but that's not ideal, and I don't want less knowledgeable admins poking around in the database.

I would also be very interested in how to get this to work with dms missions but honestly don't know where to start with that one, how would the mission get the uid of the player that completed the mission?

Thank you for reading, and if anyone can help me out that would be much appreciated.

Cheers

Share this post


Link to post
Share on other sites
7 hours ago, wilderness said:

Hi guys, I love this concept but am having an issue with it, I have installed it to the letter as per instructions, added a kit to the server rewards pbo as below:

then added the following to my infistar custom functions, and it shows up in infistar on the server no problem:

and when I use the function in infistar it adds the rewards to my locker exactly as it's meant to, my problem is that I don't seem to be able to give the reward to other players, even when I target another player in infistar it still gives the reward to me! I have even logged directly into the database and checked the rewards table to confirm that this is the case.

I have the custom function setup as a type 2 = function targets the selected player (it will be _this),

should I be setting this up as a different type? i.e. type 0 = just execute

or should I be swapping "getplayeruid player" with "_this" in the custom function of infistar?

I would really appreciate someone explaining how I should be setting this up so that my admins can give other players the rewards because at the moment we only seem to be able to reward ourselves regardless of who is targeted in infistar, I fear I have missed the point somewhere, please excuse my stupidity but I'm not a natural born coder and have been playing with this for a week before asking here.

I know I could add the rewards directly to the database but that's not ideal, and I don't want less knowledgeable admins poking around in the database.

I would also be very interested in how to get this to work with dms missions but honestly don't know where to start with that one, how would the mission get the uid of the player that completed the mission?

Thank you for reading, and if anyone can help me out that would be much appreciated.

Cheers

I don't use infistar but if you need to target the selected player then yes you would need to change it to "getplayeruid _this"

 

For missions you could do it different ways, number one is having an object in the mission that spawns (like the loot crate) and have an addaction that says claim loot and then pass the rewards there or give rewards to the person who kills the last AI. The first option is easier imo and more fair because whoever gets to the loot gets the reward. You could also add this to ZCP missions.

  • Like 1

Share this post


Link to post
Share on other sites

Have look at page 1 of this thread, there i wrote an example for infistar custom function:

class CfgCustomFunctions {
    class custom1 {
        type = 2;    // just execute
        name = "Reward";
        code = "['addRewardsRequest', [getplayeruid _this, [['ExileScore',1000],['ExileMoney',2000],'Exile_Item_Flag','Exile_Item_SafeKit',['Exile_Car_Lada_Green',3],'Exile_Chopper_Huey_Green']]] call ExileClient_system_network_send;";
    };
    class custom2 {
        //type = 1;    // toggle on/off
        type = 2;
        name = "BaseObjectsWood";
        code = "['addKitRequest', [getplayeruid _this, 'BaseObjectsWood']] call ExileClient_system_network_send;";
    };

};

 

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.