Jump to content

[Release] O9 Gambling Script [Updated for 1.0.7.1+]


Airwaves Man

Recommended Posts

Hey guys, this is the release of my O9 Gambling Script. If you like to add this feature to your server you can do it now with that offical release.

Go to github download and install the files:

O9 Gambling Script

If you have cards you get a free gambling try.

You can gamble for 1000, 2000 and 3000 Coins and get the price 1x, 2x and 3x. The script is not optimized but it works out of the box and can be used with overpoch.

Gamble.jpg.bb8ba289daf2d60a5ce2ba2497d6a9e7.jpg

Link to comment
Share on other sites

  • 3 weeks later...
  • 3 months later...
  • 2 months later...
On 10/31/2022 at 1:33 AM, Airwaves Man said:

The script got updated to 1.0.7.1 long ago and works. Make sure you installed everything correctly.

Hello, I seem to be doing something wrong. 

My variables.sqf does not have :

 s_bank_dialog3 = -1;
 s_player_checkWallet = -1;    



    Here is my Variables.sqf

 

if (isServer) then {
    
};

if (!isDedicated) then {
    dayz_resetSelfActions1 = dayz_resetSelfActions;
    dayz_resetSelfActions = {
        call dayz_resetSelfActions1;
        //    Add custom reset actions here
    };
    call dayz_resetSelfActions;    
};

 Where should I place this code?

s_player_gamblefree = -1;
s_player_gamble1 = -1;
s_player_gamble2 = -1;
s_player_gamble3 = -1;

 



I tried this but no profit.

if (isServer) then {
    
};

if (!isDedicated) then {
    dayz_resetSelfActions1 = dayz_resetSelfActions;
    dayz_resetSelfActions = {
        call dayz_resetSelfActions1;

    s_player_gamblefree = -1;
    s_player_gamble1 = -1;
    s_player_gamble2 = -1;
    s_player_gamble3 = -1;

    };
    call dayz_resetSelfActions;    
};

 

Sorry to bother, any help would be appreciated.

 

Link to comment
Share on other sites

 if (!isDedicated) then {
    dayz_resetSelfActions1 = dayz_resetSelfActions;
    dayz_resetSelfActions = {
        call dayz_resetSelfActions1;

    s_player_gamblefree = -1;
    s_player_gamble1 = -1;
    s_player_gamble2 = -1;
    s_player_gamble3 = -1;
    };
    call dayz_resetSelfActions;    
}

This is correct. What exactly does not work?

Link to comment
Share on other sites

28 minutes ago, Airwaves Man said:

 if (!isDedicated) then {
    dayz_resetSelfActions1 = dayz_resetSelfActions;
    dayz_resetSelfActions = {
        call dayz_resetSelfActions1;

    s_player_gamblefree = -1;
    s_player_gamble1 = -1;
    s_player_gamble2 = -1;
    s_player_gamble3 = -1;
    };
    call dayz_resetSelfActions;    
}

This is correct. What exactly does not work?

Thanks for the fast reply! 

I'm not getting any options when I approach the NPC. I tried the Hooker and I tried my default black market trader. I've obviously done something wrong :/

Here's my Fn_SA section:

        player removeAction s_garage_dialog;
        s_garage_dialog = -1;
    };
    

 

Spoiler

    if (Z_singleCurrency) then {    
    local _isGamble = _cursorTarget isKindOf "Profiteer3"; // Define here the trader or the building where you get the gambling dialog
    if (_isGamble && _isAlive) then {            
        local _hasCards = "ItemCards" in magazines player;
        if (_hasCards) then {
            if (s_player_gamblefree < 0) then {
                s_player_gamblefree = player addAction [localize "STR_CL_GAMBLE_PRICEFREE", "scripts\gamble\gamble.sqf",0, 1, false, true];
            };
        };
        if (s_player_gamble1 < 0) then {
            s_player_gamble1 = player addAction [format [localize "STR_CL_GAMBLE_PRICE1x", CurrencyName], "scripts\gamble\gamble.sqf",1000, 1, false, true];
        };
        if (s_player_gamble2 < 0) then {
            s_player_gamble2 = player addAction [format [localize "STR_CL_GAMBLE_PRICE2x", CurrencyName], "scripts\gamble\gamble.sqf",2000, 1, false, true];
        };
        if (s_player_gamble3 < 0) then {
            s_player_gamble3 = player addAction [format [localize "STR_CL_GAMBLE_PRICE3x", CurrencyName], "scripts\gamble\gamble.sqf",3000, 1, false, true];
        };
    } else {
        player removeAction s_player_gamblefree;
        s_player_gamblefree = -1;
        player removeAction s_player_gamble1;
        s_player_gamble1 = -1;
        player removeAction s_player_gamble2;
        s_player_gamble2 = -1;
        player removeAction s_player_gamble3;
        s_player_gamble3 = -1;
    };
};


    
    // ZSC
    if (Z_singleCurrency) then {
        if (_isMan && !_isAlive && {(!(_cursorTarget isKindOf "Animal") && !_isZombie) || (_isZombie && ZSC_ZombieCoins select 0)}) then {

 

------------------

player removeAction s_bank_dialog3;
    s_bank_dialog3 = -1;
    player removeAction s_player_checkWallet;
    s_player_checkWallet = -1;
 

Spoiler

   player removeAction s_player_gamblefree;
    s_player_gamblefree = -1;
    player removeAction s_player_gamble1;
    s_player_gamble1 = -1;
    player removeAction s_player_gamble2;
    s_player_gamble2 = -1;
    player removeAction s_player_gamble3;
    s_player_gamble3 = -1;


    player removeAction s_garage_dialog;
    s_garage_dialog = -1;
    player removeAction s_player_bury_human;
    s_player_bury_human = -1;

Link to comment
Share on other sites

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
  • Discord

×
×
  • Create New...