[Request] Converting a .cs script to LUA

Greetings all people! I hope you are all having a good day. I require a knowledgeable lua/.cs scripter to convert a specific script for me to lua for a server resource.
The script is linked below. I also could help you in exchange for helping me;)
Serious inquiries only.

0.2b.rar (4.4 KB)

Please advise,
Chris

Why convert it to Lua? FiveM supports C#?

Here you go:

2 Likes

hey @Frazzle, I know this topic is old, But how did you convert the cs to lua? Did you use an auto convert program or did you code it yourself? Because I want to use some vMenu features for my NativeUI project, but dont know how to add cs to my lua script. It would be great if you could help me :slight_smile:

Wait… What am I asking :joy: You made vMenu. Let me try this again.

Hey Frazzle, With vMenu, you know how there are 3 right arrows for each sub menu. How would I add this to a NativeUILua script i am editing? I am using the SEM_InteractionMenu, But it doesnt use the same item style. Would love it if you responded :slight_smile: Would I need to add/change something in the nativeui.lua dependencie for the sem menu?

This is what I am wanting i am talking about \/saadd

I never made vMenu but use the :RightLabel() function to place arrows on the right side, also here are the arrows β†’β†’β†’

Ok? How would I use :RightLabel() These are all the things I have tried.

LEOMenu:RightLabel()
MainMenu:RightLabel()
_MenuPool:RightLabel()
UIMenuItem:RightLabel()

Nothing works. Where and How would I add this to my _MenuPool:SubMenu Items??

I have thought of other random ways to use this function, but all it says is that it kept trying to index a nil value in the sem menu dependencie file nativeui.lua for (field β€˜Label’) on line 880
return self.Label.Text:Text() - Line 880

Could you explain how I add the :RightLabel() function to my _MenuPool:AddSubMenu() item.

local newitem = NativeUI.CreateItem("Add ketchup?", "Do you wish to add ketchup?")
newitem:RightLabel("β†’β†’β†’")
menu:AddItem(newitem)

How would you do it for a submenu?

local Settings = _MenuPool:AddSubMenu(MainMenu, 'Settings', 'Open the settings.', true) Settings:SetMenuWidthOffset(Config.MenuWidth)

I am also using _MenuPool
I have tried Settings:RightLabel("β†’β†’β†’") but doesnt seem to work.

local SettingsItem = UIMenuItem.New("Settings", "Open the settings.")
SettingsItem:RightLabel("β†’β†’β†’")
MainMenu:AddItem(SettingsItem)
local SettingsMenu = UIMenu.New(MainMenu.Title:Text(), "Settings", MainMenu.Position.X, MainMenu.Position.Y)
_MenuPool:Add(SettingsMenu)
MainMenu:BindMenuToItem(SettingsMenu, SettingsItem)

or edit the addsubmenu func

function MenuPool:AddSubMenu(Menu, Text, Description, KeepPosition, KeepBanner, RightLabel)
	if Menu() == "UIMenu" then
		local Item = UIMenuItem.New(tostring(Text), Description or "")
		Menu:AddItem(Item)
		local SubMenu
		if KeepPosition then
			SubMenu = UIMenu.New(Menu.Title:Text(), Text, Menu.Position.X, Menu.Position.Y)
		else
			SubMenu = UIMenu.New(Menu.Title:Text(), Text)
		end
		if KeepBanner then
			if Menu.Logo ~= nil then
				SubMenu.Logo = Menu.Logo
			else
				SubMenu.Logo = nil
				SubMenu.Banner = Menu.Banner
			end
        end
        if RightLabel ~= "" and RightLabel ~= nil then
            Item:RightLabel(RightLabel)
        end
		self:Add(SubMenu)
		Menu:BindMenuToItem(SubMenu, Item)
		return SubMenu
	end
end

local Settings = _MenuPool:AddSubMenu(MainMenu, 'Settings', 'Open the settings.', true, false, "β†’β†’β†’")

Thank you soo much :slight_smile: