#Dev Menu

1 messages · Page 1 of 1 (latest)

amber rune
#

XV-Dev Development Menu for FiveM
Removes the need to make temporary commands to test out some code, or however you test scripts.

Preview: https://streamable.com/s3q4xq

  • Execute any code using the Lua Executor
  • Execute commonly used natives through the Quick Functions tab
    • Declare variables to be passed in to the functions
    • Search through a predefined list of functions
    • See all global variables that was declared
  • Console to show if code was executed or returned an error
  • Debug to show code that was executed
  • History component that shows last 25 executions
  • Auto Detection for QBCore and ESX

INSTALLATION
Drag'N'Drop
https://github.com/ImXirvin/xv-dev

Do not do while true do
Instead declare a global variable to true and use that.
Example:

runWhile = true

while runWhile do
    --run something
end

To turn it off

runWhile = false

To check for global variables declared in Quick Functions, check the History tabs to see its past states.

PS If you wanna have a good day, dont read the UI Code

GitHub

A useful Development menu for FiveM. Contribute to ImXirvin/xv-dev development by creating an account on GitHub.

winter condor
#

You can use the runcode resource instead but great scripr

amber rune
#

Update

  • Some Security Updates
onyx sundial
#

@amber rune you could add syntax highlighting

#

and so many other libraries

amber rune
#

I was looking for something like that

#

Thanks

#

I’ll try to add it

amber rune
#

After looking at those libs

#

Maybe not

#
  1. Those only work for non textareas.
  2. It’s not supposed to be an ide.
#

But if I find an way to do it without including some heavy library

#

I’ll do it

onyx sundial
#

easier on the eyes mostly

wraith shard
#

looks pretty cool i will say, nice work

amber rune
#

Thanks!

wraith shard
#

i even tried to look how runcode does syntax highlighting, and i got no idea lmao, i did try a couple other syntax highlighting things but couldnt get anything to work with a text area

wraith shard
#

nvm found it, they use a web editor for it https://www.npmjs.com/package/monaco-editor

amber rune
#

Yeah because textarea content isn’t part of the dom

#

But I like this one

#

I’ll give it a go

wraith shard
#

tried fuckin around it it a little bit, coudlnt get it to work right, but i also dont know svelte lol

amber rune
#

progress

amber rune
#

working

wraith shard
#

sick, also was it intended for the lua code to get sent to the console when ran?

#

(like how runcode auto prints the result when ran)

wraith shard
#

so your quick function “GetEntityCoords”

#

is useless right?

amber rune
#

why?

wraith shard
#

because you never send the output to the console?

#

right?

amber rune
#

oh I see wy,m

#

fivem console or the lua exec console

#

?

#

its supposed to be the fivem console

#

but

#

that is true actually

#

shit

#

lol

#

yeah never returns anything

wraith shard
#

i can pr it, i just wanted to make sure before i did

amber rune
#

Im thinking of reassigning the lya print function

#

so I can intercept it and send it to the console

#

then normal print

#

i might do that

wraith shard
#

that, or if u want the data of the lua, add “return” to the first pcall

#

that should return the data as the result i think the var is

#

PR’d so you can get an idea how to grab it’s data

#

should work for more then just the quick functions

amber rune
#

nice ill have a look

#

also

#

this is how quick functions are set up

#

so I can just add print(GetEntityCoords())

#

in code:

wraith shard
#

true, however then the larger lua exe wouldn’t return data to the console

amber rune
#

true

wraith shard
#

if you want it to return to the f8 console also

#

you can print “result” from my PR

#

because that will also return the error

#

heres how it looks

#

dont mind the looks, did some UI changes lmao

amber rune
#

yeah that looks good

#

so dont need anymore tinkering around?

#

just merge?

wraith shard
#

you want it to print to F8? or just Menu Console?

amber rune
#

wouldnt hurt both

#

But server would be pretty annoying

#

so

#

Maybe just Menu Console actually

wraith shard
#

then yeah, can merge without any issues

amber rune
#

It works on npm dev

#

and builds normally

#

but when using it

#

shows this

wraith shard
#

lol wtf, all i did was edit client lua shit

amber rune
#

nah

#

I meant for the monaco editor

#

weird

wraith shard
#

ah, thought i somehow broke it all lmfao, weird, what way did you load it?

amber rune
#

works in the browser

#

when run on npm run dev

wraith shard
#

hmmm, i know runcode just uses like cloudflare for the edited, as runcode doesn’t use any node modules, it may be some weird thing where FiveMs chromium may not support loading the editor like that

onyx sundial
#

I really like how this project is coming up to be 🤩

wraith shard
#

tracked down the issue, not the fix

#
    let editor: monaco.editor.IStandaloneCodeEditor;
    console.log('editor:', editor)
#

however

#

Chrome returns it as that also

#

soooooo maybe not

wraith shard
#

kinda got it

#

somehow lost highlighting, and now have more errors

#

also all the lua code now just returns nil lol

amber rune
#

Like not a print etc

amber rune
amber rune
wraith shard
#

yeah i wasn’t overly worried about that error, as it has a failsafe to revert to the web version, i was still trying to figure out why the CSS won’t load

amber rune
#

@wraith shard

#

re did the whole menu

#

but

#

do you remember what output returned

#

?

#

its meant to return the print() right?

wraith shard
#

uhhh output should return the data, so if you put print(PlayerId()) output should be like 128 (or something like that)

wraith shard
amber rune
#
let code = `(function() ${lua} end)()`
onyx sundial
#

seems more useful now that the window is bigger and central

#

But it may be interesting to make it resizeable and moveable

#

So like if you spawn an entity, you would see it right in front of you

onyx sundial
#

Oh, didn't know that from the screenshot

amber rune
#

Yeah you wouldn’t be able to tell but it is

onyx sundial
#

Good job, bravo!

amber rune
#

Thanks