Jump to content

ixaak

Member
  • Content Count

    4
  • Joined

  • Last visited

  • Medals

Posts posted by ixaak


  1. 4 hours ago, Unluckymonster said:

    But returning to the subject as I asked earlier is there "Anyway for player to check how much money he currently have/ have trigger execute once player have enough money?" other than checking in the store or is this planned feature on future update(s)?

    moneyCheck = player getVariable [TER_moneyVariable,0];  
    hint format ["Current money: %1 %2 ",moneyCheck, TER_moneyUnit];

    The moneyCheck variable will get the amount of money that the player have at the moment, and in the Hint you just call two variables; the amount of money and the money unit.($)

     

    This will do the trick. 😄

     

    P.D. 

     

    You can also make the variable moneyCheck private (_moneyCheck), this willmake variables only visible in a specific script, or function, or Control Structures.

    • Like 3

  2. 22 hours ago, Nicholas Lendall said:

    Hey guys i saw a post a wile ago talking about giving money to the player for kills. anything we can do for MP dedi-servers for killing enemy and deducting money for civilian kills? 

    On the first page of this thread @7erra post more or less what you are asking, I leave it here for you.

     

    SQF:

    Quote

    this addEventHandler ["Killed", {

    params ["_unit", "_killer", "_instigator", "_useEffects"];

    _money = _killer getVariable [TER_moneyVariable,0]; // get the variable, if not defined use default (0)

    _money = _money + 500; //add kill reward

    _killer setVariable [TER_moneyVariable, _money];

    "You received 500$" remoteExec ["hint",_killer]; // execute code local on the pc of the killer

    }];

    Then u can just edit it the way u want, check also the first page for more info about this.


  3. @Unluckymonster Im getting started in the use of scripts and programing in general but i figured out something by reading other coments that works for me.

     

    Quote

    init:

     

    money = player getVariable [TER_moneyVariable,0]; 
    money = money + 500
    player setVariable [TER_moneyVariable, money];

     

    Every time is triggerd it will add 500$ to the player.

    (Note: I only tested on SP surely wont work in MP)

    Hope was usefull.

    • Like 1
×