Coder Social home page Coder Social logo

ar_menu's Introduction

PD: Sorry my English, im spanish, you can pull best translations

Gif Example

https://i.gyazo.com/7dfd903477eb8bee19264d5d9d60d0b5.mp4 The flickering of the video is because my recording program does not record well in REDM

How to install

  • Copy and paste ar_menu folder to resources
  • Add start ar_menu to your server.cfg file

Create Menu or SubMenus

index.html

<ul class="menu menu-example"> <!-- menu-user is id of menu, new sub menus need "menu menu-example"-->
    <li><a class="FUNCTION RIGHT HERE" href=""><span class="emoji">๐Ÿ”ช</span>Kill</a></li>
    <li><a class="FUNCTION RIGHT HERE" href=""><span class="emoji">๐Ÿ‘‹</span>Hi</a></li> <!-- You can copy this line below for create more options un menu -->
    (โ€ฆ)
</ul>

script.js

    //For submenus -- Add here the code
    $('.exampleopensubmenu1').on('click', function(e) {
        e.preventDefault();
        $(".menu").removeClass('fadeIn');
        $(".menu-example").addClass('fadeIn'); // Menu Open Example: "menu menu-example" you set only "menu-example"
    });
    //For New Option -- Add here the code
    $('.example1').on('click', function(e) {
        e.preventDefault();
        $.post('http://ar_menu/example1', JSON.stringify({ //Set last url name of class or other name if u can control next in RegisterNUICallback('example1', function(data)
            id: idEnt
        }));
        $(".crosshair").removeClass('fadeIn').removeClass('active');
        $(".menu").removeClass('fadeIn');
        $.post('http://ar_menu/disablenuifocus', JSON.stringify({
            nuifocus: false
        }));
    });

client.lua (and server.lua if have)

RegisterNUICallback('example1', function(data)
  playerPed = GetPlayerPed(-1);
		if playerPed then
            ExecuteCommand("/carry") Example code Here
		end
end)

style.css

.crosshair,
.menu-car,
.menu-example, /*U Need add new Sub-menus here for not duplicate whe u show main menu*/
.menu-user,
.menu-animations {
    opacity: 0;
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.