all-in-simplicity / fivem-hypnonema

Media Player Resource for FiveM
Other
140 stars 73 forks source link

reapeat export not working? #101

Open JTzLinux opened 2 years ago

JTzLinux commented 2 years ago

Hello Hello, I've been trying to make a command to enable repeat but when uploading it (The code:)

    elseif args[1] == "loop" then
        exports.hypnonema:repeat('TEST', shouldRepeat)

it doesnt work and I get the following error:

[script:hypnonemacmds] Error parsing script @hypnonemacmds/server.lua in resource hypnonemacmds: @hypnonemacmds/server.lua:22: <name> expected near 'repeat'
[    c-scripting-core] Failed to load script server.lua.

and I dont understand do I need something to fill into shouldRepeat?

Thanks in advance

all-in-simplicity commented 2 years ago

shouldRepeat is meant to be a boolean value. So for example if you want to repeat the video on a specific screen named eg. TEST, you would call it like this:

 elseif args[1] == "loop" then
        exports.hypnonema:repeat("TEST", true)
JTzLinux commented 2 years ago

shouldRepeat is meant to be a boolean value. So for example if you want to repeat the video on a specific screen named eg. TEST, you would call it like this:

 elseif args[1] == "loop" then
        exports.hypnonema:repeat("TEST", true)

Sadly the same error still happens maybe it has something to do with the "repeat"?

Edit: maybe because "repeat" is a lua loop feature it won't work?

JTzLinux commented 1 year ago

Hello? @thiago-dev