[Discontinued][FREE] Tornado Script V1 Final

it turns out to only be working by command. i am working on a fix please be patient.

alright ty buddy, my community really wants this

prepare to witness the EF1 Tornado :joy: jk another update

Version 2!

Update includes:
Added:
Tornado Sirens ingame!
Permissions are back

Rermoved -

  • NativeUI Menu (makes tornado non-visible!

Downloads

InteractSound (579.0 KB) - Direct
Tornado Script (60.7 KB) - Direct

Commands

/tm - Opens the NativeUI Menu
/tornado summon - spawns the tornado
/tornado delete - Deletes ALL Tornadoes!

Disclaimer (Must read…)

This version is untested beware of bugs!

So I tested this, but when I spawn the tornado, It says that it was spawned at nil nil nil and no siren.

1 Like

me too

Same with me

Same issue with me

Just from looking at the code, the tornado:summon event handler uses vars x,y,z which are local and are not defined. I can be wrong, but skimming over it I do think I noticed a few errors. First in server.lua:

if x~=nil and y~=nil and z~=nil then
        TornadoDestination = x,y,z, heading

Logically this makes no sense- you are defining TornadoDestination as a var with 3 nil values since x,y,z are also nil. If x,y,z are nil at all, they shouldn’t be and your script should toss an error and stop trying to work with broken variables. Did you forget to make the summon event take args?
You did this multiple times in the script so make sure these are fixed.

        if not IsTornadoActive then
            TornadoPosition = x,y,z, heading
            print("[Tornado] A tornado has spawned at " .. TornadoPosition.x .. ", " .. TornadoPosition.y .. ", " .. TornadoPosition.z)
        end
        IsTornadoActive = true

This won’t break anything but you should put the IsTornadoActive inside the if statement because you are defining it true even if it is true already.
Also why are you “synchronizing aces” at all, let alone every frame (as opposed to you saying to check every minute)? There is absolutely nothing that needs to be done with permissions except for the command to start/stop the tornado. You shouldn’t be messing with ace’s like that, it’s just inherently unsafe and bad practice. If you need a perm to see the tornado, just redact the perm entirely.

RegisterNetEvent("admincheck")
AddEventHandler("admincheck", function(state)
    isAdmin = state
end)

I don’t get the need for this, just use an inline ace permission. (And as I will say further down, this looks like it does some client stuff- don’t do admin stuff on the client’s side.

print("Your version is: "..CurrentVersion.." but it's higher then the updated version! Newest Version: "..NewestVersion)

When would this ever happen unless someone purposefully made it happen?

Now client.lua:

isAdmin = false

This is the client’s side- don’t do anything with admin here. Just send the stuff to the server and have the server check for ace permissions.

There’s also tons of commented out code in the client.lua. I’d advise getting rid of it if it’s broken rather than commenting it out; usually code is commented out if the user wishes to enable experimental/outdated features and whatnot.

With all due respect you should test your work before releasing it because many clients are reporting issues including simple syntax errors that would’ve been caught from just one full test of the scripts.

help please?

Made a PR to fix this…

appreciate the help mate

lol theres another issue with it:

Getting mixed signals from the above, is this currently a working release?

Merged to master.
sorry for not being that active. my mother had just gotten out of the hospital today. :wink:

also my computer broke so i am using my mac to fix the code, please be patient because i hate this mac keyboard :joy: i will start working on the errors that @Setro had told me about.

1 Like

all good buddy, is there an eta on when the script will be functional?

1 Like

Can’t wait until this is finished!

Hi there, working with 64 slots? so OneSync?

Waiting for the final version :slight_smile:

sorry for the wait, my desktop water cooling stopped working so i lost all of my files. i am on my windows laptop i am working on it with my server on my vps if you want to test it feel free to hop on my server: s1.rhys19.life