Skip to content

Commit

Permalink
Fix #451
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardosnt committed Oct 17, 2016
1 parent 3682fd6 commit 377f7a2
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 4 deletions.
3 changes: 2 additions & 1 deletion default/lang_en.json
Expand Up @@ -233,5 +233,6 @@
"WARP_SET": "<cyan>Warp '{0}' has been set.",
"WARP_TELEPORTED": "Teleported to warp '{0}'.",
"WITHOUT_BED": "<yellow>You do not have a bed to teleport to.",
"REQUEST_URL_SUCCESS": "You have requested '{0}' to open url '{1}'"
"REQUEST_URL_SUCCESS": "You have requested '{0}' to open url '{1}'",
"WARP_ALREADY_WAITING": "You already waiting to be teleported."
}
3 changes: 2 additions & 1 deletion default/lang_es.json
Expand Up @@ -232,5 +232,6 @@
"WARP_SET": "Warp {0} fue creado.",
"WARP_TELEPORTED": "Teletransportado al warp {0}.",
"WITHOUT_BED": "No tienes una cama para teletransportarte.",
"REQUEST_URL_SUCCESS": "Enviaste a '{0}' un enlace: '{1}' ."
"REQUEST_URL_SUCCESS": "Enviaste a '{0}' un enlace: '{1}' .",
"WARP_ALREADY_WAITING": "You already waiting to be teleported."
}
3 changes: 2 additions & 1 deletion default/lang_pt-br.json
Expand Up @@ -232,5 +232,6 @@
"WARP_SET": "Warp '{0}' definida com sucesso.",
"WARP_TELEPORTED": "Você foi teleportado para warap '{0}'",
"WITHOUT_BED": "Você não tem uma cama.",
"REQUEST_URL_SUCCESS": "Você enviou um pedido a '{0}' para abrir a url '{1}'"
"REQUEST_URL_SUCCESS": "Você enviou um pedido a '{0}' para abrir a url '{1}'",
"WARP_ALREADY_WAITING": "Você já está esperando para ser teleportado."
}
3 changes: 2 additions & 1 deletion default/lang_ru.json
Expand Up @@ -232,5 +232,6 @@
"WARP_SET": "<cyan>Варп '{0}' установлен.",
"WARP_TELEPORTED": "Телепортированы на варп '{0}'.",
"WITHOUT_BED": "<yellow>У Вас нет кровати для телепортации.",
"REQUEST_URL_SUCCESS": "You have requested '{0}' to open url '{1}'"
"REQUEST_URL_SUCCESS": "You have requested '{0}' to open url '{1}'",
"WARP_ALREADY_WAITING": "You already waiting to be teleported."
}
4 changes: 4 additions & 0 deletions src/NativeModules/Warp/Commands/CommandWarp.cs
Expand Up @@ -68,6 +68,10 @@ public class CommandWarp : EssCommand {
return CommandResult.Lang("CANNOT_TELEPORT_DRIVING");
}

if (Delay.ContainsKey(player.CSteamId.m_SteamID)) {
return CommandResult.Lang("WARP_ALREADY_WAITING");
}

var dest = WarpModule.Instance.WarpManager.GetByName(args[0].ToString());
var cooldown = UEssentials.Config.Warp.TeleportDelay;

Expand Down

0 comments on commit 377f7a2

Please sign in to comment.