local bases = { -- ["comando"] = {x, y, z, r, "nome"},
["tpbloods"] = {2219.984, -1143.273, 25.797, 353.328, "Bloods"},
["tpgrove"] = {2463.633, -1659.423, 13.311, 88.373, "Grove"},
["tpcrips"] = {2183.58, -1761.268, 13.375, 359.602, "Crips"},
["tpsiliciana"] = {2418.157, -2009.204, 13.396, 90.592, "Siliciana"},
}
function teleBases(cmd, thePlayer)
if isObjectInACLGroup("user." ..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("Staff")) then
if getElementData(thePlayer, "Expediente-STAFF") == "Sim" then
if not Flying[thePlayer] then
Flying[thePlayer] = true
setElementAlpha(thePlayer, 0)
triggerClientEvent(thePlayer, "onClientFlyToggle", thePlayer)
end
local x, y, z, r, nome = unpack(bases[cmd])
setElementPosition(thePlayer, x, y, z)
setElementRotation(thePlayer, 0, 0, r)
showInfobox(thePlayer, "Você teleportou para a base "..nome, "success")
else
atendimento(thePlayer)
end
end
end
for cmd,item in pairs(bases) do
addCommandHandler(cmd, teleBases)
end
----------------------------------------------------------------------------------------------------------------------------
function showInfobox(element, message, tipo)
exports["[HYPE]NOTIFY"]:addNotification(element, message, tipo)
end
atendimento = function (element)
return triggerClientEvent(element, "HypeNotify", element, "Você não está em modo atendimento use /pro", "error")
end
Fiz de cabeça, não testado.