Skript version: 2.5.3
Server version:git-paper-529
Addons:Skellett v1.9.11, skRayFall v1.9.23, SkQuery v4.1.4, TuSKe v1.8.2, SharpSK v1.6.4
Hello, I am making a skript that you can buy someone out of jail. I have it almost done but i need to add money check. I added if %player's money% is greater or equal to 2000 but it says: "cant compare %player's money% with an integer. I have vault installed but it doesnt work.
Thanks for your help.
Solved:
Instead of %player's money% put player's balance without %.
for the if player's balance is lesser than or equal to 1999 dont put it there put: else
New code looks like this:
Server version:git-paper-529
Addons:Skellett v1.9.11, skRayFall v1.9.23, SkQuery v4.1.4, TuSKe v1.8.2, SharpSK v1.6.4
Hello, I am making a skript that you can buy someone out of jail. I have it almost done but i need to add money check. I added if %player's money% is greater or equal to 2000 but it says: "cant compare %player's money% with an integer. I have vault installed but it doesnt work.
Thanks for your help.
Code:
command /buyout <player>:
trigger:
if arg 1 is not set:
send "&eYou have to write player's name." to player
stop
if arg 1 is set:
if %player's money% is greater than or equal to 2000:
send "&aYou have rescued %arg 1% from jail." to player
make server execute command "eco take %player% 2000"
make server execute command "unjail %arg 1%"
stop
if %player's money% is lesser than or equal to 1999:
send "&eYou dont have enough money.."
stop
Solved:
Instead of %player's money% put player's balance without %.
for the if player's balance is lesser than or equal to 1999 dont put it there put: else
New code looks like this:
Code:
command /buyout <player>:
trigger:
if arg 1 is not set:
send "&eYou have to write name of the player." to player
stop
if arg 1 is set:
if player's balance is greater than or equal to 2000:
send "&aYou've rescued %arg 1%" to player
make server execute command "eco take %player% 2000"
make server execute command "unjail %arg 1%"
stop
else:
send "&eYou dont have enough money." to player
stop
Last edited: