Hi guys. I'm ""new"" at scripting, and i'm here because i need help. I made a speedrun skript, where the players, with a command, are teleported in a location. The problem is that the "loop all players" doesn't work at the same time, because it teleports all players one by one, doing the trigger of a command one player by one. Here's the command line:
command /speedrun [<text>] [<text>]:
permission: sr.admin
permission message: &cYou don't have enough permissions for that!
description: speedrun plugin made by LoryWasHere
trigger:
if arg-1 is "forcestart":
loop all players:
teleport loop-player to {lol}
send "&9SpeedRun>&7 SpeedRun scripted by LoryWasHere has started!" to loop-player
set block at {location1} to fence
set block at {location2} to fence
set block at {location3} to fence
set block at {location4} to fence
set block at {location5} to fence
wait 2 seconds
play sound "NOTE_PLING" to loop-player with volume 1 and pitch 2
send "&9SpeedRun>&a The game will start soon: 5" to loop-player
wait 1 second
play sound "NOTE_PLING" to loop-player with volume 1 and pitch 2
send "&9SpeedRun>&a The game will start soon: 4" to loop-player
wait 1 second
play sound "NOTE_PLING" to loop-player with volume 1 and pitch 2
send "&9SpeedRun>&a The game will start soon: 3" to loop-player
wait 1 second
play sound "NOTE_PLING" to loop-player with volume 1 and pitch 1.5
send "&9SpeedRun>&a The game will start soon: 2" to loop-player
wait 1 second
play sound "NOTE_PLING" to loop-player with volume 1 and pitch 1
send "&9SpeedRun>&a The game will start soon: 1" to loop-player
wait 1 second
play sound "LEVEL_UP" to loop-player with volume 1 and pitch 1
send "&9SpeedRun>&a The game has just started! ENJOY!" to loop-player
set block at {location1} to air
set block at {location2} to air
set block at {location3} to air
set block at {location4} to air
set block at {location5} to air
apply speed 10 to loop-player for 999 days
if arg-1 is "set":
if arg-2 is "location":
set {lol} to executor's location
send "&9SpeedRun>&7 You gave to players a new location to spawn!" to executor
if arg-1 is "delete":
loop all players:
delete {sr.gamestarted.%loop-player%}
delete {srjoinable}
send "&9SpeedRun>&7 You have delete successfully the player's location and the database!" to executor
The command is "forcestart". Please help me.
command /speedrun [<text>] [<text>]:
permission: sr.admin
permission message: &cYou don't have enough permissions for that!
description: speedrun plugin made by LoryWasHere
trigger:
if arg-1 is "forcestart":
loop all players:
teleport loop-player to {lol}
send "&9SpeedRun>&7 SpeedRun scripted by LoryWasHere has started!" to loop-player
set block at {location1} to fence
set block at {location2} to fence
set block at {location3} to fence
set block at {location4} to fence
set block at {location5} to fence
wait 2 seconds
play sound "NOTE_PLING" to loop-player with volume 1 and pitch 2
send "&9SpeedRun>&a The game will start soon: 5" to loop-player
wait 1 second
play sound "NOTE_PLING" to loop-player with volume 1 and pitch 2
send "&9SpeedRun>&a The game will start soon: 4" to loop-player
wait 1 second
play sound "NOTE_PLING" to loop-player with volume 1 and pitch 2
send "&9SpeedRun>&a The game will start soon: 3" to loop-player
wait 1 second
play sound "NOTE_PLING" to loop-player with volume 1 and pitch 1.5
send "&9SpeedRun>&a The game will start soon: 2" to loop-player
wait 1 second
play sound "NOTE_PLING" to loop-player with volume 1 and pitch 1
send "&9SpeedRun>&a The game will start soon: 1" to loop-player
wait 1 second
play sound "LEVEL_UP" to loop-player with volume 1 and pitch 1
send "&9SpeedRun>&a The game has just started! ENJOY!" to loop-player
set block at {location1} to air
set block at {location2} to air
set block at {location3} to air
set block at {location4} to air
set block at {location5} to air
apply speed 10 to loop-player for 999 days
if arg-1 is "set":
if arg-2 is "location":
set {lol} to executor's location
send "&9SpeedRun>&7 You gave to players a new location to spawn!" to executor
if arg-1 is "delete":
loop all players:
delete {sr.gamestarted.%loop-player%}
delete {srjoinable}
send "&9SpeedRun>&7 You have delete successfully the player's location and the database!" to executor
The command is "forcestart". Please help me.