mirror of
https://github.com/ND-Framework/ND_Core.git
synced 2026-08-18 14:26:03 +01:00
perf(ui): adding spawns
This commit is contained in:
@@ -65,7 +65,9 @@ $(function() {
|
|||||||
$("#spawnMenuContainer").empty();
|
$("#spawnMenuContainer").empty();
|
||||||
setTimeout(function(){
|
setTimeout(function(){
|
||||||
$("#tpDoNot").data("id", item.id);
|
$("#tpDoNot").data("id", item.id);
|
||||||
$("#spawnMenuContainer").append(`<button class="spawnButtons" data-x="${item.x}" data-y="${item.y}" data-z="${item.z}">${item.name}</button>`);
|
JSON.parse(item.spawns).forEach((location) => {
|
||||||
|
$("#spawnMenuContainer").append(`<button class="spawnButtons" data-x="${location.x}" data-y="${location.y}" data-z="${location.z}">${location.name}</button>`);
|
||||||
|
});
|
||||||
$(".spawnButtons").click(function() {
|
$(".spawnButtons").click(function() {
|
||||||
$.post(`https://${GetParentResourceName()}/tpToLocation`, JSON.stringify({
|
$.post(`https://${GetParentResourceName()}/tpToLocation`, JSON.stringify({
|
||||||
x: $(this).data("x"),
|
x: $(this).data("x"),
|
||||||
|
|||||||
Reference in New Issue
Block a user