Jump to content

OrbTanT

Members
  • Posts

    226
  • Joined

  • Last visited

1 Follower

About OrbTanT

  • Birthday 20/09/1996

Details

  • Location
    Campo Grande - MS
  • Occupation
    Lua nas horas vagas

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

OrbTanT's Achievements

Trick

Trick (18/54)

5

Reputation

  1. Bom, não faço ideia como você vai definir o motorista e o veiculo, mais aqui ta um exemplo. local vehicleID = 420 -- ID model do táxi addEventHandler("onVehicleStartEnter", getRootElement(), function(player, seat, jacked, door) -- esse evento é acionado assim que todo player tenta entrar em algum veiculo if (getElementModel(source) == vehicleID) then -- verifica se o veiculo que o jogador está entrando é um taxi if (door == 0) then -- verifica se o jogador está entrando como motorista local owner = getElementData(source, "owner") -- guarda na variavel owner o dono do veiculo if (owner) then -- veirica se existe um dono if (owner ~= player) then -- verifica se o player que estia tentando entrar no veiculo não é o dono do veiculo e se não for vai passar uma mensagem outputChatBox("[VEICULO] Somente o dono pode dirigir este veiculo", player, 0, 255, 0) cancelEvent() -- impede o jogador de entrar no veiculo se não for o dono/motorista end end end end end)
  2. OrbTanT

    Faço scripts

    Cobro de 5 a 10 Reais dependendo da dificuldade e tempo. Experiências- Sistema de Gangs Sistemas de territórios (turfs) Sistema de eventos Sistema de levels Painéis E outros. Interessados chamar discord: OrbTanT#5760
  3. interiors.map. Thank you for answer <interiorEntry id="AMMUN1" posX="1368.35" posY="-1279.06" posZ="12.55" rotation="-0.100006" dimension="0" interior="0" /> <interiorReturn refid="AMMUN1" posX="286.15" posY="-41.54" posZ="1000.57" rotation="90" interior="1" dimension="0" /> <interiorEntry id="AMMUN1 (2)" posX="-2625.85" posY="208.345" posZ="3.98935" rotation="0" dimension="0" interior="0" /> <interiorReturn refid="AMMUN1 (2)" posX="286.15" posY="-41.54" posZ="1000.57" rotation="5400.06" interior="1" dimension="1" /> <interiorEntry id="AMMUN2" posX="242.668" posY="-178.478" posZ="0.621441" rotation="-0.100006" dimension="0" interior="0" /> <interiorReturn refid="AMMUN2" posX="285.8" posY="-85.45" posZ="1000.54" rotation="-269.903" interior="4" dimension="0" /> <interiorEntry id="AMMUN2 (2)" posX="2333.43" posY="61.5173" posZ="25.7342" rotation="0" dimension="0" interior="0" /> <interiorReturn refid="AMMUN2 (2)" posX="285.8" posY="-85.45" posZ="1000.54" rotation="-90" interior="4" dimension="1" /> <interiorEntry id="AMMUN2 (3)" posX="2159.51" posY="943.329" posZ="9.82339" rotation="0" dimension="0" interior="0" /> <interiorReturn refid="AMMUN2 (3)" posX="285.8" posY="-85.45" posZ="1000.54" rotation="-3870.01" interior="4" dimension="2" /> <interiorEntry id="AMMUN2 (4)" posX="2539.04" posY="2083.56" posZ="9.82222" rotation="0" dimension="0" interior="0" /> <interiorReturn refid="AMMUN2 (4)" posX="285.8" posY="-85.45" posZ="1000.54" rotation="90" interior="4" dimension="3" /> <interiorEntry id="AMMUN3" posX="777.231" posY="1871.47" posZ="3.97687" rotation="-0.100006" dimension="0" interior="0" /> <interiorReturn refid="AMMUN3" posX="296.92" posY="-111.97" posZ="1000.57" rotation="300.994" interior="6" dimension="3" /> <interiorEntry id="AMMUN3 (2)" posX="-315.676" posY="829.868" posZ="13.4266" rotation="0" dimension="0" interior="0" /> <interiorReturn refid="AMMUN3 (2)" posX="296.92" posY="-111.97" posZ="1000.57" rotation="300.994" interior="6" dimension="4" /> <interiorEntry id="AMMUN3 (3)" posX="-2093.51" posY="-2464.79" posZ="29.6404" rotation="0" dimension="0" interior="0" /> <interiorReturn refid="AMMUN3 (3)" posX="296.92" posY="-111.97" posZ="1000.57" rotation="319" interior="6" dimension="5" /> <interiorEntry id="AMMUN3 (4)" posX="2400.5" posY="-1981.48" posZ="12.5604" rotation="0" dimension="0" interior="0" /> <interiorReturn refid="AMMUN3 (4)" posX="296.92" posY="-111.97" posZ="1000.57" rotation="0" interior="6" dimension="6" /> <interiorEntry id="AMMUN5" posX="-1508.89" posY="2610.8" posZ="54.8902" rotation="-0.100006" dimension="0" interior="0" /> <interiorReturn refid="AMMUN5" posX="316.53" posY="-169.61" posZ="998.66" rotation="180" interior="6" dimension="0" />
  4. guys I used the map of the resource interiors to make the script work my way, it's almost 100% working but there is a problem that I couldn't solve, the entry and exit are done using an id, for some reason when I leave the interior, I end up leaving in a totally different interior, and from the print it looks like it ran for 4 more interiors, I didn't find the error. grateful to those who help. =) https://prnt.sc/rtbvdy local interiors = {} function createInteriors(id, data, type) if not (interiors[id]) then interiors[id] = {} end if (type == "entry") then interiors[id]["entry"] = data elseif (type == "return") then interiors[id]["return"] = data end local x, y, z, rot, dim, int = unpack(data) local col = createColSphere(x, y, z, 1.5) col:setDimension(dim) col:setInterior(int) col:setData("interior", true) col:setData("id", id) col:setData("type", type) local arrow = createObject(1318, x, y, z + 1) arrow:setDimension(dim) arrow:setInterior(int) arrow:setData("interior", true) arrow:setData("type", type) arrow:setData("animation", {z+0.5, z+1.6}) end addEventHandler("onColShapeHit", getRootElement(), function(element) if (element:getType() == "player" and not element:getOccupiedVehicle()) then if not (source:getData("interior")) then return end if (element:getData("interiorHit")) then return end local id = source:getData("id") if not (id) then return end if (interiors[id]) then local type = source:getData("type") if (type) then if (type == "entry") then local data = interiors[id]["return"] if not (data) then return end warpPlayerInterior(element, unpack(data)) elseif (type == "return") then print(id) local data = interiors[id]["entry"] if not (data) then return end warpPlayerInterior(element, unpack(data)) end end end end end) function warpPlayerInterior(player, x, y, z, rot, dim, int) fadeCamera(player, false, 0.5) player:setAlpha(175) Timer(function(player) player:setData("interiorHit", true) player:setDimension(dim) player:setInterior(int) player:setPosition(x, y, z+1) player:setRotation(0, 0, rot) if (int ~= 0) then toggleControl(player, "fire", false) toggleControl(player, "aim_weapon", false) else toggleControl(player, "fire", true) toggleControl(player, "aim_weapon", true) end Timer(fadeCamera, 1000, 1, player, true, 1) Timer(function(player) player:setAlpha(255) player:setData("interiorHit", nil) end, 2000, 1, player) end, 500, 1, player) end addEventHandler("onResourceStart", resourceRoot, function() for key, interior in ipairs (getElementsByType("interiorEntry", resourceRoot)) do local id = getElementData(interior, "id") local x = tonumber(getElementData(interior, "posX")) local y = tonumber(getElementData(interior, "posY")) local z = tonumber(getElementData(interior, "posZ")) local rot = tonumber(getElementData(interior, "rotation")) local dim = tonumber(getElementData(interior, "dimension")) local int = tonumber(getElementData(interior, "interior")) createInteriors(id, {x, y, z, rot, dim, int}, "entry") end for key, interior in ipairs (getElementsByType("interiorReturn", resourceRoot)) do local id = getElementData(interior, "refid") local x = tonumber(getElementData(interior, "posX")) local y = tonumber(getElementData(interior, "posY")) local z = tonumber(getElementData(interior, "posZ")) local rot = tonumber(getElementData(interior, "rotation")) local dim = tonumber(getElementData(interior, "dimension")) local int = tonumber(getElementData(interior, "interior")) createInteriors(id, {x, y, z, rot, dim, int}, "return") end for _, player in ipairs (getElementsByType("player")) do player:setData("interiorHit", nil) end end)
  5. Hello guys, problem to calculate mouse click with real map position in the world gta https://prnt.sc/rk608u ? local screenx, screeny = guiGetScreenSize() local sx, sy = (screenx/1920), (screeny/1080) loadstring(exports.dgs:dgsImportFunction())() local blip = nil local blip2 = nil local width = 700 local height = 700 GangMarcar = dgsCreateWindow((screenx - sx*720)/2, (screeny - sy*810)/2, sx*720, sy*810, "MARQUE UM DESTINO PARA SUA GANG", false, tocolor(0, 0, 0, 255), sy*50, nil, tocolor(0, 255, 255, 150), nil, tocolor(0, 0, 0, 150), sy*5, true) dgsWindowSetMovable(GangMarcar, false) dgsWindowSetSizable(GangMarcar, false) dgsSetVisible(GangMarcar, false) GangMarcarMap = dgsCreateImage(sx*10, sy*10, width, width, "Images/radar.jpg", false, GangMarcar, tocolor(255,255,255,255)) GangMarcarLabel0 = dgsCreateLabel(sx*10, sy*10, sx*480, sy*20, "BOTÃO DIREITO DO MOUSE PRA TIRAR", false, GangCriar, tocolor(255, 255, 0, 255), sy*1.5, sy*1.5, sy*1.5, sy*1.5, tocolor(0, 0, 0, 255), "right", "center") GangMarcarSair = dgsCreateButton(sx*610, sy*720, sx*100, sy*30, "SAIR", false, GangMarcar, tocolor(0, 0, 0, 255), sy*1.5, sy*1.5, nil, nil, nil, tocolor(255, 77, 77, 150), tocolor(255, 0, 0, 150), tocolor(255, 61, 153, 150)) addEventHandler("onDgsMouseClick", getRootElement(), function(button, state, absoluteX, absoluteY) if (button == "left" and state == "down") then if (source == GangMarcarMap) then local x = absoluteX*6000 - 3000 local y = 3000 - absoluteY*6000 if not (blip) then createBlip(x, y, 0, 41) setElementPosition(localPlayer, x, y, 0) end elseif (source == GangMarcarSair) then dgsSetVisible(GangMarcar, false) dgsSetEnabled(Gang, true) end elseif (button == "right" and state == "down") then if (blip) then destroyElement(blip) end end end)
  6. Galera, estou fazendo um painel onde ao clicar no local vai marcar o mapa, forem nunca mexi com caculo envolvendo mapa. OBS: estou usando DGS framework, funções similar a o gui do mta. https://prnt.sc/rk608u local screenx, screeny = guiGetScreenSize() local sx, sy = (screenx/1920), (screeny/1080) loadstring(exports.dgs:dgsImportFunction())() local blip = nil local blip2 = nil local width = 700 local height = 700 GangMarcar = dgsCreateWindow((screenx - sx*720)/2, (screeny - sy*810)/2, sx*720, sy*810, "MARQUE UM DESTINO PARA SUA GANG", false, tocolor(0, 0, 0, 255), sy*50, nil, tocolor(0, 255, 255, 150), nil, tocolor(0, 0, 0, 150), sy*5, true) dgsWindowSetMovable(GangMarcar, false) dgsWindowSetSizable(GangMarcar, false) dgsSetVisible(GangMarcar, false) GangMarcarMap = dgsCreateImage(sx*10, sy*10, width, width, "Images/radar.jpg", false, GangMarcar, tocolor(255,255,255,255)) GangMarcarLabel0 = dgsCreateLabel(sx*10, sy*10, sx*480, sy*20, "BOTÃO DIREITO DO MOUSE PRA TIRAR", false, GangCriar, tocolor(255, 255, 0, 255), sy*1.5, sy*1.5, sy*1.5, sy*1.5, tocolor(0, 0, 0, 255), "right", "center") GangMarcarSair = dgsCreateButton(sx*610, sy*720, sx*100, sy*30, "SAIR", false, GangMarcar, tocolor(0, 0, 0, 255), sy*1.5, sy*1.5, nil, nil, nil, tocolor(255, 77, 77, 150), tocolor(255, 0, 0, 150), tocolor(255, 61, 153, 150)) addEventHandler("onDgsMouseClick", getRootElement(), function(button, state, absoluteX, absoluteY) if (button == "left" and state == "down") then if (source == GangMarcarMap) then local x = absoluteX*6000 - 3000 local y = 3000 - absoluteY*6000 if not (blip) then createBlip(x, y, 0, 41) setElementPosition(localPlayer, x, y, 0) end elseif (source == GangMarcarSair) then dgsSetVisible(GangMarcar, false) dgsSetEnabled(Gang, true) end elseif (button == "right" and state == "down") then if (blip) then destroyElement(blip) end end end)
  7. me passa o link desse pack, vou ver o code e te ajudar
  8. seguindo o exemplo do @#DeltaSCR antes do paramento valTimer declarado na function prenderJogador deve ter um parâmetro para o jogador colocar a ID do jogador. function prenderJogador(thePlayer, cmd, playerid, valTimer) --// playerid é o valor id inserido pelo jogador // "valTimer" é o valor de tempo inserido pelo player que está acionando o comando. -- verifica se o jogador digitou o parametro playerid if not playerid then --// Se tiver faltado o parâmetro de playerid, então: return outputChatBox("Faltar colocar o id do jogador") --// Retorna uma mensagem informando a ausência ao jogador. end if not valTimer then --// Se tiver faltado o parâmetro de tempo, então: return outputChatBox("Faltaram parâmetros") --// Retorna uma mensagem informando a ausência ao jogador. end --// Seu código setTimer(function() --// Seu código end, (tonumber(valTimer)) * 60000, 1) --// Tempo declarado pelo player, multiplicado por 60000; 1m = 60000ms; Usei tonumber pois provável que o valor declarado pelo player virá como string. end addCommandHandler("prender", prenderJogador)
  9. acredito que o certo de alguém que quer abrir um servidor é aprender ao menos um pouco sobre programação, para resolver possíveis bugs que o servidor poderá apresentar. imagino como deve ser o cara depender do forum pra arrumar algum bug urgente. Embora estejamos aqui pra ajudar, não temos obrigação de dar tudo pronto para você e sim auxiliá-lo como @Lord Henry fez passando todas as funções e eventos que você usar.
  10. pelo que entendi é só você usar por exemplo local quantidade = getElementData(p, "pescador.peixe") que ele irá te retorna o valor que tem na data "pescador.peixe"
  11. olha dependendo de como você quer eu possa te ajudar.
  12. acredito que você precise usar as seguintes funções e eventos: addCommandHandler setElementData getElementData getPlayerMoney um script base: function assaltar(player, commandName, targetPlayer) if (targetPlayer) then local target = getPlayerFromName(targetPlayer) if (target) then outputChatBox("[ASSALTO] Você está tentando assaltar o jogador "..targetPlayer, player, 0, 255, 0, true) outputChatBox("[ASSALTO] Jogador "..getPlayerName(player).." está tentando lhe assaltar. Digite /assalto [aceitar/recusar]", target, 0, 255, 0, true) setElementData(target, "assalto", player) else outputChatBox("[ASSALTO] Jogador "..targetPlayer.." não encontrado", player, 0, 255, 0, true) end else outputChatBox("[ASSALTO] Digite o nome do jogador. ' /assaltar [nome do jogador]'", player, 0, 255, 0, true) end end addCommandHandler("assaltar", assaltar) function assalto(player, commandName, commandAssalto) local assaltante = getElementData(player, "assalto") if not (assaltante) then return end if (commandAssalto == "aceitar") then local dinheiro = getPlayerMoney(player) outputChatBox("[ASSALTO] Você não reagiu ao assalto de "..getPlayerName(assaltante).." e entregou $"..tostring(dinheiro), player, 0, 255, 0, true) outputChatBox("[ASSALTO] "..getPlayerName(player).." não reagiu ao assalto e entregou $"..tostring(dinheiro), assaltante, 0, 255, 0, true) takePlayerMoney(player, dinheiro) givePlayerMoney(assaltante, dinheiro) setElementData(player, "assalto", nil) elseif (commandAssalto == "recusar") then outputChatBox("[ASSALTO] Você reagiu ao assalto de "..getPlayerName(assaltante), player, 0, 255, 0, true) outputChatBox("[ASSALTO] "..getPlayerName(player).." reagiu ao assalto", assaltante, 0, 255, 0, true) setElementData(player, "assalto", nil) end end addCommandHandler("assalto", assalto) fiz o script base para convidar o jogador pelo nome, mude para id caso tenha um sistema de id. Seria bom você adicionar o setTimer par quando alguém tentar assaltar, depois de um tempo se o jogador não aceitar ou recusar o roubo falhar ou algo assim. Como não entendi a parte de ver o dinheiro, deixo por sua conta.
  13. Att: foi feito melhorias no sistema de lobby e correções de erros e a play zone ja foi adicionada de tal forma onde a partida durará no maximo 10 minutos. 1 minuto depois do começo da parida a área de jogo vai começar a fechar(famoso gás) e vai levar 9 minutos até ficar com um tamanho bem pequeno para os últimos jogadores restante encerrarem a partida. futuros updates: implementação de um modo espectador, killmessages e melhorias no codes.
  14. Speak people, I come today to present to you a server that I am developing, it is not 100%, but it is already playable, I wanted your help to test the game mode. This is a mini royale, almost every aspect of a battle royale but in a much smaller map and quick game. Counting on other maps and not just one. Currently it has 2 maps, but in future several others. IP: mtasa: //192.99.58.254: 4003 Game mode features: account / login system: http://prntscr.com/l8iauz Menu to play, where you will still have several things like buying skins, statistics, rank. http://prntscr.com/l8ibed Lobby of play: http://prntscr.com/l8ibkk items scattered around the floor such as weapons, waistcoat, medical kit and bandages. Chat is only available in the menu and in the departure lobby. is activated during the game for testing purposes. http://prntscr.com/l8ibud http://prntscr.com/l8ibwv
  15. obrigado por remover aquele post. Então eu deixei as imagens em spoiler justamente pra não gerar spam, embora sejam poucas imagens. sobre a safe zone está nos planos implementar, mais para isso eu teria que achar a maneira correta para isso, acho que não seria como as safe do serer atuais, afinal os mapas geralmente são criado em um Z muito alto. pelo fato do mapa ser pequeno ainda fico na duvida sobre colocar o safe zone, mais por outro ajudaria muito para não estender muito a partida, pois penso que seria uma saco 2 restantes e um se escondendo para não morrer. Mais enfim obrigado pelas dicas e pelo comentário sobre o servidor, foi justamente por isso que anunciei aqui para sabe o que o pessoal gostou ou não para ir ajustando.
×
×
  • Create New...