Delete me 2

so i really like how it changes slowly over 60 secs. is there a way to put this and ACL togeather? so when i did /weather clear it would change to clear over a 60second span and make it look more realistic then just rain to no rain

2 Likes

What the dude above said! Is it possible to put it together with ACL? @TheStonedTurtle

Also to add on to my other postā€¦ for some reason this is not updating so i can see the weather changing slowley over the 60 secs then when its fully changes it flashes back to clearā€¦ is this a confliction with somthing somewhere or is this broken can anyone help with this?

I havenā€™t touched this much recently, so not sure if it even works anymore.

As for ACL it looks like the way they sync the weather is by updating it to the default settings pretty often with a Wait(100),

Adding a transition to this would make it permanently be in a transition phase or would require a bit of reprogramming of ACL.

i know for a fact this script still works. now if you install acl and this script together for some odd reason i know its due to the sync. it changes the weather for like 10 secs and then clears.

i found a way to fix this by going into ACL configs and setting default weather from ā€˜CLEARā€™ to ā€™ ā€™ nothing

is there anyway you could add into your script to let us change the weather manualy? with a /weather command or somthing or /transition

/setweather has been added in the newest commit, also reworked the timer so that it resets when the weather is updated manually. Use /setweather and /toggleweather together to force it to stay as one weather type for longer than the interval period.

1 Like

it is possible to give me the line for the XMAS wheather ? i want to make some scenario with it please

thank you for adding this feature in on request you are the man!

only one more thing to bug you about on this plugin. i dont need snow or any winter months at all on my server is there a way for me to remove these from the cycle? and is there anyway to make this for admin only? i dont want random people changing the weather you know what i mean

You can remove any weather type by removing the option from the weatherTree, would need to be updated for all options as this is what determines which weathers can change to what.

Hereā€™s a basic example of how to do an admin system, add this to the server.lua, the last line should replace line 157. I havenā€™t tested but thats the basic concept.

local admins = {
	"steam:110######"
}


function isAdmin(identifier)
	local adminList = {}
	for _,v in pairs(admins) do
		adminList[v] = true
	end
	identifier = string.lower(identifier)
	identifier2 = string.upper(identifier)

	if(adminList[identifier] or adminList[identifier2])then
		return true
	else
		return false
	end
end

function getIdentifier( source, identifier )
    local ids = GetPlayerIdentifiers( source )

    for k, v in pairs( ids ) do 
        if(string.find(k, identifier..":"))then
            return v
        end
    end 

    return nil
end


if(cmd == "/setweather" and isAdmin(getIdentifier(source, "steam")) )then

@Striker, add ["XMAS"] = {"XMAS"} to the weatherTree and then you can change to it. This will make it permanently stay XMAS once set via /setweather XMAS

Thank you for the fast response Iā€™m going to test the admin script now. as far at the weather, if I didnā€™t want it to snow would I remove snow from all the different weather types? I think that is what you meant. so under rain, i would take out snow and under thunder take out blizzard EDIT-- I checked the script for admin dosent seem to work for me but I may be putting it in the wrong Iā€™m not amazing with this stuff

Thank you for sharing this script and thanks alot for your fast reply great job dude !!! I apreciate alot !!!

@Skrubby, looks like if(string.find(k, identifier..":"))then was wrong in my code example and should have been checking v, thatā€™s what I get for writing code and not testing it.

1 Like

hey, im not complaining Iā€™m downloading this right now you are the man! I really appreciate the work I love everything you have done

Hey, man, I know look whos back. (: lol Iā€™m looking for a way to hide the message that says who updated the weather to keep it to display to either admins only or just the person changing it I see here where it announces it but not sure how to change that
TriggerClientEvent(ā€œchatMessageā€, -1, ā€œSmartWeatherā€, {200,0,0}, nameā€¦" has updated the weather to: "ā€¦wtype)

never mind i change the -1 there too a 1 and now people dont see it but me? :smiley: yay

-1 means all clients, from is the person who changed it.
1 will be hard coded to that specific player ID which is not what you want.
Just delete that entire line.

okay so putting from just makes it tell me -1 tells everyone 1 is useless? lol

Thank you. What about time sync?