offline money

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

uhdwo

Member
May 18, 2020
20
0
0
30
hi does anyone know if its possible to get a palyer's balance even if they are offline?
it works when they are online but not offline.... plz help


my code:

command /offlinemoney [<offline player>]:
permission: money.admin
trigger:
if arg-1 is set:
message "&bPlayer has &c%balance of arg-1% &bmoney"
 
hi does anyone know if its possible to get a palyer's balance even if they are offline?
it works when they are online but not offline.... plz help


my code:

command /offlinemoney [<offline player>]:
permission: money.admin
trigger:
if arg-1 is set:
message "&bPlayer has &c%balance of arg-1% &bmoney"
This worked perfect to me:
code_language.skript:
command /bal [<offline player>]:
    trigger:
        if arg 1 is not set:
            send "&bYour balance is &9 %player's balance%"
            stop
        if arg 1 is set:
            if player has permission "money.admin":
                send "&bThe %arg 1%'s money is&9 %arg 1's balance%"
                stop
            else:
                send "&cNo permissions."
                stop
 
i know, but when the player is offline it gives "<none>"
what do i do about that plz help
 
i know, but when the player is offline it gives "<none>"
what do i do about that plz help
That itself is not a skript problem. Remember that 'that' offline player must have entered the server and had activity on him balance.
 
That itself is not a skript problem. Remember that 'that' offline player must have entered the server and had activity on him balance.
i am using vault... isn't there anything i can do plz someone help i really REALLY need this to work plz! <3

the player has been online and he have money on his balance but when he logout it gives "<none>" plzzzzzzzzzzzz help <3
 
Try this:


Code:
command /offlinemoney [<offline player>]:
    permission: money.admin
    trigger:
        if arg-1 is set:
            message "&b%arg-1's balance%"
 
i am using vault... isn't there anything i can do plz someone help i really REALLY need this to work plz! <3

the player has been online and he have money on his balance but when he logout it gives "<none>" plzzzzzzzzzzzz help <3
Can you send a screenshot with '<none>' message? And show the player to whom you wrote in argument.

EDIT:
Try with this:
code_language.skript:
command /bal [<offline player>]:
    trigger:
        arg 1 is set:
            set {_bal} to arg 1's uuid
            set {_arg} to {_bal}'s balance
            send "&aBalance of %arg 1% is:&2 %{_arg}%"
 
just create a variable if the player quits:

On quit:
set {money.%player%} to player's balance

Than /money [<offlineplayer>]:
trigger:
send "%{money.%player%}%"
 
just create a variable if the player quits:

On quit:
set {money.%player%} to player's balance

Than /money [<offlineplayer>]:
trigger:
send "%{money.%player%}%"
There you would be showing the balance of the command executor. If you want it with variables, it would be something like this:
code_language.skript:
on join:
    set {money.%player%} to player's balance

command /bal [<offline player>]:
    trigger:
        arg 1 is set:
            send "&a%arg 1%'s balance is:&2 %{money.%arg 1%}%" to sender
Also, it's not recommended to save player money in a variable. Variable contents will be lost once the server stops.
 
Status
Not open for further replies.