Hey, i need help with my Banksystem

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

LeonZ

Member
Jun 5, 2021
2
0
1
20
I need Help...

The problem is that he cannot withdraw the cash and the bank balance

Server: 1.12.2

Code:
# Pay/überweisen/bargeld skript
# Bargeld: {bargeld.%player%} | Konto: {bank.%player%}
options:
    RP: &8┃ &cRoleplay &8× &7
    Bank: &8┃ &6Bank &8× &7

on join:
    if {bargeld.%player%} is not set:
        set {bargeld.%player%} to 500
        
on join:
    if {bank.%player%} is not set:
        set {bank.%player%} to 4500

command /bargeld:
    trigger:
        send "{@RP}Du hast &e%{bargeld.%player%}% &7bar auf der Hand dabei"
    
command /setmoney [<offline player>] [<text>]:
    permission: server.admin
    permission message: &cKeine rechte dazu.
    trigger:
        if arg-1 is not set:
            send "{@RP}Bitte nutze /setmoney Spieler Anzahl"
        else:
            if arg-1 is set:
                if arg-2 is set:
                    set {bargeld.%arg-1%} to arg-2
                    send "{@RP}Du hast &e%arg-1%&e %arg-2%&7$ gesetzt"
                    send "{@RP}Dein Geld wurde Administrativ auf &c%arg-2%&7 gesetzt" to arg-1
                    stop
                else:
                    send "{@RP}Nutze bitte /setmoney %arg-1%&7 Anzahl"

command /addmoney [<offline player>] [<text>]:
    permission: server.admin
    permission message: &cKeine rechte dazu.
    trigger:
        if arg-1 is not set:
            send "{@RP}Bitte nutze /addmoney Spieler Anzahl"
        else:
            if arg-1 is set:
                if arg-2 is set:
                    add arg-2 to {bargeld.%arg-1%}
                    send "{@RP}Du hast &e%arg-1%&e %arg-2%&7$ hinzugefügt"
                    send "{@RP}Dir wurden Administrativ &c%arg-2%&7 gegeben" to arg-1
                    stop
                else:
                    send "{@RP}Nutze bitte /addmoney %arg-1%&7 Anzahl"
          
command /addbank [<offline player>] [<text>]:
    permission: server.admin
    permission message: &cKeine Rechte dazu.
    trigger:
        if arg-1 is not set:
            send "{@RP}Bitte nutze /addbank Name Anzahl"
        else:
            if arg-1 is set:
                if arg-2 is set:
                    add arg-2 to {bank.%arg-1%}
                    send "{@RP}Du hast &e%arg-1%&e %arg-2%&7$ hinzugefügt"
                    send "{@RP}Dir wurden Administrativ &c%arg-2%&7 auf die Bank gegeben" to arg-1
                else:
                    send "{@RP}Nutze bitte /addbank %arg-1%&7 Anzahl"

command /Pay [<player>] [<number>]:
    trigger:
        If arg-1 is set:
            if arg-2 is set:
                if {bargeld.%player%} is more or equal to arg-2:
                    remove arg-2 from {bargeld.%player%}
                    add arg-2 to {bargeld.%arg-1%}
                    send "{@RP}Dir wurden von &e%player% &a%arg-2%&7$ gegeben" to arg-1
                    send "{@RP}Du hast &e%arg-1% &a%arg-2%&7$ gegeben"
                else:
                    send "{@RP}Du hast zuwenig geld dabei"

command /überweisen [<player>] [<number>]:
    trigger:
        If arg-1 is set:
            if arg-2 is set:
                if {bank.%player%} is more or equal to arg-2:
                    remove arg-2 from {bank.%player%}
                    add arg-2 to {kontostand.%arg-1%}
                    send "{@Bank}Dir wurden von &e%player% &a%arg-2%&7$ überwiesen" to arg-1
                    send "{@Bank}Du hast &e%arg-1% &a%arg-2%&7$ überwiesen"
                else:
                    send "{@Bank}&cDie Zahlung wurde nicht durchgeführt da dein Konto diesen Betrag nicht überweisen kann"
[doublepost=1623263654,1623263623][/doublepost]Sorry i'm German :emoji_slight_smile:
 
This won't help fixing the problem but i see you are using %player% and not %player's UUID% to store the variables, meaning when you change your username your stats get wiped.

Please correct me if i'm wrong, have you had any errors?
 
This won't help fixing the problem but i see you are using %player% and not %player's UUID% to store the variables, meaning when you change your username your stats get wiped.

Please correct me if i'm wrong, have you had any errors?

That with the player and not the player uuid was right and no, unfortunately there are no errors so I ask
 
Status
Not open for further replies.