Jump to content

Me Ajudem Nesse Script De Agencia De Emprego


Recommended Posts

Ola Eu Peguei Um Script De Agencia De Emprego Na Internet E Editei Teleport Ta Tudo Pegando Certinho Mas Os Empregos Nao Muda O Nome To Fazendo Uma Agencia De Emprego Ilegal Mas Nao Muda O Nome Para Os Empregos Que Eu Quero:

 

meta.xml: 

<meta>
    <script src="AirNew_c.lua" type="client" cache="false" />
    <script src="AirNew_s.lua" type="server" cache="false" />
</meta>

AirNew_s.lua:

local AgenciaDeEmpregos = createMarker ( 2808.819, -1168.129, 1025.57 -1, "cylinder", 1.2, 20, 70, 230, 95 )
setElementInterior ( AgenciaDeEmpregos, 8 )
setElementDimension ( AgenciaDeEmpregos, 0 )

local Entrada = createMarker ( 2542.632, -931.619, 84.685 -1, "cylinder", 1.2, 20, 70, 230, 95 )
local EntradaBlip = createBlipAttachedTo ( Entrada, 8 )
setBlipVisibleDistance ( EntradaBlip, 8 )

local Saida = createMarker ( 2807.625, -1174.392, 1025.57 -1, "cylinder", 1.2, 20, 70, 230, 95 )
setElementInterior ( Saida, 8 )
setElementDimension ( Saida, 0 )

--

local TraficanteDeArma = createBlip( 2449.998, -1970.724, 14.689, 0 )
setElementVisibleTo ( EntregadorDeJornal, root, false )
local TraficanteDeArmaMarker = createMarker ( 2443.95, -1973.236, 13.547 -1, "cylinder", 1.2, 20, 70, 230, 0 )

--

function emarker(marker,md)
    if (md) then
        if marker == Entrada then         
         setTimer ( setElementInterior, 400, 1, source, 8 )
         setTimer ( setElementDimension, 400, 1, source, 0 )
         setTimer ( setElementPosition, 400, 1, source, 2807.613, -1171.832, 1025.57 )
         setTimer ( setElementRotation, 900, 1, source, 0, 0, 90 )
         fadeCamera ( source, false, 0.1, 0, 0, 0 )   
         setTimer ( fadeCamera, 900, 1, source , true, 0.5 )
         setTimer ( setCameraTarget, 900, 1, source )
        end
        if marker == Saida then
         setTimer ( setElementInterior, 400, 1, source, 0 )
         setTimer ( setElementDimension, 400, 1, source, 0 )
         setTimer ( setElementPosition, 400, 1, source, 2544.26, -932.98, 83.671 )
         setTimer ( setElementRotation, 900, 1, source, 0, 0, 0 )
         fadeCamera ( source, false, 0.1, 0, 0, 0 )   
         setTimer ( fadeCamera, 900, 1, source , true, 0.5 )
         setTimer ( setCameraTarget, 900, 1, source )
        end
        if marker == AgenciaDeEmpregos then
         if isPedInVehicle ( source ) then return end
          triggerClientEvent ( source, "AirNew>AbrirAgencia", root)
        end
        if marker == TraficanteDeArmaMarker then
         TudoInvisivel ()
        end
    end
end
addEventHandler("onPlayerMarkerHit",getRootElement(),emarker)

function lmarker(marker,md)
    if (md) then
        if marker == AgenciaDeEmpregos then
         triggerClientEvent ( source, "AirNew>FecharAgencia", root)
        end
    end
end
addEventHandler("onPlayerMarkerLeave",getRootElement(),lmarker)--]]

function TudoInvisivel ()
setElementVisibleTo ( TraficanteDeArma, source, false )
end

function TraficanteDeArmaAirNew ()
local Level = getElementData ( source, "Level" ) or 0
if Level >= 0 then
TudoInvisivel ()
setElementVisibleTo ( TraficanteDeArma, source, true )
setElementData ( source, "AirNew>Encaminhamento", "TraficanteDeArma" )
outputChatBox ( "Você foi aceito no Trafico De Arma", source, 255, 255, 255, true )
outputChatBox ( "Para Iniciar os Serviços siga o Checkpoint Vermelho em seu Radar", source, 255, 255, 255, true )
setElementData ( source, "Emprego", false )
end
end

AirNew_c.lua:

local screenW,screenH = guiGetScreenSize()
local resW, resH = 1366,768
local x, y = (screenW/resW), (screenH/resH)

----------------------------------------------------------------------------------------------------------------------------------------

AgenciaEmpregosAirNew = false

----------------------------------------------------------------------------------------------------------------------------------------

function PainelAgenciaEmpregosIlegaisNew ()
        
        dxDrawLine(x*376 - 1, y*214 - 1, x*376 - 1, y*554, tocolor(0, 0, 0, 255), x*1, false)
        dxDrawLine(x*990, y*214 - 1, x*376 - 1, y*214 - 1, tocolor(0, 0, 0, 255), x*1, false)
        dxDrawLine(x*376 - 1, y*554, x*990, y*554, tocolor(0, 0, 0, 255), x*1, false)
        dxDrawLine(x*990, y*554, x*990, y*214 - 1, tocolor(0, 0, 0, 255), x*1, false)
        dxDrawRectangle((screenW - x*614) / 2, (screenH - y*340) / 2, x*614, y*340, tocolor(0, 0, 0, 150), false)
        dxDrawRectangle(x*376, y*214, x*614, y*22, tocolor(173, 242, 24, 120), false)
        dxDrawLine(x*376, y*236, x*990, y*236, tocolor(0, 0, 0, 255), x*1, false)
        dxDrawText("Agencia de Empregos", x*376 + 1, y*214 + 1, x*990 + 1, y*236 + 1, tocolor(0, 0, 0, 255), x*1.00, "default-bold", "center", "center", false, false, false, false, false)
        dxDrawText("Agencia de Empregos", x*376, y*214, x*990, y*236, tocolor(255, 255, 255, 255), x*1.00, "default-bold", "center", "center", false, false, false, false, false)
        
        mR, mG, mB, mA = 70, 245, 70, 100
        
        if not cursorPosition( x*412, y*270, x*543, y*29 ) then
        dxDrawRectangle(x*412, y*270, x*543, y*29, tocolor(190, 190, 190, 100), false)
        else
        dxDrawRectangle(x*412, y*270, x*543, y*29, tocolor(mR, mG, mB, mA), false)
        end
        
        if not cursorPosition( x*412, y*304, x*543, y*29 ) then
        dxDrawRectangle(x*412, y*304, x*543, y*29, tocolor(190, 190, 190, 100), false)
        else
        dxDrawRectangle(x*412, y*304, x*543, y*29, tocolor(mR, mG, mB, mA), false)
        end
        
        if not cursorPosition( x*412, y*338, x*543, y*29 ) then
        dxDrawRectangle(x*412, y*338, x*543, y*29, tocolor(190, 190, 190, 100), false)
        else
        dxDrawRectangle(x*412, y*338, x*543, y*29, tocolor(mR, mG, mB, mA), false)
        end
        
        if not cursorPosition( x*412, y*372, x*543, y*29 ) then
        dxDrawRectangle(x*412, y*372, x*543, y*29, tocolor(190, 190, 190, 100), false)
        else
        dxDrawRectangle(x*412, y*372, x*543, y*29, tocolor(mR, mG, mB, mA), false)
        end
        
        if not cursorPosition( x*412, y*406, x*543, y*29 ) then
        dxDrawRectangle(x*412, y*406, x*543, y*29, tocolor(190, 190, 190, 100), false)
        else
        dxDrawRectangle(x*412, y*406, x*543, y*29, tocolor(mR, mG, mB, mA), false)
        end
        
        if not cursorPosition( x*412, y*440, x*543, y*29 ) then
        dxDrawRectangle(x*412, y*440, x*543, y*29, tocolor(190, 190, 190, 100), false)
        else
        dxDrawRectangle(x*412, y*440, x*543, y*29, tocolor(mR, mG, mB, mA), false)
        end
        
        if not cursorPosition( x*412, y*474, x*543, y*29 ) then
        dxDrawRectangle(x*412, y*474, x*543, y*29, tocolor(190, 190, 190, 100), false)
        else
        dxDrawRectangle(x*412, y*474, x*543, y*29, tocolor(mR, mG, mB, mA), false)
        end
        
        dxDrawText("TraficanteDeArma", x*412, y*270, x*684, y*299, tocolor(255, 255, 255, 255), x*1.00, "default", "center", "center", false, false, false, false, false)
        dxDrawText("Level : 00", x*683, y*270, x*955, y*299, tocolor(255, 255, 255, 255), x*1.00, "default", "center", "center", false, false, false, false, false)
        
end

----------------------------------------------------------------------------------------------------------------------------------------

function AbrirAgenciaEmpregosIlegal ()
if AgenciaEmpregosIlegalAirNew == false then
addEventHandler ( "onClientRender", root, PainelAgenciaEmpregosNew )
showCursor ( true )
AgenciaEmpregosIlegalAirNew = true
end
end
addEvent ( "AirNew>AbrirAgencia", true)
addEventHandler ( "AirNew>AbrirAgencia", root, AbrirAgenciaEmpregos )

function FecharAgenciaEmpregos ()
if AgenciaEmpregosIlegalAirNew == true then
removeEventHandler ( "onClientRender", root, PainelAgenciaEmpregosNew )
showCursor ( false )
AgenciaEmpregosIlegalAirNew = false
playSoundFrontEnd ( 40 )
end
end
addEvent ( "AirNew>FecharAgencia", true)
addEventHandler ( "AirNew>FecharAgencia", root, FecharAgenciaEmpregos )

----------------------------------------------------------------------------------------------------------------------------------------

function ObjetosDaLoja (_,state)

if AgenciaEmpregosAirNew == true then
if state == "down" then

if isCursorOnElement ( x*969, y*214, x*21, y*22 ) then
removeEventHandler ( "onClientRender", root, PainelAgenciaEmpregosNew )
showCursor ( false )
AgenciaEmpregosAirNew = false


elseif isCursorOnElement ( x*412, y*270, x*543, y*29 ) then -- Entregador de Jornal
triggerServerEvent ( "Encaminhar>TraficanteDeArma", localPlayer )
FecharAgenciaEmpregos ()

end
end

end
addEventHandler ( "onClientClick", root, ObjetosDaLoja )

----------------------------------------------------------------------------------------------------------------------------------------

function cursorPosition(x, y, width, height)
    if (not isCursorShowing()) then
        return false
    end
    local sx, sy = guiGetScreenSize()
    local cx, cy = getCursorPosition()
    local cx, cy = (cx*sx), (cy*sy)
    if (cx >= x and cx <= x + width) and (cy >= y and cy <= y + height) then
        return true
    else
        return false
    end
end

----------------------------------------------------------------------------------------------------------------------------------------

function isCursorOnElement( x,y,w,h )
local mx,my = getCursorPosition ()
local fullx,fully = guiGetScreenSize()
cursorx,cursory = mx*fullx,my*fully
if cursorx > x and cursorx < x + w and cursory > y and cursory < y + h then
return true
else
return false
end
end

----------------------------------------------------------------------------------------------------------------------------------------

 

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...