Ppgtjmad / SimpleShops

[HG] Simple Shops
27 stars 8 forks source link

Using has enough in statement ? #18

Closed SLIgaming closed 7 years ago

SLIgaming commented 7 years ago

I want to return a false in a (if) statement but how do I call this ? Would this work ? _hasEnough = [_value] call HG_fnc_hasEnoughMoney; if (hasEnough = false) then { my code };

Ppgtjmad commented 7 years ago

Hello,

The function itself returns true or false already:

_hasEnough = [5] call HG_fnc_hasEnoughMoney;

if (_hasEnough) then
{
    // Yay I can buy me candies
} else {
    // Am a poor boy...
};

If you need support, please go on our forums, ticket system is for issues only. Thanks :)

SLIgaming commented 7 years ago

Roger that mate mark as solved. cheers