Jump to content

lyncon

Members
  • Posts

    6
  • Joined

  • Last visited

Posts posted by lyncon

  1. On 8/20/2021 at 6:13 PM, thesensorykiller said:

    no is not a command this resource work when u click on "o" just a click u dont need a cmd.

    A simple example of "bindKey", when you press a key that you put inside the "bindKey", it will execute, when executing it will check if the player is inside the ACL Admin or Group you exist that you want to put.

    Example:

    local key = "b"
    local statePress = "down"
    
    addEventHandler("onResourceStart", resourceRoot, function()
    	for i, players in ipairs(getElementsByType("player")) do
    		bindKey(players, key, statePress, checkGroupACL)
    	end
    end)
    
    function checkGroupACL(player, key, state)
    	local account = getAccountName(getPlayerAccount(player))
    
    	if isObjectInACLGroup("user." .. account, aclGetGroup("Admin")) then
    		print("Yes, it's inside the 'Admin' ACL")
    	else
    		print("Error, not inside ACL 'Admin'")
    	end
    end

     

  2. dxEditBoxs

    spacer.png

    Spoiler
    addEventHandler( "onClientResourceStart", resourceRoot, 
    	function( ) 
    
    		local test1 = EditBox:create( 400, 200, 400, 60, "Username" );
    		local test1_gui = test1.gui
    
    		addEventHandler( "onClientGUIChanged", test1_gui, 
    			function( ) 
    
    				if ( test1:getText( ) == "MTA" ) then
    
    					outputDebugString( "Yes, MTA" );
    
    				end
    
    			end 
    		);
    
    	end 
    );

     

     

    This project was entirely developed by myself. this structure allows you to create edits in dxs. Edibox works in the same way as the standard CEGUI, so you don't have much work to adapt your code to this structure.

    Note the format that was written in the OOP format (using meta-tables, not the standard MTA system).
     

    Download

    Soon back

    • Like 2
×
×
  • Create New...