Solved How to delete a chat message

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

Das3tins

Member
May 1, 2020
10
1
0
21
So I want to delete the chat message the person says, how do i do that.
Code:
on chat:
    if {willbuybitcoin::*} contains player:
        if message is a number:
            add message to {hourlyamount.%player%}
            set {_bitcoinswillbuy} to message
            if {_bitcoinswillbuy} <= 10:
                wait 1 tick
                if {hourlyamount.%player%} < 10:
                    set {_totalbuy} to {bitcoin.buyvalue} * arg 2
                    if balance of player >= {_totalbuy}:
                        add {_bitcoinswillbuy} to {bitcoins.%player%}
                        add {_bitcoinswillbuy} to {bitcoins.%player%}
                        remove {_totalbuy} from balance of player
                        message "{@p} &6%arg 2% bitcoin(s) has been added to your account! &aCurrent Balance: &e%{bitcoins.%player%}% &6bitcoin(s)"
                    else:
                        message "{@p} &cInsufficient funds!"
                else if {hourlyamount.%player%} >= 10:
                    remove message from {hourlyamount.%player%}
                    message "{@p} &cYou already bought 10 bitcoins in the last hour! &c(OR if you buy %arg 2% bitcoin(s), you will exceed the hourly amount of bitcoins you can buy.)"
            else if {_bitcoinswillbuy} > 10:
                message "{@p} &cYou can't buy more than 10 bitcoins!"
        else:
            message "{@p} &cPlease say a number"
 
Status
Not open for further replies.