So, i am doing a little checkpoint skript that when a player passes the region it gives him money and sets his spawn, but i dont want the player to be able to get the reward everytime he passes the region, how do i do that?
My code:
My code:
on region enter:
if "%region%" contains "checkpoint1":
make console execute command "/addcoins 200 %player%"
make console execute command "/spawnpoint %player% 10 18 144"
if "%region%" contains "checkpoint2":
make console execute command "/addcoins 200 %player%"
make console execute command "/spawnpoint %player% 24 26 214"
I've also tried this, but it didnt work:
on region enter:
if "%region%" contains "checkpoint1":
if player has permission "{checkpoint.checkpoint1}":
cancel event
else:
make console execute command "/addcoins 200 %player%"
add "checkpoint.checkpoint1" to player's permissions
if "%region%" contains "checkpoint2":
if player has permission "{checkpoint.checkpoint2}":
cancel event
else:
make console execute command "/addcoins 200 %player%"
add "checkpoint.checkpoint2" to player's permissions
if "%region%" contains "checkpoint1":
make console execute command "/addcoins 200 %player%"
make console execute command "/spawnpoint %player% 10 18 144"
if "%region%" contains "checkpoint2":
make console execute command "/addcoins 200 %player%"
make console execute command "/spawnpoint %player% 24 26 214"
I've also tried this, but it didnt work:
on region enter:
if "%region%" contains "checkpoint1":
if player has permission "{checkpoint.checkpoint1}":
cancel event
else:
make console execute command "/addcoins 200 %player%"
add "checkpoint.checkpoint1" to player's permissions
if "%region%" contains "checkpoint2":
if player has permission "{checkpoint.checkpoint2}":
cancel event
else:
make console execute command "/addcoins 200 %player%"
add "checkpoint.checkpoint2" to player's permissions