Jump to content

[LUA] Drift.cs Mod Conversion + Approval Request to using it


D J C
 Share

Recommended Posts

Hello @ Kelton , @ Tupi .
 

I’ve optimized and converted the drift mod from CLEO to Lua, which is now smoother and more realistic in terms of car rotation and acceleration during drifts. It’s posted and also approved in B-Zone Rules and also Forum, and does the same thing as the original but with more logical handling and no unfair advantage.

 

Please take a moment to check it out and compare it with the CLEO version. I’ve included a YouTube video showing the CLEO version that’s currently being used by a lot of players and the improvements in my Lua code. All I did was convert the CLEO code to Lua and lower a single variable, and it works perfectly without issues.

 

 

 

 

require "lib.moonloader"

local playerCar
local carSpeed

function main()
    if not isSampLoaded() and isSampAvailable() then return end
    while true do
        wait(0)
        if isCharInAnyCar(playerPed) then 
            playerCar = storeCarCharIsInNoSave(playerPed)
            carSpeed = getCarSpeed(playerCar)
            isCarInAirProper(playerCar)
            setCarCollision(playerCar, true)
        
            if isKeyDown(VK_LSHIFT) and isVehicleOnAllWheels(playerCar) and doesVehicleExist(playerCar) and carSpeed > 5.0 then
                setCarCollision(playerCar, false)
                if isCarInAirProper(playerCar) then
                    setCarCollision(playerCar, true)
                    if isKeyDown(VK_A) then 
                        addToCarRotationVelocity(playerCar, 0, 0, 0.05)  -- in Drift.cs this variable is 0.15
                    end
                    if isKeyDown(VK_D) then
                        addToCarRotationVelocity(playerCar, 0, 0, -0.05) -- in Drift.cs this variable is -0.15
                    end
                end
            end
        end
    end
end

 

 

The CLEO drift mod (drift.cs) has caused numerous bugs and crashes for players due to its limitations and lack of optimization. In contrast, the Lua version resolves these issues, performing flawlessly thanks to its streamlined code and optimizations. By converting the mod to Lua, I was able to significantly reduce the resource usage, which not only improves performance but also stabilizes the mod on various setups:
 

 

In short, Lua is superior to CLEO for this type of modification because it's more versatile, has a smaller footprint, and provides a more stable environment - leading to fewer bugs and crashes. Many players have reported issues with the CLEO version, while the Lua version runs perfectly without any problem.

 

Looking forward to your feedback, and can I get a approval of using this. if not, I would love to hear your comment.
Best regards. ❤️

Edited by D J C
Link to comment
Share on other sites

Hello @ D J C ,

thanks for your optimization, to be honest i didnt try them myself but from what i can see from your video it looks smooth and more realistic then the cleo one. Its Legal to use but i believe still bannable if you abuse it (exemple while running from cops) as it gives you more advantage like when making a U turn.

Link to comment
Share on other sites

What you did is something that already exists anyway, just in another language, I don't see the meaning being the same way just as in another language, for which you need other additional mods to work. The thing with the rotation is preferential depending on each one, there is no point in posting several modes with different values. We appreciate your work, but it is a matter of preference, not a major change

Link to comment
Share on other sites

19 hours ago, AdeM nWo said:

Hello @ D J C ,

thanks for your optimization, to be honest i didnt try them myself but from what i can see from your video it looks smooth and more realistic then the cleo one. Its Legal to use but i believe still bannable if you abuse it (exemple while running from cops) as it gives you more advantage like when making a U turn.

 

Hey, thanks for the comment!

I totally get where you're coming from. The goal behind the LUA version isn’t to create an unfair advantage, it's just to make the drifting smoother and more stable compared to the CLEO version and we already have in Forum, which has caused a lot of issues. of course, any mod can be abused if used in the wrong context, like during chases. I'm open to any suggestions on how we could be sure that it's only used for what it was intended and avoid situations where it could give players an edge in unfair scenarios.

 

 

17 hours ago, Tupi said:

What you did is something that already exists anyway, just in another language, I don't see the meaning being the same way just as in another language, for which you need other additional mods to work. The thing with the rotation is preferential depending on each one, there is no point in posting several modes with different values. We appreciate your work, but it is a matter of preference, not a major change


I appreciate the feedback, but I think there's a misunderstanding. The purpose of my post wasn’t to compare preferences in car rotation or to spark a debate on which language is better for mods. which is already evident in the first YouTube video I included. The rotation I’ve improved in the Lua version eliminates the unnecessary and unrealistic movement that the CLEO mod creates.

And let’s be real and of course not to offense, it’s 2024. People are moving to more modern and efficient solutions like LUA instead of sticking with older, less optimized options like CLEO. It’s not just about preference, it’s about improving stability and performance for everyone.

 

I’m not looking to repost this mod on the forum for public use already. my goal was to get approval from higher staff to make sure it's fine to use on the server. The optimizations I’ve made might be subtle to some, but the real change is in how much smoother and crash-free it runs in LUA, as I include a YouTube video at the first place:
 


I’d appreciate if we could keep the conversation focused on the title of the forum, not just personal preferences. Since you’re staff on the server, do you think this code is safe for server use or not? It would be great if we could involve higher staff to be sure we’re 100% sure about this.

Edited by D J C
Link to comment
Share on other sites

On 9/18/2024 at 12:03 AM, D J C said:

Hello @ Kelton , @ Tupi .
 

I’ve optimized and converted the drift mod from CLEO to Lua, which is now smoother and more realistic in terms of car rotation and acceleration during drifts. It’s posted and also approved in B-Zone Rules and also Forum, and does the same thing as the original but with more logical handling and no unfair advantage.

 

Please take a moment to check it out and compare it with the CLEO version. I’ve included a YouTube video showing the CLEO version that’s currently being used by a lot of players and the improvements in my Lua code. All I did was convert the CLEO code to Lua and lower a single variable, and it works perfectly without issues.

 

 

 

 

require "lib.moonloader"

local playerCar
local carSpeed

function main()
    if not isSampLoaded() and isSampAvailable() then return end
    while true do
        wait(0)
        if isCharInAnyCar(playerPed) then 
            playerCar = storeCarCharIsInNoSave(playerPed)
            carSpeed = getCarSpeed(playerCar)
            isCarInAirProper(playerCar)
            setCarCollision(playerCar, true)
        
            if isKeyDown(VK_LSHIFT) and isVehicleOnAllWheels(playerCar) and doesVehicleExist(playerCar) and carSpeed > 5.0 then
                setCarCollision(playerCar, false)
                if isCarInAirProper(playerCar) then
                    setCarCollision(playerCar, true)
                    if isKeyDown(VK_A) then 
                        addToCarRotationVelocity(playerCar, 0, 0, 0.05)  -- in Drift.cs this variable is 0.15
                    end
                    if isKeyDown(VK_D) then
                        addToCarRotationVelocity(playerCar, 0, 0, -0.05) -- in Drift.cs this variable is -0.15
                    end
                end
            end
        end
    end
end

 

 

The CLEO drift mod (drift.cs) has caused numerous bugs and crashes for players due to its limitations and lack of optimization. In contrast, the Lua version resolves these issues, performing flawlessly thanks to its streamlined code and optimizations. By converting the mod to Lua, I was able to significantly reduce the resource usage, which not only improves performance but also stabilizes the mod on various setups:
 

 

In short, Lua is superior to CLEO for this type of modification because it's more versatile, has a smaller footprint, and provides a more stable environment - leading to fewer bugs and crashes. Many players have reported issues with the CLEO version, while the Lua version runs perfectly without any problem.

 

Looking forward to your feedback, and can I get a approval of using this. if not, I would love to hear your comment.
Best regards. ❤️

Love the optimization of the mod, now it really works on any game assemble (or what other people call it "modpack).

 

You can try uploading it as [LUA] here -> https://forum.b-zone.ro/files/ , and wait for approval. It's better than the old mod.

image.thumb.png.ae8d1f660a23b13b2688dce4706b0b86.png

Link to comment
Share on other sites

3 hours ago, TLG SyLvy said:

Love the optimization of the mod, now it really works on any game assemble (or what other people call it "modpack).

 

You can try uploading it as [LUA] here -> https://forum.b-zone.ro/files/ , and wait for approval. It's better than the old mod.

image.thumb.png.ae8d1f660a23b13b2688dce4706b0b86.png

 

Thanks for the kind words! I’m glad to hear you love the optimization. It’s awesome that it works well with various game assemblies now. ❤️
 

I appreciate the suggestion to upload it to the forum’s file section. I’m still looking to get approval from higher staff first to ensure everything's in line with server rules. Once I have that, I’ll definitely consider sharing it with you guys!

Edited by D J C
Link to comment
Share on other sites

When you submit a file in Mods Section, a Moderator will revise your mod already and if its in line with the rules he ll write that it is legal to use.

 

I ll close the topic now for being inactive for more then 3 days. PM me if you want to add/update something

TopicClosed.png

Edited by AdeM nWo
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.