1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Hey, i need help with my Banksystem

Discussion in 'Skript' started by LeonZ, Jun 9, 2021.

Thread Status:
Not open for further replies.
  1. LeonZ

    LeonZ Member

    Joined:
    Jun 5, 2021
    Messages:
    2
    Likes Received:
    0
    I need Help...

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

    Server: 1.12.2

    Code (Text):
    1. # Pay/überweisen/bargeld skript
    2. # Bargeld: {bargeld.%player%} | Konto: {bank.%player%}
    3. options:
    4.     RP: &8┃ &cRoleplay &8× &7
    5.     Bank: &8┃ &6Bank &8× &7
    6.  
    7. on join:
    8.     if {bargeld.%player%} is not set:
    9.         set {bargeld.%player%} to 500
    10.        
    11. on join:
    12.     if {bank.%player%} is not set:
    13.         set {bank.%player%} to 4500
    14.  
    15. command /bargeld:
    16.     trigger:
    17.         send "{@RP}Du hast &e%{bargeld.%player%}% &7bar auf der Hand dabei"
    18.    
    19. command /setmoney [<offline player>] [<text>]:
    20.     permission: server.admin
    21.     permission message: &cKeine rechte dazu.
    22.     trigger:
    23.         if arg-1 is not set:
    24.             send "{@RP}Bitte nutze /setmoney Spieler Anzahl"
    25.         else:
    26.             if arg-1 is set:
    27.                 if arg-2 is set:
    28.                     set {bargeld.%arg-1%} to arg-2
    29.                     send "{@RP}Du hast &e%arg-1%&e %arg-2%&7$ gesetzt"
    30.                     send "{@RP}Dein Geld wurde Administrativ auf &c%arg-2%&7 gesetzt" to arg-1
    31.                     stop
    32.                 else:
    33.                     send "{@RP}Nutze bitte /setmoney %arg-1%&7 Anzahl"
    34.  
    35. command /addmoney [<offline player>] [<text>]:
    36.     permission: server.admin
    37.     permission message: &cKeine rechte dazu.
    38.     trigger:
    39.         if arg-1 is not set:
    40.             send "{@RP}Bitte nutze /addmoney Spieler Anzahl"
    41.         else:
    42.             if arg-1 is set:
    43.                 if arg-2 is set:
    44.                     add arg-2 to {bargeld.%arg-1%}
    45.                     send "{@RP}Du hast &e%arg-1%&e %arg-2%&7$ hinzugefügt"
    46.                     send "{@RP}Dir wurden Administrativ &c%arg-2%&7 gegeben" to arg-1
    47.                     stop
    48.                 else:
    49.                     send "{@RP}Nutze bitte /addmoney %arg-1%&7 Anzahl"
    50.          
    51. command /addbank [<offline player>] [<text>]:
    52.     permission: server.admin
    53.     permission message: &cKeine Rechte dazu.
    54.     trigger:
    55.         if arg-1 is not set:
    56.             send "{@RP}Bitte nutze /addbank Name Anzahl"
    57.         else:
    58.             if arg-1 is set:
    59.                 if arg-2 is set:
    60.                     add arg-2 to {bank.%arg-1%}
    61.                     send "{@RP}Du hast &e%arg-1%&e %arg-2%&7$ hinzugefügt"
    62.                     send "{@RP}Dir wurden Administrativ &c%arg-2%&7 auf die Bank gegeben" to arg-1
    63.                 else:
    64.                     send "{@RP}Nutze bitte /addbank %arg-1%&7 Anzahl"
    65.  
    66. command /Pay [<player>] [<number>]:
    67.     trigger:
    68.         If arg-1 is set:
    69.             if arg-2 is set:
    70.                 if {bargeld.%player%} is more or equal to arg-2:
    71.                     remove arg-2 from {bargeld.%player%}
    72.                     add arg-2 to {bargeld.%arg-1%}
    73.                     send "{@RP}Dir wurden von &e%player% &a%arg-2%&7$ gegeben" to arg-1
    74.                     send "{@RP}Du hast &e%arg-1% &a%arg-2%&7$ gegeben"
    75.                 else:
    76.                     send "{@RP}Du hast zuwenig geld dabei"
    77.  
    78. command /überweisen [<player>] [<number>]:
    79.     trigger:
    80.         If arg-1 is set:
    81.             if arg-2 is set:
    82.                 if {bank.%player%} is more or equal to arg-2:
    83.                     remove arg-2 from {bank.%player%}
    84.                     add arg-2 to {kontostand.%arg-1%}
    85.                     send "{@Bank}Dir wurden von &e%player% &a%arg-2%&7$ überwiesen" to arg-1
    86.                     send "{@Bank}Du hast &e%arg-1% &a%arg-2%&7$ überwiesen"
    87.                 else:
    88.                     send "{@Bank}&cDie Zahlung wurde nicht durchgeführt da dein Konto diesen Betrag nicht überweisen kann"
    --- Double Post Merged, Jun 9, 2021, Original Post Date: Jun 9, 2021 ---
    Sorry i'm German :emoji_slight_smile:
     
  2. Jayden13O

    Jayden13O Member

    Joined:
    Jun 9, 2021
    Messages:
    22
    Likes Received:
    1
    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?
     
  3. LeonZ

    LeonZ Member

    Joined:
    Jun 5, 2021
    Messages:
    2
    Likes Received:
    0
    That with the player and not the player uuid was right and no, unfortunately there are no errors so I ask
     
  4. Minecoll_YT

    Supporter Forums Helper

    Joined:
    Dec 2, 2018
    Messages:
    650
    Likes Received:
    39
    Das tut etwas in den Augen weh, zudem hast du doch gar keinen Befehl zum Überweisen auf das Bankkonto
     
Thread Status:
Not open for further replies.

Share This Page

Loading...