Jump to content

MesaDowN

Members
  • Posts

    111
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by MesaDowN

  1. dxDrawRectangle, onClientRender, bindKey(eu prefiro armazenar a bind no client), triggerServerEvent(Chamar o evento no lado client) , (addEvent e addEventHandler (adicionar um evento para ser "triggado" no client side)).
  2. Basta você ir no arquivo meta.xml e colocar: <download_priority_group>1</download_priority_group>
  3. Meu deus, ele tá falando que não está achando o script: tenorio_info, po cara...
  4. if Selecionado == "Agua" then if Agua_01 > 0 then local Sede_Atual = getElementData ( localPlayer, "AirNewSCR_Sede" ) or 0 if Sede_Atual == 100 then exports.tenorio_info:showBoxS(localPlayer, " Você não está com Sede!", "error") else setElementData ( localPlayer, "AirNewSCR_Sede", Sede_Atual + 15 ) setElementData ( localPlayer, "AirNewSCR_Inventario_Agua", Agua_01 - 1 ) end else exports.tenorio_info:showBoxS(localPlayer, " Você não Possui Agua no Inventario!", "error") end Tente assim
  5. onVehicleEnter e onVehicleExit são eventos, logo têm de usar um handler do evento (addEventHandler)
  6. Você pode usar a verificação com um timer do isTransferBoxActive, e caso não esteja mais fazendo o download, então...
  7. Ou então usa o getElementModel e faça você mesmo que é a melhor opção. getElementModel
  8. Um servidor organizado e brasileiro, sobre RP de economia Americana. Nosso servidor foi criado com o intuito de divertir e agradar a todos, temos tudo que um bom RP precisa para funcionar. Temos sistemas simples de entender, e fáceis de usar. Você precisa apenas criar o seu personagem para começar a jogar. Não é dificil, é divertido! . Caso não entenda algo, é só falar com algum Fundador . Em breve teremos sistemas únicos, bots únicos e um site. O San Andreas RP tem como finalidade o entretenimento sem fins lucrativos, com a encenação do mundo real e não há nenhuma ligação com os órgãos públicos e marcas aqui citados. Caso esteja interessado e queira jogar em nosso servidor, leia os termos de uso . Caso concorde com os termos, basta ler as regras do servidor para evitar problemas. Boa diversão ! San Andreas RP 2020 - Todos os Direitos Reservados. Discord >> discord.gg/Wj4gTtn
  9. Deu permissão admin para o painel? kkk
  10. Poste a database... Você quer que nós adivinhemos códigos?
  11. Apenas uma duvida developer, o que significa o comando state? Serve para verificar que o click está sendo executado?
  12. addEventHandler('onVehicleExplode', root, setTimer(function () destroyElement(source) end, 2000, 1) )
  13. Bom dia, vim aqui esclarecer uma coisa. Estou fazendo o emprego de carregador, e o mesmo precisa de 5 caixas entregues para puder pegar o camião e sair. 1º- Quero que ao chegar no marker "Marker_Entregar[source]" , ele adicione +1 elementData. 2º Quero que quando o veículo saia dali, ele faça uma vericação se não tem nada naquele local e spawne outro veículo na mesma posição. veh_pc = {} local markercarregar = createMarker(2795.09546, -2425.29395, 13.63188-1.1, "cylinder", 2, 30,144,255) ocupado = { -- x, y, z, ocupado [1] = {2787.782, -2424.239, 13.634, 0, 0, 180, false, 2787.803, -2420.378, 13.634}, -- Esta coordenada está no seu script. [2] = {2788.123, -2410.558, 13.634, 0, 0, 0, false, 2788.146, -2414.291, 13.634}, -- Esta coordenada eu inventei. [3] = {2750, -2431.782, 13.643, 0, 0, 270, false, 2746.177, -2431.841, 13.643}, [4] = {2750, -2441.882, 13.643, 0, 0, 270, false, 2746.153, -2441.895, 13.643}, [5] = {2750, -2448.111, 13.643, 0, 0, 270, false, 2746.181, -2448.31, 13.648}, } function showMarker() local Emprego = getElementData(source, "Emprego") if Emprego == "Carregador" then for i, vaga in ipairs (ocupado) do local x, y, z, r, g, b, status, a, c, d = unpack(vaga) marcacao = createMarker( a, c, 12, "cylinder", 1.5, 30,144,255, 180 ) attachElements ( marcacao, veh_pc[source], 0, -4, -1 ) outputDebugString("02") end end end addEvent( "ShowMarkers", true) addEventHandler( "ShowMarkers", getRootElement(), showMarker) function createVeh(thePlayer) local Emprego = getElementData(source, "Emprego") for i, vaga in ipairs (ocupado) do local x, y, z, r, g, b, status, a, c, d = unpack(vaga) veh_pc[source] = createVehicle ( 414, x, y, z, r, g, b) setVehicleLocked( veh_pc[source], true) outputDebugString("01") end end addEventHandler( "onResourceStart", getRootElement(), createVeh ) function tempo(thePlayer) if getElementData(thePlayer, "veiculoalreadyspawnado") == true then setTimer(function() setElementData(source, "veiculoalreadyspawnado", false) end, 3000, 1) end end function setartempo(source) setElementData(source, "veiculoalreadyspawnado", false) end addCommandHandler("fodasse", setartempo) -------------------------------------------- --JOB-- Object_Caixa = {} Marker_Entregar = {} Blip_Entregar = {} local Blip_Emprego = createBlipAttachedTo( markercarregar, 16 ) setBlipVisibleDistance(markercarregar, 150) function Mesa_Caixa (source) local Emprego = getElementData ( source, "Emprego" ) local Px, Py, Pz = getElementPosition( markercarregar ) local Caixa = getElementData( source, "Caixa" ) if isElementWithinMarker(source, markercarregar) then if Caixa == false then if Emprego == "Carregador" then setPedAnimation( source, "CARRY", "liftup", 1.0, false ) setTimer(function() if isElement( Object_Caixa[source] ) then destroyElement( Object_Caixa[source] ) end if isElement( Marker_Entregar[source] ) then destroyElement( Marker_Entregar[source] ) end if isElement( Blip_Entregar[source] ) then destroyElement( Blip_Entregar[source] ) end setElementData(source, "Recompensa", 0) setPedAnimation( source, nil ) setElementData( source, "Caixa", true ) toggleControl( source, "jump", false ) toggleControl( source, "fire", false ) toggleControl(source, "aim_weapon", false) setPedAnimation( source, "CARRY", "crry_prtial", 4.1, true, true, true ) Object_Caixa[source] = createObject( 1271, Px, Py, Pz ) Marker_Entregar[source] = createMarker (2787.84521, -2420.40527, 13.63365-1.1, "cylinder", 2.5, 16, 111, 231, 50) Blip_Entregar[source] = createBlipAttachedTo( Marker_Entregar[source], 0 ) setElementVisibleTo ( Marker_Entregar[source], root, false ) setElementVisibleTo ( Blip_Entregar[source], root, false ) setElementVisibleTo ( Marker_Entregar[source], source, true ) setElementVisibleTo ( Blip_Entregar[source], source, true ) exports.bone_attach:attachElementToBone(Object_Caixa[source], source, 4, 0, 0.4, - 0.6, -90, 0, 0 ) end, 1000, 1) end end end end addCommandHandler("caixa", Mesa_Caixa) function Fim_Emprego (source) local Caixa = getElementData( source, "Caixa" ) local pay = math.random(100,200) local Recompensa = math.random(1, 35) if not isPedInVehicle ( source ) then if isElementWithinMarker(source, Marker_Entregar[source]) then if Caixa == true then setPedAnimation( source, "CARRY", "putdwn", 1.0, false, false, false, true ) setTimer(function() if isElement( Object_Caixa[source] ) then destroyElement( Object_Caixa[source] ) end if isElement( Marker_Entregar[source] ) then destroyElement( Marker_Entregar[source] ) end if isElement( Blip_Entregar[source] ) then destroyElement( Blip_Entregar[source] ) end setElementData( source, "Caixa", false ) toggleControl( source, "jump", true ) toggleControl( source, "fire", true ) toggleControl(source, "aim_weapon", true) setPedAnimation( source, "CARRY", "liftup", 0.0, false, false, false, false) setElementData(source,"char:money", getElementData(source,"char:money") + pay) setElementData(source,"Entregues", tonumber(getElementData(source,"Entregues") + 1)) exports.Scripts_Dxmessages:outputDx ( source, "Você entregou a caixa e ganhou: "..getElementData(source, "Recompensa").."$", "success" ) end, 1200, 1) end end end end addCommandHandler( "entregar", Fim_Emprego) fds = createMarker (2796.03687, -2420.05981, 13.63165-1.1, "cylinder", 2.5, 16, 111, 231, 50) function setardata(source) if getElementData( source, "Caixa" ) == true then setElementData( source, "Caixa", false ) end end addCommandHandler("a", setardata) function aaaa(source) cona = tonumber(getElementData(source, "Entregues")) if cona >= 1 then outputDebugString(""..cona.."") end end addEventHandler( "onMarkerHit", fds, aaaa ) addEventHandler( "onPlayerQuit", root, function() if isElement( Object_Caixa[source] ) then destroyElement( Object_Caixa[source] ) end if isElement( Marker_Entregar[source] ) then destroyElement( Marker_Entregar[source] ) end if isElement( Blip_Entregar[source] ) then destroyElement( Blip_Entregar[source] ) end end) addEventHandler( "onPlayerWasted", root, function() if isElement( Object_Caixa[source] ) then destroyElement( Object_Caixa[source] ) end if isElement( Marker_Entregar[source] ) then destroyElement( Marker_Entregar[source] ) end if isElement( Blip_Entregar[source] ) then destroyElement( Blip_Entregar[source] ) end setElementData( source, "Caixa", false ) toggleControl( source, "jump", true ) toggleControl( source, "fire", true ) toggleControl(source, "aim_weapon", true) end)
  14. Na parte servidor, na linha 23, o server está recebendo um booleano. (Danilin_S.luac), que é compilado.
  15. <meta> <info author="Amanda" type="animation" name="choro" description="Script de chorar" /> <script src="script.Lua" type="server"/> </meta> function toggleSit(thePlayer) if not getElementData(thePlayer, "sitting") then setPedAnimation(thePlayer, "ped", "seat_down", -1, false, false, false, false) setElementData(thePlayer, "sitting", true) else -- If you use again this command then your character stand up setPedAnimation(thePlayer) removeElementData(thePlayer, "sitting") end end addCommandHandler("sit", toggleSit) Tenta ai agora...
  16. Use a Função de code na proxima que for postar seu código "<>", e poste ele por completo. function pegarm4(player) if isElementWithinMarker(player, markerWeapon) then guiEdit() if getPlayerMoney(player) >= 12000 then takePlayerMoney(player, 12000) --Remover Dinheiro giveWeapon(player, 31, 300, true) --Pegar Arma outputChatBox("#ffffffVocê comprou uma M4 com 300 munições.", player, 255,255,255,true) else outputChatBox("#ff0000Você não tem dinheiro suficiente para comprar.", player, 255,255,255,true) end end end addCommandHandler("m4", pegarm4) function guiEdit() GUIEditor.window[1] = guiCreateWindow(0.32, 0.26, 0.41, 0.46, "LOJA DE ARMAS", true) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.button[1] = guiCreateButton(0.37, 0.12, 0.22, 0.11, "M4 = 12000R$", true, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FF25FC02") GUIEditor.button[2] = guiCreateButton(0.38, 0.26, 0.21, 0.11, "Deagle = 7000R$", true, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FF25FC02") GUIEditor.button[3] = guiCreateButton(0.38, 0.40, 0.20, 0.10, "Ak-47 = 15000R$", true, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FF25FC02") GUIEditor.button[4] = guiCreateButton(0.38, 0.53, 0.20, 0.10, "MP5 = 30000", true, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[4], "NormalTextColour", "FF25FC02") end É isso?
  17. Ué, ajusta a posição do texto no 2º e 3º parametro..
×
×
  • Create New...