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.

on money transfer

Discussion in 'Skript' started by mynameisjosep, Jun 11, 2020.

Tags:
Thread Status:
Not open for further replies.
  1. mynameisjosep

    mynameisjosep Member

    Joined:
    Apr 25, 2020
    Messages:
    29
    Likes Received:
    0
    so guys im want a skript like this

    on money transfer:
    if transefered money is equal to 10:
    cancel event
     
  2. SkriptLearner

    SkriptLearner Member

    Joined:
    Jul 21, 2019
    Messages:
    45
    Likes Received:
    0
    Hey mynameisjosep,

    I believe that what you ask for is not possible. However, what plugin is it that you are expecting to trigger this event?

    If it is essentials, have you checked the config to see if there is a way to put a minimum amount of money that a player can pay?

    Also if this is to do with /pay you could try:
    Code (Text):
    1. on command:
    2.   full command contains "pay 10"
    3.   cancel event
    Hopefully this helps!
     
  3. mynameisjosep

    mynameisjosep Member

    Joined:
    Apr 25, 2020
    Messages:
    29
    Likes Received:
    0
    if he didn't has 10 money ?
     
  4. Nikd0

    Nikd0 Active Member

    Joined:
    May 30, 2020
    Messages:
    204
    Likes Received:
    19
    There is a question... if you're using a third party plugin it should have already been done and you do not need to worry about it.
    If you have your own plugin in Skript, try to edit the /pay command:
    Code (Text):
    1. if {yourmoneyvariable::%player%} < arg-x:
    2.     send "You don't have enough money!"
    3.     stop
    I've put arg-x cause I don't know which argument the integer or number is.
     
  5. mynameisjosep

    mynameisjosep Member

    Joined:
    Apr 25, 2020
    Messages:
    29
    Likes Received:
    0
    i didnt mean it i mean on succesfully money transfer.
     
  6. Nikd0

    Nikd0 Active Member

    Joined:
    May 30, 2020
    Messages:
    204
    Likes Received:
    19
    Code (Text):
    1. on command "/pay":
    2.     set {_vars} to arguments
    3.     set {_variables::*} to {_vars} split at " "
    4.     set {_money} to placeholder "YOUR_MONEY_PLACEHOLDER" from player
    5.     set {_paid} to {_variables::2} parsed as number #if you're using /pay <player> <amount>
    6.     if size of {_variables::*} != 2:
    7.         cancel event
    8.         send "&cUse: /pay <player> <amount>"
    9.         stop
    10.     if {_paid} > 0:
    11.         #continue
    12.     else:
    13.         cancel event
    14.         send "&cYou wrongly used argument 2." #can detect if player has used a text instead of number
    15.         stop
    16.     if {_money} < {_paid}:
    17.         cancel event
    18.         send "&cYou don't have enough money!"
    19.     else:
    20.         send "&aDone!" #Just for testing purposes
    It should remind you of an empty configuration section but don't mind it.
    Also I think you need Ersatz or Skellett for placeholders: https://docs.skunity.com/syntax/search/placeholder
     
  7. mynameisjosep

    mynameisjosep Member

    Joined:
    Apr 25, 2020
    Messages:
    29
    Likes Received:
    0
    thank you but i need help at this thread = https://forums.skunity.com/threads/how-to-use-variables-on-wait-gg-second.11883/#post-50913
     
Thread Status:
Not open for further replies.

Share This Page

Loading...