Jump to content

tenho um emprego e quero adicionar a minha agencia


Recommended Posts

o problema é o seguinte tenho um emprego de entregador de remedios e quero coloca-lo na minha agencia, mas ele não precisa de level pra poder pegar, então eu  queria adicionar na agencia pra precisar de level para trabalhar, aqui está meu script:

 

------------------------------------------------
------        Trabalho entregador           ------
------            By:Pedro R.                    ------
------------------------------------------------    


----------------Variaveis Editavel---------


local valor_do_pagamento = 2500
local valordopagamentochat = 2500


--------------------marker principal------
    local mrk = createMarker (2101.152, -1359.516, 23.000, "cylinder", 2, 34, 158, 165, 254)
    local blipmrk = createBlip(2101.152, -1359.516, 23.000, 42) 
    
    
    -------------Marker das entrega-----------------
    local mrkc1 = createMarker (2230.379, -1395.32, 23.000, "cylinder", 3, 255, 0, 0, 255)
    local blipc1 = createBlip(2230.379, -1395.32, 24, 0) 
    local mrkc2 = createMarker (2196.394, -1280.56, 23.800, "cylinder", 3, 255, 0, 0, 255)
    local blipc2 = createBlip(2196.394, -1280.56, 23.800, 0) 
    local mrkc3 = createMarker (1909.78, -1602.051, 12.400, "cylinder", 3, 255, 0, 0, 255)
    local blipc3 = createBlip(1909.78, -1602.051, 12.400, 0) 
    local mrkc4 = createMarker (1321.16, -1634.648, 12.700, "cylinder", 3, 255, 0, 0, 255)
    local blipc4 = createBlip(1321.16, -1634.648, 12.700, 0) 
    local mrkc5 = createMarker (2012.88, -1126.502, 24.163, "cylinder", 3, 255, 0, 0, 255)
    local blipc5 = createBlip(2012.88, -1126.502, 24.163, 0) 
    
    ---------Marker do Pagamento------
    
    local blipr = createBlip(2095.229, -1367.882, 23.984, 0) 
    local mrkr = createMarker (2095.229, -1367.882, 23.000, "cylinder", 3, 255, 0, 0, 255)
    
    -----------------Config visibilidade---------
  setElementVisibleTo(mrkc1, root, false) 
  setElementVisibleTo(mrk, root, true) 
  setElementVisibleTo(blipc1, root, false)
    setElementVisibleTo(mrkc2, root, false) 
    setElementVisibleTo(blipc2, root, false)
    setElementVisibleTo(mrkc3, root, false) 
    setElementVisibleTo(blipc3, root, false)
    setElementVisibleTo(mrkc4, root, false) 
    setElementVisibleTo(blipc4, root, false)
    setElementVisibleTo(mrkc5, root, false) 
    setElementVisibleTo(blipc5, root, false)
        setElementVisibleTo(mrkr, root, false) 
    setElementVisibleTo(blipr, root, false)
    
    -------------Codigos--------
    
    veh = {} 
    
function msg ( thePlayer )


outputChatBox("#ff0000Digite Você precisa estar encaminhado da agencia de empregos!", thePlayer, 255,255,255, true)


end
addEventHandler("onMarkerHit", mrk, msg)


    function commandMarker(Jogador)    --- comando que deve copiar pra ter mais latinha no mapa
       if isElementWithinMarker(Jogador, mrk) then 
          setElementData(Jogador, "trab", true) 
          outputChatBox ( "  ", thePlayer, 255, 255, 255, true )
          outputChatBox ( "  ", thePlayer, 255, 255, 255, true )
          outputChatBox ( "Agora Você Trabalha De Entregador de remédios. Vá até a casa dos clientes e entregue os remedios (siga a marcação do mapa!)", thePlayer, 255, 255, 255, true )
          outputChatBox ( " Em seguida volte para receber seu pagamento! ", thePlayer, 255, 255, 255, true )
          outputChatBox ( "  ", thePlayer, 255, 255, 255, true )
          outputChatBox ( "  ", thePlayer, 255, 255, 255, true )
           setElementData(Jogador, "trab", true) 
           veh[Jogador] = createVehicle ( 581, 2087.891, -1335.484, 23.9 + 2 )
            warpPedIntoVehicle(Jogador, veh[Jogador]) 
          setElementVisibleTo(mrkc1, Jogador, true)
            setElementVisibleTo(blipc1, Jogador, true)
            setElementVisibleTo(mrk, Jogador, false)
            setElementVisibleTo(blipmrk, Jogador, false)
            


       end 
    end 
    addCommandHandler("trab", commandMarker)


    function cobranca1 (Jogador)
    
         if veh[Jogador] and isElement(veh[Jogador]) then  
         
         setTimer ( function()
         
         outputChatBox ( "#0000FFVocê Entregou Uma encomenda! [1/5]", thePlayer, 255, 255, 255, true )
    outputChatBox ( "    #ff0000Siga Para o Proximo Cliente    ", thePlayer, 255, 255, 255, true )
              setElementVisibleTo(mrkc1, Jogador, false)
            setElementVisibleTo(blipc1, Jogador, false)
            destroyElement(mrkc1) 
                        setElementVisibleTo(blipc2, Jogador, true)
                        setElementVisibleTo(mrkc2, Jogador, true)
     

end, 4000, 1 )


                        outputChatBox ( "#FFFFFFAguarde enquanto você entrega os #FF0000Remédios..", thePlayer, 255, 255, 255, true )
                        
    end             
    end
    addEventHandler ("onMarkerHit", mrkc1, cobranca1, delayedChat)
    
    
        function cobranca2 (Jogador)
        

         if veh[Jogador] and isElement(veh[Jogador]) then  
         
         setTimer ( function()
         
         outputChatBox ( "#0000FFVocê Entregou Uma encomenda! [2/5]", thePlayer, 255, 255, 255, true )
    outputChatBox ( "    #ff0000Siga Para o Proximo Cliente    ", thePlayer, 255, 255, 255, true )
              setElementVisibleTo(mrkc2, Jogador, false)
            setElementVisibleTo(blipc2, Jogador, false)
            destroyElement(mrkc2) 
                        setElementVisibleTo(blipc3, Jogador, true)
                        setElementVisibleTo(mrkc3, Jogador, true)
     

end, 4000, 1 )


                        outputChatBox ( "#FFFFFFAguarde enquanto você entrega os #FF0000Remédios..", thePlayer, 255, 255, 255, true )
                        
    end             
    end
    addEventHandler ("onMarkerHit", mrkc2, cobranca2)
    
    
    
    function cobranca3 (Jogador)
    
    
    
         if veh[Jogador] and isElement(veh[Jogador]) then  
         
         setTimer ( function()
         
         outputChatBox ( "#0000FFVocê Entregou Uma encomenda! [3/5]", thePlayer, 255, 255, 255, true )
    outputChatBox ( "    #ff0000Siga Para o Proximo Cliente    ", thePlayer, 255, 255, 255, true )
              setElementVisibleTo(mrkc3, Jogador, false)
            setElementVisibleTo(blipc3, Jogador, false)
            destroyElement(mrkc3) 
                        setElementVisibleTo(blipc4, Jogador, true)
                        setElementVisibleTo(mrkc4, Jogador, true)
     

end, 4000, 1 )


                        outputChatBox ( "#FFFFFFAguarde enquanto você entrega os #FF0000Remédios..", thePlayer, 255, 255, 255, true )
                        
    end             
    end
    addEventHandler ("onMarkerHit", mrkc3, cobranca3)
    
    
    
    
    
    
    
        function cobranca4 (Jogador)
    
    
    
         if veh[Jogador] and isElement(veh[Jogador]) then  
         
         setTimer ( function()
         
         outputChatBox ( "#0000FFVocê Entregou Uma encomenda! [4/5]", thePlayer, 255, 255, 255, true )
    outputChatBox ( "    #ff0000Siga Para o Proximo Cliente    ", thePlayer, 255, 255, 255, true )
              setElementVisibleTo(mrkc4, Jogador, false)
            setElementVisibleTo(blipc4, Jogador, false)
            destroyElement(mrkc4) 
                        setElementVisibleTo(blipc5, Jogador, true)
                        setElementVisibleTo(mrkc5, Jogador, true)
     

end, 4000, 1 )


                        outputChatBox ( "#FFFFFFAguarde enquanto você entrega os #FF0000Remédios..", thePlayer, 255, 255, 255, true )
                        
    end             
    end
    addEventHandler ("onMarkerHit", mrkc4, cobranca4)
    
    
    
    
    
    
    
    
    function cobranca5 (Jogador)
    
    
    
         if veh[Jogador] and isElement(veh[Jogador]) then  
         
         setTimer ( function()
         
         outputChatBox ( "#0000FFVocê Entregou a ultima encomenda! [5/5]", thePlayer, 255, 255, 255, true )
    outputChatBox ( "    #ff0000Volte para loja para receber seu pagamento!    ", thePlayer, 255, 255, 255, true )
              setElementVisibleTo(mrkc5, Jogador, false)
            setElementVisibleTo(blipc5, Jogador, false)
            destroyElement(mrkc5) 
                        setElementVisibleTo(blipr, Jogador, true)
                        setElementVisibleTo(mrkr, Jogador, true)
     

end, 4000, 1 )


                        outputChatBox ( "#FFFFFFAguarde enquanto você entrega os #FF0000Remédios..", thePlayer, 255, 255, 255, true )
                        
    end             
    end
    addEventHandler ("onMarkerHit", mrkc5, cobranca5)
    
    
    
    
    
    
    
    
    ------------------ PAGAMENTOS!!------------------------
    
    
        function pagamento (Jogador)
    
    if(isElement(Jogador)) and (getElementType(Jogador) == "player") then 
      if getElementData(Jogador, "trab") then 
         if veh[Jogador] and isElement(veh[Jogador]) then 
            destroyElement (veh[Jogador]) 
    outputChatBox ( "   #ff0000Parabéns, Você acaba de receber seu pagamento! ["..valordopagamentochat.."$]   ", thePlayer, 255, 255, 255, true )
              setElementVisibleTo(mrkr, Jogador, false)
              setElementVisibleTo(blipr, Jogador, false)
              

            
    givePlayerMoney ( Jogador, valor_do_pagamento)
    setTimer(function() restartResource(getThisResource()) end, 100, 1)
    end
    end
    end
    end
    addEventHandler ("onMarkerHit", mrkr, pagamento)
    
    
 

Link to comment
  • Administrators

Hello and welcome to the forums :)

The thread has been moved to the Portuguese forum. For any further posting in this language please use these forums.

It's advised that you add the code to the forum <> code function found in the Edit toolbar, as such

    givePlayerMoney ( Jogador, valor_do_pagamento)
    setTimer(function() restartResource(getThisResource()) end, 100, 1)

 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...