UGX-Mods Login

or login with an authentication provider below
Sign In with Google
Sign In with Twitter
Sign In with Discord
Sign In with Steam
Sign In with Facebook
Sign In with Twitch

Community/Shared Bank

broken avatar :(
Created 5 years ago
by NoScopeNinja25
0 Members and 1 Guest are viewing this topic.
3,967 views
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 17 April 2016
Last active: 2 years ago
Posts
11
Respect
Forum Rank
Legless Crawler
Primary Group
Member
My Contact & Social Links
More
Signature
BO3 Map(s): Die Kiste
Scripter
Mapper
×
Description:
The Community Bank allows you to share your points with your friends in a large money pool.  When you add money to the bank everyone can access it.  Points do not carry on to the next game.  You can use whatever object you would like for the bank.

Installation Instructions:
Part 1: Code
A. Paste the following code at the bottom of your <mapname>.gsc file which can be found in "Call of Duty Black Ops III\usermaps\<mapname>\scripts\zm":

function bank_comm()
{
    level.balance = 0;
    level thread deposit();
    level thread withdraw();
}

function deposit()
{
    trig_depo = GetEnt("deposit_trig","targetname");
    trig_depo SetHintString("Hold ^3[{+activate}]^7 to Deposit into Community Bank[Amount:1000]");
    trig_depo SetCursorHint("HINT_NOICON");
    while(1)
    {
        while(1)
        {
            trig_depo waittill("trigger", player);
            if (player zm_score::can_player_purchase(1000))
            {
                level.balance += 1000;
                player zm_score::minus_to_player_score(1000);
                //player PlayLocalSound("purchase_accept");
                IPrintLn("Deposited $1000(New Total = " + level.balance + ")");
            }
            else
            {
                //player PlayLocalSound("purchase_deny");
                IPrintLn("Not Enough Money");
            }
            break;
        }
        wait(0.25);
    }
}

function withdraw()
{
    trig_with = GetEnt("withdraw_trig", "targetname");
    trig_with SetHintString("Hold ^3[{+activate}]^7 to Withdraw From Community Bank\n[Amount: 1000][Fee: 100]");
    trig_with SetCursorHint("HINT_NOICON");
    while(1)
    {
        while(1)
        {
            trig_with waittill("trigger", player);
            if (level.balance >= 1000 && player zm_score::can_player_purchase(100))
            {
                player zm_score::add_to_player_score(1000);
                level.balance -= 1000;
                wait(0.01);
                player zm_score::minus_to_player_score(100);
                //player PlayLocalSound("purchase_accept");
                IPrintLn("Withdrew $1000(New Total = " + level.balance + ")");
            }
            else if (level.balance < 1000)
            {
                //player PlayLocalSound("purchase_deny");
                IPrintLn("Insufficient Funds(Total = " + level.balance + ")");
            }
            else
            {
                //player PlayLocalSound("purchase_deny");
                IPrintLn("Not Enough Money");   
            }
            break;
        }
        wait(0.25);
    }
}
B. Paste the following code at the top of your main() function in your <mapname>.gsc:

level thread bank_comm();
C. Paste the following code at the top of your <mapname>.gsc:

#using scripts\zm\_zm_score;
Part 2: Radiant
A. Open your map in radiant
B. Open the Entity Browser by pressing B
C. Search for trigger_use
D. Drag it into your map and place it where you want to deposit money
E. Open the Entity Info by pressing N and select the trigger
F.  Change the "cursorhint" value to "HINT_NOICON"
G. Change the "targetname" value to "deposit_trig"
H. Deselect the trigger and drag a new in from the Entity Browser
I.  Place it where you want to withdraw money
J.  Once again change the "cursorhint" value to "HINT_NOICON"
K. Change the "targetname" value to "withdraw_trig"
L. Compile and run your map before moving onto Part 3

Part 3: Sounds(optional)
A. Go into your <mapname>.gsc
B. Uncomment(delete "//") the 5 lines that say:
        //player PlayLocalSound("purchase_accept");
        //player PlayLocalSound("purchase_deny");
C. Go into your useraliases.csv which can be found in "Call of Duty Black Ops III\share\raw\sound\aliases"
D. Open useraliases.csv with a text editor(ie. notepad)
E. Paste the following at the bottom(if you already have this then skip this step):

purchase_accept,,,zombie\purchase\accept\accept_00.wav,,,UIN_MOD,,,,,BUS_FX,,,,,,90,90,0,500,500,,,,,,,,,,,,,,,,3d,front,,NONLOOPING,,,,,,,,,,,,,,,,,,,,,,,,,,,yes,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
purchase_deny,,,zombie\purchase\deny\deny_00.wav,,,UIN_MOD,,,,,BUS_FX,,,,,,90,90,0,500,500,,,,,,,,,,,,,,,,3d,front,,NONLOOPING,,,,,,,,,,,,,,,,,,,,,,,,,,,yes,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
F. Download the following sound files:

G. Drag the folder from the zip file into your root folder "Call of Duty Black Ops III"
H. Now compile and run your map!

Please leave a comment if you are having trouble getting it to work.

Update:
Made it easier to install sound files and added description to each part
Extended description and changed some text sizes
Last Edit: February 17, 2017, 06:57:33 am by NoScopeNinja25
broken avatar :(
×
broken avatar :(
Location: gb
Date Registered: 22 September 2014
Last active: 1 year ago
Posts
360
Respect
Forum Rank
Perk Hacker
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
Personal Quote
Here to make epic maps
×
pcmodder's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
pcmodder's Contact & Social Linkspcmodderugxken5hir0
I just tested this and the bank works . I didn't add the sounds yet I will add them later just wanted to confirm and say thanks. This was a great feature in ZIS when playing co op !

One question is it possible to delete or perhaps change the colour of the HUD when you deposit or remove the points ?
broken avatar :(
×
broken avatar :(
Location: gbNewport
Date Registered: 2 November 2014
Last active: 4 months ago
Posts
1,265
Respect
Forum Rank
Zombie Colossus
Primary Group
Member
My Contact & Social Links
More
Personal Quote
Embrace the Darkness
×
Tim Smith's Groups
I just tested this and the bank works . I didn't add the sounds yet I will add them later just wanted to confirm and say thanks. This was a great feature in ZIS when playing co op !

One question is it possible to delete or perhaps change the colour of the HUD when you deposit or remove the points ?


IPrintLn("Deposited $1000(New Total = " + level.balance + ")");


You use ^X (X = numbers for colors, 1,2,3 etc..) so it should look like:



IPrintLn("^XDeposited $1000(New Total = " + level.balance + ")");


Same thing for withdraws:


IPrintLn("Withdrew $1000(New Total = " + level.balance + ")"); 


It should look like:


IPrintLn("^XWithdrew $1000(New Total = " + level.balance + ")"); 

 
Loading ...