How do i ask a Player how many coins he has?
code_language.skript:
if arg 1 is set:
if {coins.%arg-1%} is 2500 (or higher):
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!
You can always check out skUnity Downloads for downloads and any other information about Skript!
if arg 1 is set:
if {coins.%arg-1%} is 2500 (or higher):
if arg 1 is set:
if {coins.%arg-1%} is >= 2500:
if arg 1 is set:
if arg 1 is set:
if {coins.%arg-1%} is >= 2500:
send "&6Lobby &8>> &6You dont have enough coins for this!" to arg 1
Oh, yes.
Thanks.
[doublepost=1489860430,1489860201][/doublepost]But its makered as false. "'{coins.%arg-1%} is' is not an entity type"
code_language.skript:if arg 1 is set: if arg 1 is set: if {coins.%arg-1%} is >= 2500: send "&6Lobby &8>> &6You dont have enough coins for this!" to arg 1
Coins:
on first join:
set {coins.%player%} to 0
stop
command /coins:
trigger:
send "&8[&6Coins&8] &fDeine Coins: &6%{coins.%player%}%"
stop
command /givecoins [<player>] [<text>]:
trigger:
if player has permission "admin.givecoins":
if arg 1 is not set:
send "&8[&6Coins&8] &cDu musst einen Spieler angeben!"
stop
if arg 2 is not set:
send "&8[&6Coins&8] &cDu musst einen Betrag angeben!"
stop
if arg 1 is player:
send "&8[&6Coins&8] &cDu hast &6%arg-1% %arg-2% &cCoins gegeben!" to player
send "&8[&6Coins&8] &cDir wurden &6%arg-2% &cCoins von &6%sender% &cgegeben!" to arg 1
add arg 2 to {coins.%arg-1%}
stop
else:
send "&8[&6Coins&8] &cDu darfst diesen Befehl &4&lNICHT &cbenutzen!"
stop
buy-system:
command /5luckyblock [<player>]:
trigger:
if player has permission "Lucky.give":
if arg 1 is not set:
send "&6LuckyFFA &8>> &cDu musst einen Spieler angeben!"
stop
if arg 1 is set:
if {coins.%player%} is >= 2500:
send "&6LuckyFFa &8>> &cDu hast nicht genug Coins dazu" to arg 1
Sry, its german xdcode_language.skript:Coins: on first join: set {coins.%player%} to 0 stop command /coins: trigger: send "&8[&6Coins&8] &fDeine Coins: &6%{coins.%player%}%" stop command /givecoins [<player>] [<text>]: trigger: if player has permission "admin.givecoins": if arg 1 is not set: send "&8[&6Coins&8] &cDu musst einen Spieler angeben!" stop if arg 2 is not set: send "&8[&6Coins&8] &cDu musst einen Betrag angeben!" stop if arg 1 is player: send "&8[&6Coins&8] &cDu hast &6%arg-1% %arg-2% &cCoins gegeben!" to player send "&8[&6Coins&8] &cDir wurden &6%arg-2% &cCoins von &6%sender% &cgegeben!" to arg 1 add arg 2 to {coins.%arg-1%} stop else: send "&8[&6Coins&8] &cDu darfst diesen Befehl &4&lNICHT &cbenutzen!" stop buy-system: command /5luckyblock [<player>]: trigger: if player has permission "Lucky.give": if arg 1 is not set: send "&6LuckyFFA &8>> &cDu musst einen Spieler angeben!" stop if arg 1 is set: if {coins.%player%} is >= 2500: send "&6LuckyFFa &8>> &cDu hast nicht genug Coins dazu" to arg 1
How im doing this?clear all your variables
How im doing this?
Delete all variables?
command /debug:
trigger:
clear {coins.%player%}
nope.
Same Probleme.
I've got 2 Problems.
{coins.%player%} is' is not an entity type (ShopLuckyFFA2.sk, line 8: if {coins.%player%} is >= 2500:')
and when i make /givecoins, it does not add the coins to coins.
on join:
if {coins.%player%} isn't set:
set {coins.%player%} to 0
command /givecoins [<player>] [<number>]:
trigger:
if arg-1 is set:
if arg-2 is set:
add arg-2 to {coins.%player%} to 0
command /5luckyblock [<player>]:
trigger:
if arg-1 is set:
if {coins.%player%} is more or equal than 2500:
remove 2500 from {coins.%player%}
message "&c&lTEST"
Im looking for this tomorrow.
Thanks for your Help!
But when im writing
add arg-2 to {coins.%player%} to 0
I add the amount to 0.
Does it work too with an other amount?
add arg-2 to {coins.%player%} to 0
add 10 to {coins.%player%}
remove 10 from {coins.%player%}
set {coins.%player%} to 0
delete {coins.%player%}
clear {coins.%player%}
No, because it should be:Does not work.
if {coins.%player%} is greater than or equal to 2500:
Why?Also, you should use list variables for the coins variable,
Why?