Modest Menu Lua Scripting Megathread (2024)

Modest Menu Lua Scripting Megathread (1)Modest Menu Lua Scripting Megathread (2)

UnKnoWnCheaTs - Multiplayer Game Hacking and Cheats
  • First-Person Shooters
  • Grand Theft Auto V
  • [Coding] Modest Menu Lua Scripting Megathread
    Modest Menu Lua Scripting Megathread (10)Modest Menu Lua Scripting Megathread (11)

    sponsored advertisem*nts

    Page 1 of 244123451151101>Last »
    Thread Tools

    Modest Menu Lua Scripting Megathread
    Modest Menu Lua Scripting Megathread (13)3rd August 2021, 09:08 PM#1
    Chase

    snowyy's husband



    Join Date: Jun 2017

    Location: idk

    Posts: 1,606

    Reputation: 83772
    Rep Power: 268
    Modest Menu Lua Scripting Megathread (15)Modest Menu Lua Scripting Megathread (16)Modest Menu Lua Scripting Megathread (17)Modest Menu Lua Scripting Megathread (18)Modest Menu Lua Scripting Megathread (19)Modest Menu Lua Scripting Megathread (20)Modest Menu Lua Scripting Megathread (21)Modest Menu Lua Scripting Megathread (22)Modest Menu Lua Scripting Megathread (23)Modest Menu Lua Scripting Megathread (24)Modest Menu Lua Scripting Megathread (25)

    RecognitionsModest Menu Lua Scripting Megathread (26)File Analyzer
    Modest Menu Lua Scripting Megathread (27)Donator (2)

    Points: 177,868, Level: 59

    Modest Menu Lua Scripting Megathread (28)Modest Menu Lua Scripting Megathread (29)Modest Menu Lua Scripting Megathread (30)

    Level up: 2%, 316,132 Points needed

    Modest Menu Lua Scripting Megathread (31)Modest Menu Lua Scripting Megathread (32)Modest Menu Lua Scripting Megathread (33)

    Activity: 62.2%

    Modest Menu Lua Scripting Megathread (34)Modest Menu Lua Scripting Megathread (35)Modest Menu Lua Scripting Megathread (36)
    Last AchievementsModest Menu Lua Scripting Megathread (37)Modest Menu Lua Scripting Megathread (38)Modest Menu Lua Scripting Megathread (39)Modest Menu Lua Scripting Megathread (40)

    Modest Menu Lua Scripting Megathread

    Moderator noteModest Menu Lua Scripting Megathread (41)This is the only thread where lua scripting in Kiddion's menu should be discussed. Lua scripts or discussions around them in any other thread will either be removed or redirected here.

    With the latest release of Kiddion's perpetually popular Modest Menu came a built-in lua scripting API. This thread exists to allow the community to share, ask questions about, and help each other in creating functional lua scripts that the Modest Menu can use. The main thread will remain open for questions, support, or continued releases, but should not be used for discussions or releases for the new API.

    Thanks in advance for your shares and contributions. Examples of how it works can be found in the scripts/ folder of the main Modest Menu download.

    Chase is online now

    Modest Menu Lua Scripting Megathread (43)

    '; }


    Modest Menu Lua Scripting Megathread (44)3rd August 2021, 09:39 PM#2
    Kiddion

    Hacked North Korea



    Join Date: Mar 2017

    Location: F000:FFF0

    Posts: 2,183

    Reputation: 111360
    Rep Power: 307
    Modest Menu Lua Scripting Megathread (46)Modest Menu Lua Scripting Megathread (47)Modest Menu Lua Scripting Megathread (48)Modest Menu Lua Scripting Megathread (49)Modest Menu Lua Scripting Megathread (50)Modest Menu Lua Scripting Megathread (51)Modest Menu Lua Scripting Megathread (52)Modest Menu Lua Scripting Megathread (53)Modest Menu Lua Scripting Megathread (54)Modest Menu Lua Scripting Megathread (55)Modest Menu Lua Scripting Megathread (56)

    RecognitionsModest Menu Lua Scripting Megathread (57)Member of the Month (2)

    Points: 485,037, Level: 59

    Modest Menu Lua Scripting Megathread (58)Modest Menu Lua Scripting Megathread (59)Modest Menu Lua Scripting Megathread (60)

    Level up: 98%, 8,963 Points needed

    Modest Menu Lua Scripting Megathread (61)Modest Menu Lua Scripting Megathread (62)Modest Menu Lua Scripting Megathread (63)

    Activity: 6.0%

    Modest Menu Lua Scripting Megathread (64)Modest Menu Lua Scripting Megathread (65)Modest Menu Lua Scripting Megathread (66)
    Last AchievementsModest Menu Lua Scripting Megathread (67)Modest Menu Lua Scripting Megathread (68)Modest Menu Lua Scripting Megathread (69)Modest Menu Lua Scripting Megathread (70)
    Award-ShowcaseModest Menu Lua Scripting Megathread (71)

    Please note, every script will run in its own thread and each script can run only once at a time. Prefer many small scripts using dedicated actions rather than one script that combines everything.

    To always set the the vehicle heatlh to max when you first enter it:

    lua:

    local function OnVehicleChanged(oldVehicle, newVehicle)if newVehicle ~= nil thenif newVehicle:get_health() < 1000 thennewVehicle:set_health(1000)endendendmenu.register_callback('OnVehicleChanged', OnVehicleChanged)

    To set initial settings when switching player character (Michael, Trevor, Franklin or Online):

    lua:

    local function OnPlayerChanged(oldPlayer, newPlayer)-- When switching player, instantly refill health and armorif newPlayer ~= nil thennewPlayer:set_armour(100)newPlayer:set_health(newPlayer:get_max_health())menu.max_all_ammo()endendmenu.register_callback('OnPlayerChanged', OnPlayerChanged)

    __________________

    "Perfect moments can be had, but not preserved, except in memory." -- Leonard Nimoy


    GTA5 Modest Menu | Modest Menu Scripts
    Modern C++ Tricks for Externals

    Kiddion is offline

    Modest Menu Lua Scripting Megathread (73)


    Modest Menu Lua Scripting Megathread (74)3rd August 2021, 10:41 PM#3
    pele20

    n00bie
    Modest Menu Lua Scripting Megathread (75)



    Join Date: Aug 2014

    Posts: 7

    Reputation: 442
    Rep Power: 239
    Modest Menu Lua Scripting Megathread (77)Modest Menu Lua Scripting Megathread (78)Modest Menu Lua Scripting Megathread (79)Modest Menu Lua Scripting Megathread (80)Modest Menu Lua Scripting Megathread (81)

    Points: 5,432, Level: 8

    Modest Menu Lua Scripting Megathread (82)Modest Menu Lua Scripting Megathread (83)Modest Menu Lua Scripting Megathread (84)

    Level up: 3%, 1,068 Points needed

    Modest Menu Lua Scripting Megathread (85)Modest Menu Lua Scripting Megathread (86)Modest Menu Lua Scripting Megathread (87)

    Activity: 0%

    Modest Menu Lua Scripting Megathread (88)Modest Menu Lua Scripting Megathread (89)Modest Menu Lua Scripting Megathread (90)
    Last AchievementsModest Menu Lua Scripting Megathread (91)Modest Menu Lua Scripting Megathread (92)

    Quote:

    Originally Posted by Kiddion

    Please note, every script will run in its own thread and each script can run only once at a time. Prefer many small scripts using dedicated actions rather than one script that combines everything.

    To always set the the vehicle heatlh to max when you first enter it:

    lua:

    local function OnVehicleChanged(oldVehicle, newVehicle)if newVehicle ~= nil thenif newVehicle:get_health() < 1000 thennewVehicle:set_health(1000)endendendmenu.register_callback('OnVehicleChanged', OnVehicleChanged)

    To set initial settings when switching player character (Michael, Trevor, Franklin or Online):

    lua:

    local function OnPlayerChanged(oldPlayer, newPlayer)-- When switching player, instantly refill health and armorif newPlayer ~= nil thennewPlayer:set_armour(100)newPlayer:set_health(newPlayer:get_max_health())menu.max_all_ammo()endendmenu.register_callback('OnPlayerChanged', OnPlayerChanged)

    I've tried alot to get the repair vehicle working, but im not familiar with lua and it keeps giving me errors if i try to make it a toggle/action in menu.lua. Any tips for a newcomer to lua to get this to work? I really appreciate you posted that function because the repair vehicle function on the menu isnt working properly as we speak. Thanks for your awesome efforts and hope to hear from youModest Menu Lua Scripting Megathread (94)

    pele20 is offline

    Modest Menu Lua Scripting Megathread (96)


    Modest Menu Lua Scripting Megathread (97)4th August 2021, 03:46 AM#4
    MokaMateria

    Member
    Modest Menu Lua Scripting Megathread (98)Modest Menu Lua Scripting Megathread (99)Modest Menu Lua Scripting Megathread (100)Modest Menu Lua Scripting Megathread (101)



    Join Date: Mar 2020

    Posts: 61

    Reputation: 176
    Rep Power: 103
    Modest Menu Lua Scripting Megathread (103)Modest Menu Lua Scripting Megathread (104)

    Points: 3,642, Level: 6

    Modest Menu Lua Scripting Megathread (105)Modest Menu Lua Scripting Megathread (106)Modest Menu Lua Scripting Megathread (107)

    Level up: 5%, 858 Points needed

    Modest Menu Lua Scripting Megathread (108)Modest Menu Lua Scripting Megathread (109)Modest Menu Lua Scripting Megathread (110)

    Activity: 4.0%

    Modest Menu Lua Scripting Megathread (111)Modest Menu Lua Scripting Megathread (112)Modest Menu Lua Scripting Megathread (113)
    Last AchievementsModest Menu Lua Scripting Megathread (114)Modest Menu Lua Scripting Megathread (115)

    intriguing
    wonder if this gives us a big variety of custom stuff.
    for example, stuff that works as lua scripts in SP
    (like indicators for the vehicles)

    Last edited by MokaMateria; 4th August 2021 at 03:49 AM.

    MokaMateria is offline

    Modest Menu Lua Scripting Megathread (117)


    Modest Menu Lua Scripting Megathread (118)4th August 2021, 07:44 AM#5
    Azamaticon

    n00bie
    Modest Menu Lua Scripting Megathread (119)



    Join Date: Jun 2020

    Posts: 2

    Reputation: 458
    Rep Power: 97
    Modest Menu Lua Scripting Megathread (121)Modest Menu Lua Scripting Megathread (122)Modest Menu Lua Scripting Megathread (123)Modest Menu Lua Scripting Megathread (124)Modest Menu Lua Scripting Megathread (125)

    Points: 880, Level: 1

    Modest Menu Lua Scripting Megathread (126)Modest Menu Lua Scripting Megathread (127)Modest Menu Lua Scripting Megathread (128)

    Level up: 96%, 20 Points needed

    Modest Menu Lua Scripting Megathread (129)Modest Menu Lua Scripting Megathread (130)Modest Menu Lua Scripting Megathread (131)

    Activity: 0%

    Modest Menu Lua Scripting Megathread (132)Modest Menu Lua Scripting Megathread (133)Modest Menu Lua Scripting Megathread (134)

    Hello! Didn't find anything on animations. Can I make a character play an animation when a key is pressed?

    Azamaticon is offline

    Modest Menu Lua Scripting Megathread (136)


    Modest Menu Lua Scripting Megathread (137)4th August 2021, 07:47 AM#6
    guylet

    ^(.*)(S\d\dE\d\d).*.(mkv| mp4|mov|avi)$



    Join Date: Jun 2020

    Posts: 453

    Reputation: 15005
    Rep Power: 116
    Modest Menu Lua Scripting Megathread (139)Modest Menu Lua Scripting Megathread (140)Modest Menu Lua Scripting Megathread (141)Modest Menu Lua Scripting Megathread (142)Modest Menu Lua Scripting Megathread (143)Modest Menu Lua Scripting Megathread (144)Modest Menu Lua Scripting Megathread (145)Modest Menu Lua Scripting Megathread (146)Modest Menu Lua Scripting Megathread (147)Modest Menu Lua Scripting Megathread (148)Modest Menu Lua Scripting Megathread (149)

    Points: 22,765, Level: 21

    Modest Menu Lua Scripting Megathread (150)Modest Menu Lua Scripting Megathread (151)Modest Menu Lua Scripting Megathread (152)

    Level up: 23%, 1,235 Points needed

    Modest Menu Lua Scripting Megathread (153)Modest Menu Lua Scripting Megathread (154)Modest Menu Lua Scripting Megathread (155)

    Activity: 0%

    Modest Menu Lua Scripting Megathread (156)Modest Menu Lua Scripting Megathread (157)Modest Menu Lua Scripting Megathread (158)
    Last AchievementsModest Menu Lua Scripting Megathread (159)Modest Menu Lua Scripting Megathread (160)Modest Menu Lua Scripting Megathread (161)

    Quote:

    Originally Posted by Azamaticon

    Hello! Didn't find anything on animations. Can I make a character play an animation when a key is pressed?

    If it's not in the API "Readme.api" it probably doesn't exist.

    __________________

    Modest Menu Lua Scripting Megathread (163)GUYLET'S SIGNATURE fap.log rockstar ID joiner Playerdex GUYLET'S SIGNATURE

    guylet is offline

    Modest Menu Lua Scripting Megathread (165)

    '; }


    Modest Menu Lua Scripting Megathread (166)4th August 2021, 09:03 AM#7
    Kiddion

    Hacked North Korea



    Join Date: Mar 2017

    Location: F000:FFF0

    Posts: 2,183

    Reputation: 111360
    Rep Power: 307
    Modest Menu Lua Scripting Megathread (168)Modest Menu Lua Scripting Megathread (169)Modest Menu Lua Scripting Megathread (170)Modest Menu Lua Scripting Megathread (171)Modest Menu Lua Scripting Megathread (172)Modest Menu Lua Scripting Megathread (173)Modest Menu Lua Scripting Megathread (174)Modest Menu Lua Scripting Megathread (175)Modest Menu Lua Scripting Megathread (176)Modest Menu Lua Scripting Megathread (177)Modest Menu Lua Scripting Megathread (178)

    RecognitionsModest Menu Lua Scripting Megathread (179)Member of the Month (2)

    Points: 485,037, Level: 59

    Modest Menu Lua Scripting Megathread (180)Modest Menu Lua Scripting Megathread (181)Modest Menu Lua Scripting Megathread (182)

    Level up: 98%, 8,963 Points needed

    Modest Menu Lua Scripting Megathread (183)Modest Menu Lua Scripting Megathread (184)Modest Menu Lua Scripting Megathread (185)

    Activity: 6.0%

    Modest Menu Lua Scripting Megathread (186)Modest Menu Lua Scripting Megathread (187)Modest Menu Lua Scripting Megathread (188)
    Last AchievementsModest Menu Lua Scripting Megathread (189)Modest Menu Lua Scripting Megathread (190)Modest Menu Lua Scripting Megathread (191)Modest Menu Lua Scripting Megathread (192)
    Award-ShowcaseModest Menu Lua Scripting Megathread (193)

    Quote:

    Originally Posted by Azamaticon

    Hello! Didn't find anything on animations. Can I make a character play an animation when a key is pressed?

    If you find a way to do it externally, please let me know.

    __________________

    "Perfect moments can be had, but not preserved, except in memory." -- Leonard Nimoy


    GTA5 Modest Menu | Modest Menu Scripts
    Modern C++ Tricks for Externals

    Kiddion is offline

    Modest Menu Lua Scripting Megathread (196)


    Modest Menu Lua Scripting Megathread (197)4th August 2021, 09:27 AM#8
    Blasted324

    n00bie
    Modest Menu Lua Scripting Megathread (198)



    Join Date: Jul 2020

    Posts: 1

    Reputation: 458
    Rep Power: 93
    Modest Menu Lua Scripting Megathread (200)Modest Menu Lua Scripting Megathread (201)Modest Menu Lua Scripting Megathread (202)Modest Menu Lua Scripting Megathread (203)Modest Menu Lua Scripting Megathread (204)

    Points: 1, Level: 1

    Modest Menu Lua Scripting Megathread (205)Modest Menu Lua Scripting Megathread (206)Modest Menu Lua Scripting Megathread (207)

    Level up: 0%, 1 Points needed

    Modest Menu Lua Scripting Megathread (208)Modest Menu Lua Scripting Megathread (209)Modest Menu Lua Scripting Megathread (210)

    Activity: 0%

    Modest Menu Lua Scripting Megathread (211)Modest Menu Lua Scripting Megathread (212)Modest Menu Lua Scripting Megathread (213)

    dose copying and pasting lua scripts from other menus work? if so i have a bunch of scripts such as crash protections and crash options

    Blasted324 is offline

    Modest Menu Lua Scripting Megathread (215)


    Modest Menu Lua Scripting Megathread (216)4th August 2021, 01:59 PM#9
    inucat22

    n00bie
    Modest Menu Lua Scripting Megathread (217)



    Join Date: Jul 2014

    Posts: 11

    Reputation: 458
    Rep Power: 241
    Modest Menu Lua Scripting Megathread (219)Modest Menu Lua Scripting Megathread (220)Modest Menu Lua Scripting Megathread (221)Modest Menu Lua Scripting Megathread (222)Modest Menu Lua Scripting Megathread (223)

    Points: 5,202, Level: 7

    Modest Menu Lua Scripting Megathread (224)Modest Menu Lua Scripting Megathread (225)Modest Menu Lua Scripting Megathread (226)

    Level up: 78%, 198 Points needed

    Modest Menu Lua Scripting Megathread (227)Modest Menu Lua Scripting Megathread (228)Modest Menu Lua Scripting Megathread (229)

    Activity: 0%

    Modest Menu Lua Scripting Megathread (230)Modest Menu Lua Scripting Megathread (231)Modest Menu Lua Scripting Megathread (232)
    Last AchievementsModest Menu Lua Scripting Megathread (233)Modest Menu Lua Scripting Megathread (234)

    someone want to be my hero and make a rainbow vehicle script <3

    inucat22 is offline

    Modest Menu Lua Scripting Megathread (236)


    Modest Menu Lua Scripting Megathread (237)4th August 2021, 02:02 PM#10
    ellisdudes

    Supreme H4x0|2
    Modest Menu Lua Scripting Megathread (238)



    Join Date: Apr 2020

    Location: to your left

    Posts: 643

    Reputation: 4672
    Rep Power: 110
    Modest Menu Lua Scripting Megathread (240)Modest Menu Lua Scripting Megathread (241)Modest Menu Lua Scripting Megathread (242)Modest Menu Lua Scripting Megathread (243)Modest Menu Lua Scripting Megathread (244)Modest Menu Lua Scripting Megathread (245)Modest Menu Lua Scripting Megathread (246)Modest Menu Lua Scripting Megathread (247)Modest Menu Lua Scripting Megathread (248)Modest Menu Lua Scripting Megathread (249)Modest Menu Lua Scripting Megathread (250)

    RecognitionsModest Menu Lua Scripting Megathread (251)Donator (1)

    Points: 9,196, Level: 11

    Modest Menu Lua Scripting Megathread (252)Modest Menu Lua Scripting Megathread (253)Modest Menu Lua Scripting Megathread (254)

    Level up: 46%, 604 Points needed

    Modest Menu Lua Scripting Megathread (255)Modest Menu Lua Scripting Megathread (256)Modest Menu Lua Scripting Megathread (257)

    Activity: 0%

    Modest Menu Lua Scripting Megathread (258)Modest Menu Lua Scripting Megathread (259)Modest Menu Lua Scripting Megathread (260)
    Last AchievementsModest Menu Lua Scripting Megathread (261)

    Quote:

    Originally Posted by Blasted324

    dose copying and pasting lua scripts from other menus work? if so i have a bunch of scripts such as crash protections and crash options

    Kiddion explicitly said no so your skidded p2c scripts will not work.
    Lua is just a programming language, there’s no reason why different APIs would be compatible. Think of it in the same way that all keys are made of metal but only the key designed for the lock will open it.

    ellisdudes is offline

    Modest Menu Lua Scripting Megathread (264)


    Modest Menu Lua Scripting Megathread (265)4th August 2021, 09:28 PM#11
    Kiddion

    Hacked North Korea



    Join Date: Mar 2017

    Location: F000:FFF0

    Posts: 2,183

    Reputation: 111360
    Rep Power: 307
    Modest Menu Lua Scripting Megathread (267)Modest Menu Lua Scripting Megathread (268)Modest Menu Lua Scripting Megathread (269)Modest Menu Lua Scripting Megathread (270)Modest Menu Lua Scripting Megathread (271)Modest Menu Lua Scripting Megathread (272)Modest Menu Lua Scripting Megathread (273)Modest Menu Lua Scripting Megathread (274)Modest Menu Lua Scripting Megathread (275)Modest Menu Lua Scripting Megathread (276)Modest Menu Lua Scripting Megathread (277)

    RecognitionsModest Menu Lua Scripting Megathread (278)Member of the Month (2)

    Points: 485,037, Level: 59

    Modest Menu Lua Scripting Megathread (279)Modest Menu Lua Scripting Megathread (280)Modest Menu Lua Scripting Megathread (281)

    Level up: 98%, 8,963 Points needed

    Modest Menu Lua Scripting Megathread (282)Modest Menu Lua Scripting Megathread (283)Modest Menu Lua Scripting Megathread (284)

    Activity: 6.0%

    Modest Menu Lua Scripting Megathread (285)Modest Menu Lua Scripting Megathread (286)Modest Menu Lua Scripting Megathread (287)
    Last AchievementsModest Menu Lua Scripting Megathread (288)Modest Menu Lua Scripting Megathread (289)Modest Menu Lua Scripting Megathread (290)Modest Menu Lua Scripting Megathread (291)
    Award-ShowcaseModest Menu Lua Scripting Megathread (292)

    Some more examples...

    How to make a Snow toggle:

    snow.lua:

    menu.add_toggle("Snow", function()return globals.get_boolean(262145 + 4724) end, function(value)globals.set_boolean(262145 + 4724, value)end)

    Add a tiny player toggle:

    tiny_player.lua:

    menu.add_toggle("Tiny Player", function()if localplayer == nil thenreturn nilendreturn localplayer:get_config_flag(223)end, function(value)localplayer:set_config_flag(223, value)end)

    __________________

    "Perfect moments can be had, but not preserved, except in memory." -- Leonard Nimoy


    GTA5 Modest Menu | Modest Menu Scripts
    Modern C++ Tricks for Externals

    Kiddion is offline

    Modest Menu Lua Scripting Megathread (294)

    '; }


    Modest Menu Lua Scripting Megathread (295)4th August 2021, 11:09 PM#12
    Tinny

    God-Like
    Modest Menu Lua Scripting Megathread (296)Modest Menu Lua Scripting Megathread (297)Modest Menu Lua Scripting Megathread (298)Modest Menu Lua Scripting Megathread (299)Modest Menu Lua Scripting Megathread (300)Modest Menu Lua Scripting Megathread (301)Modest Menu Lua Scripting Megathread (302)Modest Menu Lua Scripting Megathread (303)



    Join Date: Jun 2015

    Posts: 170

    Reputation: 1034
    Rep Power: 220
    Modest Menu Lua Scripting Megathread (305)Modest Menu Lua Scripting Megathread (306)Modest Menu Lua Scripting Megathread (307)Modest Menu Lua Scripting Megathread (308)Modest Menu Lua Scripting Megathread (309)Modest Menu Lua Scripting Megathread (310)Modest Menu Lua Scripting Megathread (311)Modest Menu Lua Scripting Megathread (312)

    Points: 8,138, Level: 10

    Modest Menu Lua Scripting Megathread (313)Modest Menu Lua Scripting Megathread (314)Modest Menu Lua Scripting Megathread (315)

    Level up: 49%, 562 Points needed

    Modest Menu Lua Scripting Megathread (316)Modest Menu Lua Scripting Megathread (317)Modest Menu Lua Scripting Megathread (318)

    Activity: 10.0%

    Modest Menu Lua Scripting Megathread (319)Modest Menu Lua Scripting Megathread (320)Modest Menu Lua Scripting Megathread (321)
    Last AchievementsModest Menu Lua Scripting Megathread (322)Modest Menu Lua Scripting Megathread (323)

    Hello.
    Since i've never used any lua script before, can u clarify how to use it ?
    It is obvious that u can create different text files in the script folder, put the desired codes in each and save without forgetting to change the extension to lua.

    But after that how do u load it from the menu in game ? is it automatic ? Cause in the script menu they don't show up. I've tried with the snow lua and tinyplayer

    Tinny is online now

    Modest Menu Lua Scripting Megathread (325)


    Modest Menu Lua Scripting Megathread (326)4th August 2021, 11:25 PM#13
    guylet

    ^(.*)(S\d\dE\d\d).*.(mkv| mp4|mov|avi)$



    Join Date: Jun 2020

    Posts: 453

    Reputation: 15005
    Rep Power: 116
    Modest Menu Lua Scripting Megathread (328)Modest Menu Lua Scripting Megathread (329)Modest Menu Lua Scripting Megathread (330)Modest Menu Lua Scripting Megathread (331)Modest Menu Lua Scripting Megathread (332)Modest Menu Lua Scripting Megathread (333)Modest Menu Lua Scripting Megathread (334)Modest Menu Lua Scripting Megathread (335)Modest Menu Lua Scripting Megathread (336)Modest Menu Lua Scripting Megathread (337)Modest Menu Lua Scripting Megathread (338)

    Points: 22,765, Level: 21

    Modest Menu Lua Scripting Megathread (339)Modest Menu Lua Scripting Megathread (340)Modest Menu Lua Scripting Megathread (341)

    Level up: 23%, 1,235 Points needed

    Modest Menu Lua Scripting Megathread (342)Modest Menu Lua Scripting Megathread (343)Modest Menu Lua Scripting Megathread (344)

    Activity: 0%

    Modest Menu Lua Scripting Megathread (345)Modest Menu Lua Scripting Megathread (346)Modest Menu Lua Scripting Megathread (347)
    Last AchievementsModest Menu Lua Scripting Megathread (348)Modest Menu Lua Scripting Megathread (349)Modest Menu Lua Scripting Megathread (350)

    Quote:

    Originally Posted by Tinny

    Hello.
    Since i've never used any lua script before, can u clarify how to use it ?
    It is obvious that u can create different text files in the script folder, put the desired codes in each and save without forgetting to change the extension to lua.

    But after that how do u load it from the menu in game ? is it automatic ? Cause in the script menu they don't show up. I've tried with the snow lua and tinyplayer

    They're automatically loaded on startup, but you can manually reload them too from menu > reload scripts. For example if you add a script to the script folder while modest menu is already running, then you'll want to manually reload the scripts for them to show up. When you open the menu you should see "scripts" towards the bottom, that's where you should see "snow" toggle if you're using the snow script.

    __________________

    Modest Menu Lua Scripting Megathread (352)GUYLET'S SIGNATURE fap.log rockstar ID joiner Playerdex GUYLET'S SIGNATURE

    Last edited by guylet; 4th August 2021 at 11:33 PM.

    guylet is offline

    Modest Menu Lua Scripting Megathread (354)


    Modest Menu Lua Scripting Megathread (355)4th August 2021, 11:45 PM#14
    Tinny

    God-Like
    Modest Menu Lua Scripting Megathread (356)Modest Menu Lua Scripting Megathread (357)Modest Menu Lua Scripting Megathread (358)Modest Menu Lua Scripting Megathread (359)Modest Menu Lua Scripting Megathread (360)Modest Menu Lua Scripting Megathread (361)Modest Menu Lua Scripting Megathread (362)Modest Menu Lua Scripting Megathread (363)



    Join Date: Jun 2015

    Posts: 170

    Reputation: 1034
    Rep Power: 220
    Modest Menu Lua Scripting Megathread (365)Modest Menu Lua Scripting Megathread (366)Modest Menu Lua Scripting Megathread (367)Modest Menu Lua Scripting Megathread (368)Modest Menu Lua Scripting Megathread (369)Modest Menu Lua Scripting Megathread (370)Modest Menu Lua Scripting Megathread (371)Modest Menu Lua Scripting Megathread (372)

    Points: 8,138, Level: 10

    Modest Menu Lua Scripting Megathread (373)Modest Menu Lua Scripting Megathread (374)Modest Menu Lua Scripting Megathread (375)

    Level up: 49%, 562 Points needed

    Modest Menu Lua Scripting Megathread (376)Modest Menu Lua Scripting Megathread (377)Modest Menu Lua Scripting Megathread (378)

    Activity: 10.0%

    Modest Menu Lua Scripting Megathread (379)Modest Menu Lua Scripting Megathread (380)Modest Menu Lua Scripting Megathread (381)
    Last AchievementsModest Menu Lua Scripting Megathread (382)Modest Menu Lua Scripting Megathread (383)

    I think I misunderstood it : I thought i have to put each code in different lua files with the desired name, but it seems that i have to add the code in the menu.lua file. Will go and try so

    Tinny is online now

    Modest Menu Lua Scripting Megathread (385)


    Modest Menu Lua Scripting Megathread (386)4th August 2021, 11:47 PM#15
    guylet

    ^(.*)(S\d\dE\d\d).*.(mkv| mp4|mov|avi)$



    Join Date: Jun 2020

    Posts: 453

    Reputation: 15005
    Rep Power: 116
    Modest Menu Lua Scripting Megathread (388)Modest Menu Lua Scripting Megathread (389)Modest Menu Lua Scripting Megathread (390)Modest Menu Lua Scripting Megathread (391)Modest Menu Lua Scripting Megathread (392)Modest Menu Lua Scripting Megathread (393)Modest Menu Lua Scripting Megathread (394)Modest Menu Lua Scripting Megathread (395)Modest Menu Lua Scripting Megathread (396)Modest Menu Lua Scripting Megathread (397)Modest Menu Lua Scripting Megathread (398)

    Points: 22,765, Level: 21

    Modest Menu Lua Scripting Megathread (399)Modest Menu Lua Scripting Megathread (400)Modest Menu Lua Scripting Megathread (401)

    Level up: 23%, 1,235 Points needed

    Modest Menu Lua Scripting Megathread (402)Modest Menu Lua Scripting Megathread (403)Modest Menu Lua Scripting Megathread (404)

    Activity: 0%

    Modest Menu Lua Scripting Megathread (405)Modest Menu Lua Scripting Megathread (406)Modest Menu Lua Scripting Megathread (407)
    Last AchievementsModest Menu Lua Scripting Megathread (408)Modest Menu Lua Scripting Megathread (409)Modest Menu Lua Scripting Megathread (410)

    Quote:

    Originally Posted by Tinny

    I think I misunderstood it : I thought i have to put each code in different lua files with the desired name, but it seems that i have to add the code in the menu.lua file. Will go and try so

    No you can have separate files

    __________________

    Modest Menu Lua Scripting Megathread (412)GUYLET'S SIGNATURE fap.log rockstar ID joiner Playerdex GUYLET'S SIGNATURE

    guylet is offline

    Modest Menu Lua Scripting Megathread (414)


    Modest Menu Lua Scripting Megathread (415)4th August 2021, 11:58 PM#16
    Tinny

    God-Like
    Modest Menu Lua Scripting Megathread (416)Modest Menu Lua Scripting Megathread (417)Modest Menu Lua Scripting Megathread (418)Modest Menu Lua Scripting Megathread (419)Modest Menu Lua Scripting Megathread (420)Modest Menu Lua Scripting Megathread (421)Modest Menu Lua Scripting Megathread (422)Modest Menu Lua Scripting Megathread (423)



    Join Date: Jun 2015

    Posts: 170

    Reputation: 1034
    Rep Power: 220
    Modest Menu Lua Scripting Megathread (425)Modest Menu Lua Scripting Megathread (426)Modest Menu Lua Scripting Megathread (427)Modest Menu Lua Scripting Megathread (428)Modest Menu Lua Scripting Megathread (429)Modest Menu Lua Scripting Megathread (430)Modest Menu Lua Scripting Megathread (431)Modest Menu Lua Scripting Megathread (432)

    Points: 8,138, Level: 10

    Modest Menu Lua Scripting Megathread (433)Modest Menu Lua Scripting Megathread (434)Modest Menu Lua Scripting Megathread (435)

    Level up: 49%, 562 Points needed

    Modest Menu Lua Scripting Megathread (436)Modest Menu Lua Scripting Megathread (437)Modest Menu Lua Scripting Megathread (438)

    Activity: 10.0%

    Modest Menu Lua Scripting Megathread (439)Modest Menu Lua Scripting Megathread (440)Modest Menu Lua Scripting Megathread (441)
    Last AchievementsModest Menu Lua Scripting Megathread (442)Modest Menu Lua Scripting Megathread (443)

    My fault, totally forgot to remove the dot after the lua extension while renaming it. Anyway thank you, and i will try to fool around with it.
    As for the code :

    Code:

    local function OnVehicleChanged(oldVehicle, newVehicle)if newVehicle ~= nil thenif newVehicle:get_health() < 1000 thennewVehicle:set_health(1000)endendend menu.register_callback('OnVehicleChanged', OnVehicleChanged)

    this one is automatic from what I can understand, but is it possible to be add it to the menu like the snow ? cause at the end it would be really suspicious if someone is just watching u by mistake

    Tinny is online now

    Modest Menu Lua Scripting Megathread (445)

    '; }


    Modest Menu Lua Scripting Megathread (446)5th August 2021, 12:02 AM#17
    guylet

    ^(.*)(S\d\dE\d\d).*.(mkv| mp4|mov|avi)$



    Join Date: Jun 2020

    Posts: 453

    Reputation: 15005
    Rep Power: 116
    Modest Menu Lua Scripting Megathread (448)Modest Menu Lua Scripting Megathread (449)Modest Menu Lua Scripting Megathread (450)Modest Menu Lua Scripting Megathread (451)Modest Menu Lua Scripting Megathread (452)Modest Menu Lua Scripting Megathread (453)Modest Menu Lua Scripting Megathread (454)Modest Menu Lua Scripting Megathread (455)Modest Menu Lua Scripting Megathread (456)Modest Menu Lua Scripting Megathread (457)Modest Menu Lua Scripting Megathread (458)

    Points: 22,765, Level: 21

    Modest Menu Lua Scripting Megathread (459)Modest Menu Lua Scripting Megathread (460)Modest Menu Lua Scripting Megathread (461)

    Level up: 23%, 1,235 Points needed

    Modest Menu Lua Scripting Megathread (462)Modest Menu Lua Scripting Megathread (463)Modest Menu Lua Scripting Megathread (464)

    Activity: 0%

    Modest Menu Lua Scripting Megathread (465)Modest Menu Lua Scripting Megathread (466)Modest Menu Lua Scripting Megathread (467)
    Last AchievementsModest Menu Lua Scripting Megathread (468)Modest Menu Lua Scripting Megathread (469)Modest Menu Lua Scripting Megathread (470)

    Quote:

    Originally Posted by Tinny

    My fault, totally forgot to remove the dot after the lua extension while renaming it. Anyway thank you, and i will try to fool around with it.
    As for the code :

    Code:

    local function OnVehicleChanged(oldVehicle, newVehicle)if newVehicle ~= nil thenif newVehicle:get_health() < 1000 thennewVehicle:set_health(1000)endendend menu.register_callback('OnVehicleChanged', OnVehicleChanged)

    this one is automatic from what I can understand, but is it possible to be add it to the menu like the snow ? cause at the end it would be really suspicious if someone is just watching u by mistake

    If you want to add a menu option, all you have to do is menu.add_toggle(string name, function name). You can see all the available functions in the "Readme.api" file. Edit: Have a look at menu.add_action too

    __________________

    Modest Menu Lua Scripting Megathread (472)GUYLET'S SIGNATURE fap.log rockstar ID joiner Playerdex GUYLET'S SIGNATURE

    guylet is offline

    Modest Menu Lua Scripting Megathread (474)


    Modest Menu Lua Scripting Megathread (475)5th August 2021, 12:09 AM#18
    Tinny

    God-Like
    Modest Menu Lua Scripting Megathread (476)Modest Menu Lua Scripting Megathread (477)Modest Menu Lua Scripting Megathread (478)Modest Menu Lua Scripting Megathread (479)Modest Menu Lua Scripting Megathread (480)Modest Menu Lua Scripting Megathread (481)Modest Menu Lua Scripting Megathread (482)Modest Menu Lua Scripting Megathread (483)



    Join Date: Jun 2015

    Posts: 170

    Reputation: 1034
    Rep Power: 220
    Modest Menu Lua Scripting Megathread (485)Modest Menu Lua Scripting Megathread (486)Modest Menu Lua Scripting Megathread (487)Modest Menu Lua Scripting Megathread (488)Modest Menu Lua Scripting Megathread (489)Modest Menu Lua Scripting Megathread (490)Modest Menu Lua Scripting Megathread (491)Modest Menu Lua Scripting Megathread (492)

    Points: 8,138, Level: 10

    Modest Menu Lua Scripting Megathread (493)Modest Menu Lua Scripting Megathread (494)Modest Menu Lua Scripting Megathread (495)

    Level up: 49%, 562 Points needed

    Modest Menu Lua Scripting Megathread (496)Modest Menu Lua Scripting Megathread (497)Modest Menu Lua Scripting Megathread (498)

    Activity: 10.0%

    Modest Menu Lua Scripting Megathread (499)Modest Menu Lua Scripting Megathread (500)Modest Menu Lua Scripting Megathread (501)
    Last AchievementsModest Menu Lua Scripting Megathread (502)Modest Menu Lua Scripting Megathread (503)

    Will have a look into it and ill try the menu_add_toggle/action (will try both adn see the working one).
    Thx

    Tinny is online now

    Modest Menu Lua Scripting Megathread (505)


    Modest Menu Lua Scripting Megathread (506)5th August 2021, 03:37 PM#19
    Kiddion

    Hacked North Korea



    Join Date: Mar 2017

    Location: F000:FFF0

    Posts: 2,183

    Reputation: 111360
    Rep Power: 307
    Modest Menu Lua Scripting Megathread (508)Modest Menu Lua Scripting Megathread (509)Modest Menu Lua Scripting Megathread (510)Modest Menu Lua Scripting Megathread (511)Modest Menu Lua Scripting Megathread (512)Modest Menu Lua Scripting Megathread (513)Modest Menu Lua Scripting Megathread (514)Modest Menu Lua Scripting Megathread (515)Modest Menu Lua Scripting Megathread (516)Modest Menu Lua Scripting Megathread (517)Modest Menu Lua Scripting Megathread (518)

    RecognitionsModest Menu Lua Scripting Megathread (519)Member of the Month (2)

    Points: 485,037, Level: 59

    Modest Menu Lua Scripting Megathread (520)Modest Menu Lua Scripting Megathread (521)Modest Menu Lua Scripting Megathread (522)

    Level up: 98%, 8,963 Points needed

    Modest Menu Lua Scripting Megathread (523)Modest Menu Lua Scripting Megathread (524)Modest Menu Lua Scripting Megathread (525)

    Activity: 6.0%

    Modest Menu Lua Scripting Megathread (526)Modest Menu Lua Scripting Megathread (527)Modest Menu Lua Scripting Megathread (528)
    Last AchievementsModest Menu Lua Scripting Megathread (529)Modest Menu Lua Scripting Megathread (530)Modest Menu Lua Scripting Megathread (531)Modest Menu Lua Scripting Megathread (532)
    Award-ShowcaseModest Menu Lua Scripting Megathread (533)

    Quote:

    Originally Posted by Tinny

    this one is automatic from what I can understand, but is it possible to be add it to the menu like the snow ? cause at the end it would be really suspicious if someone is just watching u by mistake

    I'm not sure what you mean, if you want a toggle to enable setting the health to 1000 when you enter a new vehicle, you could use:

    vehicle.lua:

    local heal_vehicle_on_change = falsem*nu.add_toggle("Heal Vehicle on Change", function() return heal_vehicle_on_change end, function(value)heal_vehicle_on_change = valueend) local function OnVehicleChanged(oldVehicle, newVehicle)if newVehicle ~= nil and heal_vehicle_on_change thenif newVehicle:get_health() < 1000 thennewVehicle:set_health(1000)endendendmenu.register_callback('OnVehicleChanged', OnVehicleChanged)

    If you want an action button to heal the vehicle, you can use:

    lua:

    menu.add_action("Heal Vehicle", function()if localplayer == nil thenreturnendcurrent_vehicle = localplayer:get_current_vehicle()if current_vehicle ~= nil thenif current_vehicle:get_health() < 1000 thencurrent_vehicle:set_health(1000)endendend)

    __________________

    "Perfect moments can be had, but not preserved, except in memory." -- Leonard Nimoy


    GTA5 Modest Menu | Modest Menu Scripts
    Modern C++ Tricks for Externals

    Kiddion is offline

    Modest Menu Lua Scripting Megathread (536)


    Modest Menu Lua Scripting Megathread (537)5th August 2021, 05:17 PM#20
    pele20

    n00bie
    Modest Menu Lua Scripting Megathread (538)



    Join Date: Aug 2014

    Posts: 7

    Reputation: 442
    Rep Power: 239
    Modest Menu Lua Scripting Megathread (540)Modest Menu Lua Scripting Megathread (541)Modest Menu Lua Scripting Megathread (542)Modest Menu Lua Scripting Megathread (543)Modest Menu Lua Scripting Megathread (544)

    Points: 5,432, Level: 8

    Modest Menu Lua Scripting Megathread (545)Modest Menu Lua Scripting Megathread (546)Modest Menu Lua Scripting Megathread (547)

    Level up: 3%, 1,068 Points needed

    Modest Menu Lua Scripting Megathread (548)Modest Menu Lua Scripting Megathread (549)Modest Menu Lua Scripting Megathread (550)

    Activity: 0%

    Modest Menu Lua Scripting Megathread (551)Modest Menu Lua Scripting Megathread (552)Modest Menu Lua Scripting Megathread (553)
    Last AchievementsModest Menu Lua Scripting Megathread (554)Modest Menu Lua Scripting Megathread (555)

    Quote:

    Originally Posted by Kiddion

    I'm not sure what you mean, if you want a toggle to enable setting the health to 1000 when you enter a new vehicle, you could use:

    vehicle.lua:

    local heal_vehicle_on_change = falsem*nu.add_toggle("Heal Vehicle on Change", function() return heal_vehicle_on_change end, function(value)heal_vehicle_on_change = valueend) local function OnVehicleChanged(oldVehicle, newVehicle)if newVehicle ~= nil and heal_vehicle_on_change thenif newVehicle:get_health() < 1000 thennewVehicle:set_health(1000)endendendmenu.register_callback('OnVehicleChanged', OnVehicleChanged)

    If you want an action button to heal the vehicle, you can use:

    lua:

    menu.add_action("Heal Vehicle", function()if localplayer == nil thenreturnendcurrent_vehicle = localplayer:get_current_vehicle()if current_vehicle ~= nil thenif current_vehicle:get_health() < 1000 thencurrent_vehicle:set_health(1000)endendend)

    These dont work, just hopped in to Online solely to check these 2 variations on heal vehicle. Both shown up in the menu but both didnt fix my car.

    pele20 is offline

    Modest Menu Lua Scripting Megathread (558)

    Page 1 of 244123451151101>Last »


    Similar Threads
    ThreadThread StarterForumRepliesLast Post
    [Release] [LUA] MenuHook - Lua Hack in Menu State | Detours | File Hider | Load Before AutorunLeithzzzeGarry's Mod4428th July 2019 08:32 AM
    Anyone have .LUA scripting experience?BooGerGeneral Programming and Reversing02nd July 2004 08:34 PM

    Tags
    [coding], modest, menu, lua, scripting, megathread

    «Previous Thread|Next Thread»




    All times are GMT. The time now is 11:18 AM.


    Modest Menu Lua Scripting Megathread (561)
    sponsored advertisem*nt

    no new posts

    Modest Menu Lua Scripting Megathread (2024)

    References

    Top Articles
    Latest Posts
    Article information

    Author: Edmund Hettinger DC

    Last Updated:

    Views: 5800

    Rating: 4.8 / 5 (78 voted)

    Reviews: 85% of readers found this page helpful

    Author information

    Name: Edmund Hettinger DC

    Birthday: 1994-08-17

    Address: 2033 Gerhold Pine, Port Jocelyn, VA 12101-5654

    Phone: +8524399971620

    Job: Central Manufacturing Supervisor

    Hobby: Jogging, Metalworking, Tai chi, Shopping, Puzzles, Rock climbing, Crocheting

    Introduction: My name is Edmund Hettinger DC, I am a adventurous, colorful, gifted, determined, precious, open, colorful person who loves writing and wants to share my knowledge and understanding with you.