First i know the function Pay is already exist
Skript version: I think the newest
Vault version: Idk
i have SKQuery and SKRayfall as well
Skript version: I think the newest
Vault version: Idk
i have SKQuery and SKRayfall as well
Code:command /pay <player> <integer>:
usage: /pay <player> <money>
trigger:
if player has permission "sk.kort":
if arg 1 has permission "sk.kort":
if player's balance is more than or equal to arg 2:
remove arg 2 from player's balance
add arg 2 to arg 1's balance
send "You got %arg 2%$ from %player%" to arg 1
send "You have paid %arg 2%$ to %arg 1%"
else:
send "not enough money"
else:
send "the one you want to pay need a card"
else:
send"you need a card"
Error:usage: /pay <player> <money>
trigger:
if player has permission "sk.kort":
if arg 1 has permission "sk.kort":
if player's balance is more than or equal to arg 2:
remove arg 2 from player's balance
add arg 2 to arg 1's balance
send "You got %arg 2%$ from %player%" to arg 1
send "You have paid %arg 2%$ to %arg 1%"
else:
send "not enough money"
else:
send "the one you want to pay need a card"
else:
send"you need a card"
´player´s balance´ is not an entity type (name.sk, line 6: if player's balance is more than or equal to arg 2