Jump to content

DaeRoNz

Members
  • Posts

    29
  • Joined

  • Last visited

Posts posted by DaeRoNz

  1. Não aparece os draw que usa a shader do resource dgs. Alguem sabe o porque e uma solução para isso ? 

     

    local sx,sy = guiGetScreenSize()
    local x,y =  (sx/1920), (sy/1080)
    local dxScale = ((x/1920) / (y/1080)) 
    
    renderTarget = dxCreateRenderTarget(sx,sy, true)
    
    
    loadstring(exports["dgs-master"]:dgsImportFunction())()
    
    local roundedRect = dgsCreateRoundRect(10, false, tocolor(255, 255, 255), nil, false)
    local roundRectDown = dgsCreateRoundRect({{10, false}, {10, false}, {0, false}, {0, false}}, tocolor(255, 255, 255, 255), nil, false)
    
    local components = { "weapon", "ammo", "health", "clock", "money", "breath", "armour", "wanted", "area_name", "radio", "vehicle_name" }
    
    for _, component in ipairs(components) do
        setPlayerHudComponentVisible(component, false)
    end
    
    function drawHud()
        dxSetRenderTarget(renderTarget, true)
    
        dxDrawImage(x*1560,y*40,x*260,y*70, roundedRect, 0, 0, 0, tocolor(36, 36, 36,190), true)
    
        dxDrawRectangle(10, 50, 40, 40, tocolor(math.random(255), math.random(255), math.random(255)))
    
        dxDrawImage(x*1590,y*100,x*110,y*20, roundedRect, 0, 0, 0, tocolor(40, 40, 40, 240), true)
        dxDrawImage(x*1590,y*100,x*110,y*20, roundedRect, 0, 0, 0, tocolor(1, 202, 129, 245), true)
    
        dxDrawImage(x*1710,y*100,x*80,y*20, roundedRect, 0, 0, 0, tocolor(40, 40, 40, 240), true)
        dxDrawImage(x*1710,y*100,x*50,y*20, roundedRect, 0, 0, 0, tocolor(1, 150, 202, 245), true)
        dxSetRenderTarget()	
    
    
    	dxDrawImage(220, 25, 500,500, renderTarget, -10,0,0)
    
    end
    addEventHandler("onClientRender", root, drawHud)
    

     

  2. addCommandHandler( global.Comando, function(playerSource, cmd, ...)
        local conta = getAccountName(getPlayerAccount(playerSource))	
    	if ( isObjectInACLGroup ( "user.".. conta, aclGetGroup ( "Superior" ) ) ) then
            local text = table.concat({...}, " ")
            if text then
                local namePlayer = getPlayerName(playerSource)
                triggerClientEvent(root, "KKZinho:AnunciarStaff", playerSource, namePlayer, text)
            end
        else 
            return 
        end
    end)

     

  3. O código seria algo deste género.
     

    addEventHandler("onClientRender", getRootElement(),
    function ()
    for k,v in ipairs(getElementsByType("player")) do
            if getElementData(v,"EmServico") == true then
                dxDrawTextOnElement(v,"Em Serviço",1,20,0,0,255,255,1,"arial")
            end
        end
    end)

    Se você está a usar de maneira diferente mostre seu código.
  4. EDIT :   IDK WHAT I MADE BUT IS NOW WORKING -------------------------------------------






    them i apply the code :

    DGS:dgsSetVisible( Edit, false )
    DGS:dgsFocus(image1)
    DGS:dgsSetEnabled ( Edit, false )

    disappears correctly but cursor still on screen. only clicking somewhere the cursor show off.
    How can i do to cursor show off with the dgsSetVisible false.

    another thing is if i m in car doing this the edit box dont type the letters
     

  5. Need some updates the code. I don't have the knowledge to do it.

    My bot disconnet after some hours. and the process back on but bot not. I need restart app all days.
    ** If i update the discord folder bot not work. So i think the code need some updated.
     

    Spoiler

    spacer.png



     

  6. 3 minutes ago, thisdp said:

    this means it maybe not DGS' fault, because dgsSetInputMode("no_binds_when_editing") is guiSetInputMode("no_binds_when_editing"). Try to find whether there are other scripts that modify input mode

    I dont know if this help but.
    If i open painel Admin behind the bind t dont work. but if i close admin painel  and type t again it work.

  7. 	buttonCriar = DGS:dgsCreateButton( 70, 300, 140, 40, "Criar", false,tab2)
    
    
        --showPanel()
        --addEventHandler("onDgsMouseDrag",colorPick,updateColorPicker,false)
        --addEventHandler ( "onDgsMouseClickDown", colorPick, updateColorPicker )
        addEventHandler ( "onDgsMouseClickDown", buttonCriar, clickCriar )
    
    

     the function clickCriar active them i click in tab2 and in buttonCriar.      it should on active on buttonCriar
    Right ?

  8. On 05/12/2016 at 03:51, botder said:

    I have released a self-hosted Discord relay some time ago, but didn't bother posting here or adding documentation. @specahawk, you can tell me to remove this post if you don't want to have this advertising in your thread. Anyway, the code is on GitHub (Necktrox/mta-discord-bot) and it's being used by Mr.Green, one unknown guy and my clan's server. It doesn't support any commands, but the implementation is up to you (the bot recognizes commands with dot (.) prefix). It's running perfectly stable for months.

    Long time this dont get update. Is any way to make this possible without using relay node.js server (externar things) because people buy the server and dont have acess to install that things. 

    • Like 2
  9. Irá ter de alterar algumas linhas na função que é ativada pela bind "b" e integrar o seguinte codigo no resource !

     

    -- server
    
    function isPlayerInACL(player, acl)
       local accountName = getAccountName( getPlayerAccount(player) )
       if accountName ~= "guest" and type( aclGetGroup(acl) ) == "userdata" then
          return isObjectInACLGroup( "user."..accountName, aclGetGroup(acl) )
       end
       return false
    end
    
    function checkPermission ( acl )
    	local result = isPlayerInACL(client, acl)
    	triggerClientEvent ( client, "resultPermisson", client, result )
    end
    addEvent( "onCheckPermission", true )
    addEventHandler( "onCheckPermission", resourceRoot, checkPermission )
    
    -- client 
    function switch(result)
    	if result then
        	-- chamar função de abrir o painel
        else
        	outputChatBox("Não tem permissão")
        end
    end
    addEvent( "resultPermisson", true )
    addEventHandler( "resultPermisson", localPlayer, switch )
    function requestP()
    	triggerServerEvent ( "onCheckPermission", resourceRoot, "Admin" )  -- indicar aqui a acl 
    end
    bindKey("b", "down", requestP)

     

×
×
  • Create New...