Hello, i have a problem with my Script. I have a german Script because im german and here's a problem. The add 1 to {variable} doesent work. Here's the Skript:
On "add 1 to {count.player.ampelrennen}" has a problem. If i make the Cmd /ampelrennen join in Minecraft, then all works but if i test with /countplayers how many Players are in the Game, then theres 0 Player. Can any one help ?
Code:
options:
#Hier kannst du alles ändern
SPIELMODUSNAME: &e&lAmpelrennen
#Messages:
KEINERECHTE: &cSorry du hast dafür keine Rechte!
JOINMESSAGE: &6Du bist dem Spiel beigetreten
LOBBYSETSPAWNMESSAGE: &6Der Lobby Spawnpunkt wurde erfolgreich gesetzt.
ZIELSETSPAWNMESSAGE: &6Der Ziel Spawnpunkt wurde erfolgreich gesetzt.
STARTSETSPAWNMESSAGE: &6Der Start Spawnpunkt wurde erfolgreich gesetzt.
LEAVESETSPAWNMESSAGE: &6Du bist aus dem Spiel gegangen.
LEAVEMESSAGE: &6Du bist aus dem Spiel gegangen.
BEREITSIMSPIELMESSAGE: &6Du bist bereits im Spiel!
INKEINSPIELERRORMESSAGE: &6Du bist momentan in keinen Spiel!
#Hier darfst du nichts ändern!
command /ampelrennen [<text>] [<text>] [<string>]:
trigger:
if arg 1 is not set:
send "-------------------------" to player
send "&4&lCommands " to player
send "&6&l/ampelrennen <join,leave,admin,setspawn>" to player
send "-------------------------" to player
if arg 1 is "admin":
if player has permission "ampel.admin":
send "------------------------------------" to player
send "&4Admin &lCommands " to player
send "&6&l/ampelrennen setspawn <start,finish,lobby,leavepunkt>" to player
send "&6&l/ampelrennen start" to player
send "&6&l/ampelrennen stop" to player
send "------------------------------------"
else:
send "{@KEINERECHTE}"
if arg 1 is "setspawn":
if arg 2 is not set:
send "{@SPIELMODUSNAME} &6Bitte setze eine Syntax! /ampelrennen setspawn <start,finish,lobby,leavepunkt>" to player
if player has permission "ampel.admin":
if arg 2 is "start":
set {spawn.start} to location of player
send "{@SPIELMODUSNAME} {@STARTSETSPAWNMESSAGE}" to player
if arg 2 is "finish":
set {spawn.finish} to location of player
send "{@SPIELMODUSNAME} {@ZIELSETSPAWNMESSAGE}" to player
if arg 2 is "lobby":
set {spawn.lobby} to location of player
send "{@SPIELMODUSNAME} {@LOBBYSETSPAWNMESSAGE}" to player
send "{@SPIELMODUSNAME} &6Man wird nach dem Spiel immer wieder zu diesem Spawnpunkt teleportiert." to player
if arg 2 is "leavepunkt":
set {spawn.leave} to location of player
send "{@SPIELMODUSNAME} {@LEAVESETSPAWNMESSAGE}" to player
send "{@SPIELMODUSNAME} &6Man wird, wenn man mit /ampelrennen leave aus dem Spiel geht, zu diesem Spawnpunkt teleportiert." to player
else:
send "{@KEINERECHTE}" to player
if arg 1 is "join":
if {join.%player%} is "0":
set {join.%player%} to "1"
teleport player to {spawn.lobby}
add 1 to {count.player.ampelrennen}
send "{@JOINMESSAGE}" to player
else if {join.%player%} is "1":
send "{@BEREITSIMSPIELMESSAGE}" to player
if arg 1 is "leave":
if {join.%player%} is "1":
remove 1 from {count.player.ampelrennen}
set {join.%player%} to "0"
teleport player to {spawn.leave}
send "{@LEAVEMESSAGE}" to player
else if {join.%player%} is "0":
send "{@INKEINSPIELERRORMESSAGE}"
right click on sign:
if line 1 is "join":
if line 2 is "join ampelrennen":
execute player command "ampelrennen join"
on join:
if {join.%player%} is not set:
set {join.%player%} to "0"
on quit:
if {join.%player%} is "1":
teleport player to {spawn.leave}
remove 1 from {count.player.ampelrennen}
set {join.%player%} to "0"
#STRINGS TEST
command /spawnstart:
trigger:
teleport player to {spawn.start}
command /spawnfinish:
trigger:
teleport player to {spawn.finish}
command /spawnlobby:
trigger:
teleport player to {spawn.lobby}
command /countplayers:
trigger:
send "%{count.player.ampelrennen}%"
command /joinplayer:
trigger:
send "%{join.%player%}%" to player
#WERBUNG
on load:
send "---------------------------" to console
send "Dieses Plugin wurde von WorldMoney gecodet!" to console
send "Dieses Plugin befindet sich in der BETA!" to console
send "---------------------------" to console
On "add 1 to {count.player.ampelrennen}" has a problem. If i make the Cmd /ampelrennen join in Minecraft, then all works but if i test with /countplayers how many Players are in the Game, then theres 0 Player. Can any one help ?