Jump to content

#DaNiLiN

Members
  • Posts

    296
  • Joined

  • Last visited

  • Days Won

    3

Posts posted by #DaNiLiN

  1. Olá tentei fazer um sistema de relatório pra cada bau, mas usei apenas uma lista de grade. Até ai tudo bem só que esqueci do detalhe que é apenas uma lista de grade e quando eu vou em outro bau aparece os dados(addi item) do primeiro bau. Isso fez que eu me perdesse o que vocês recomenda que eu faça :\ 

  2. Ata, Utiliza a linha textPistol = guiGetText(EditPistola) dentro da if (tonumber(guiGetText(EditPistola))) then não esqueça de adicionar um local atrás da linha

    
    
    function purchaseWeapons(button, state, absoluteX, absoluteY, worldX, worldY, worldZ, clickedWorld)
    	if DirectX == true then
    		local playerMoney = getPlayerMoney(localPlayer)
    		if state == "down" then
    			if cursorPosition(screenW * 0.4609, screenH * 0.5500, screenW * 0.0117, screenH * 0.0417) then --//PISTOLA
    				if (tonumber(guiGetText(EditPistola))) then
    					local textPistol = guiGetText(EditPistola)
    					local weapon, ammo, price, weaponName = 22, tonumber(textPistol), 10000 + 150 * tonumber(textPistol), "Colt 45" -- Linha com erro
    					triggerServerEvent("DeltaSCR:Buy", localPlayer, weapon, ammo, price, weaponName)
    					DeltaAbrir()
    				else
    					outputChatBox("ERRO: #FFFFFFPor favor, preencha o campo com um número válido", 200, 50, 0, true)
    				end
    			elseif cursorPosition(screenW * 0.3438, screenH * 0.6667, screenW * 0.1172, screenH * 0.0417) then --//AK-47
    				weapon, ammo, price, weaponName = 20, 280, 18000, "AK-47"
    				triggerServerEvent("DeltaSCR:Buy", localPlayer, weapon, ammo, price, weaponName)
    				DeltaAbrir()
    			elseif cursorPosition(screenW * 0.3438, screenH * 0.6083, screenW * 0.1172, screenH * 0.0417) then --//SHOTGUN
    				weapon, ammo, price, weaponName = 25, 120, 25000, "Shotgun"
    				triggerServerEvent("DeltaSCR:Buy", localPlayer, weapon, ammo, price, weaponName)
    				DeltaAbrir()
    			end
    		end
    	end
    end
    addEventHandler ("onClientClick", root, purchaseWeapons)

     

    • Thanks 1
  3. 11 hours ago, Jonas^ said:

    Não entendo o motivo de usar cache false em arquivos server-side.

     

    Pelo motivo de eu usar ctrl + D. E Também não interfere em nada :\ 

     

    11 hours ago, Lord Henry said:

    @#DaNiLiN o script é seu. Então o suporte tbm.

    No entanto começo a desconfiar de que o problema não está no resource.

    O Erro não é no recurso ele funcionou em vários servidores sem nenhum problema creio eu que essa versão desse servidor está desatualizado

  4. Tente

    arvore1 = {}
    
    function coletar01(source)
    	if isElementWithinMarker(source, coletardroga1) then	
    		arvore1[source] = createObject ( 2332, x, y, z,  rx, ry, rz ) -- NÃO PODE TER "LOCAL ATRÁS DA LINHA POIS SE VOCÊ DESTRUIR EM OUTRAS FUNÇÕES VAI DAR ERRO
    		setElementVisibleTo(coletardroga1, source, false)
    		setPlayerWantedLevel(source, 6)
    		toggleAllControls (source, false)
    		setElementPosition(source,-1077.54639, -1637.18079, 76.36719)	
    		setPedAnimation(source,"bomber", "BOM_Plant_Loop", 30000, true, false, false, false)
    		outputChatBox("#00FA9A[maconha] #ffffffvoce esta coletando as folhas de maconha aguarde", source, 255, 255, 255, true)			
    		setTimer( function ()			                		        
    			triggerClientEvent(source, "doShowProgressBarf", source)	
    			triggerEvent(eventorestart, root)
    		end, 1000, 1)
    		
    		setTimer( function ()				
    			destroyElement(arvore1[source])
    			outputChatBox("#00FA9A[maconha] #ffffffVoce coletou a primeira remessa de folhas #00fa9a60/60 ", source, 255, 255, 255, true)
    			toggleAllControls (source, true)		
    		end, 30000, 1) 				
    	end
     end
     addCommandHandler("colher1",coletar01)

     

  5. Acho que entendi. Isso deve te servir

    
    function Dx ()
    	dxDrawButton(x*379, y*300, x*608, y*53, "SIM", tocolor(255, 0, 0, 220), tocolor(255, 255, 255, 255), "default-bold", 1, false, false)
    end
    
    --==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-
    
    function dxDrawButton(posX, posY, width, height, text, cursorColor, colorText, font, scale, colorCoded, postGUI)
        dxDrawRectangle(posX, posY, width, height, isCursorOnElement(posX, posY, width, height) and cursorColor or tocolor(0, 0, 0, 150), postGUI)
        dxDrawText(text, posX + posX, posY + posY -3, width, height, isCursorOnElement(posX, posY, width, height) and tocolor(255, 255, 255, 255) or colorText, scale, Font_4, "center", "center", false, false, postGUI, colorCoded, false)
    end
    
    --==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-

     

    • Thanks 1
  6. Que doideira. Eu até tinha anexado o veiculo diretamente no caminhão (Pra teste) e tinha dado certo. Minha ideia e fazer que o jogador leve o veiculo até o marker que está anexado no caminhão e assim o veiculo fique anexado. (Um Trabalho) tem alguma forma funcional que essa minha ideia possa funcionar ? :\ 

  7. Essa função grudaria o marker na cegonha e nesse marker o veiculo iria colidir no marker e grudar também, porém não funfa...

    function Attach_Cegonha (source)
    	local Vehicle_Player = getPedOccupiedVehicle (source)
    	if (Vehicle_Player) then
    		if getElementModel(Vehicle_Player) == 443 then
    			if getElementData(Vehicle_Player, "Reboque_Ativo") == false then
    				if isElement (Vehicle_1) then destroyElement (Vehicle_1) end
    				local PosC_X, PosC_Y, PosC_Z = getElementPosition(Vehicle_Player)	
    				
    				Vehicle_1 = createMarker ( PosC_X, PosC_Y, PosC_Z, "corona", 2, 0, 255, 0, 50 )				
    				attachElements (Vehicle_1, Vehicle_Player, 0, 0 +1, 0 +2.2)
    				triggerClientEvent(source, "addNotification", root, "#00ff00✘#ffffffINFO#00ff00✘➺ #ffffffAdicione os veiculos desejados nos marcadores")	
    			else	
    				setElementFrozen(Vehicle_Player, false)
    				setElementData(Vehicle_Player, "Reboque_Ativo", false)
    				triggerClientEvent(source, "addNotification", root, "#00ff00✘#ffffffINFO#00ff00✘➺ #ffffffSua cegonha foi liberada para seguir viagem")	
    			end
    		else
    			triggerClientEvent(source, "addNotification", root, "#00ff00✘#ffffffINFO#00ff00✘➺ #ffffffEsse veiculo não é uma cegonha")	
    		end
    	end
    end
    addCommandHandler("reboque", Attach_Cegonha)
    
    local veh = createVehicle(411, 2075.83521, 1213.02148, 10.67188 +5)
    				
    function Vehicle_Cegonha (vehicle)
        if getElementType ( vehicle ) == "vehicle" then
    		if getElementModel(vehicle) == 443 then return end
    		if isElementWithinMarker(vehicle, Vehicle_1) then
    			triggerClientEvent(root, "addNotification", root, "#00ff00✘#ffffffINFO#00ff00✘➺ #ffffffGRUDOU")	
    			attachElements (veh, Vehicle_1, 0, 0, 0 +2.2)
    		else
    			triggerClientEvent(root, "addNotification", root, "#00ff00✘#ffffffINFO#00ff00✘➺ #ffffff1")	
    		end
    	else
    		triggerClientEvent(root, "addNotification", root, "#00ff00✘#ffffffINFO#00ff00✘➺ #ffffff2")	
    	end
    end
    addEventHandler("onMarkerHit", root, Vehicle_Cegonha)

     

  8. Então amigo, tu deve mexer na largura/altura do dxDrawRetangle. Dai Explicação pra tu entender melhor.
     

    • startX: Posição (X) 
    • startY: Posição (Y) 
    • width: largura do retângulo
    • height: altura do retângulo
      
      	dxDrawRectangle ( startX, startY, width, height, tocolor ( 0, 0, 0, 150 ) ) -- Create our black transparent MOTD background Rectangle.

      BOA SORTE

  9. Seria isso?

    
    function DNL_Hud()
            dxDrawRectangle(x*835, y*50, x*521, y*34, tocolor(32, 32, 33), false)
            dxDrawRectangle(x*835, y*50, x*521, y*4, tocolor(150, 16, 148), false)        
            dxDrawLine(x*835, y*74, x*1356, y*74, tocolor(0, 0, 0), x*2, false)
            dxDrawLine(x*998, y*73, x*998, y*40, tocolor(0, 0, 0), x*1, false)
            dxDrawLine(x*1170, y*74, x*1170, y*41, tocolor(0, 0, 0), x*1, false)
    end
    addEventHandler("onClientRender", root, DNL_Hud)

     

×
×
  • Create New...