Custom City Blackout
🌤 Weather System Integration Guide
Templates.Action["City Electiric on/off"] = function()
local wifi = wifiInfo("WF-LS Power & Water wifi network")
if wifi.connected == false then
Notify("You must be connected to LS Power & Water's network to control the city electric", "error", 5000)
return
end
Templates.Control["City Electiric"] = not Templates.Control["City Electiric"]
SetBlackout(Templates.Control["City Electiric"])
if Templates.Control["City Electiric"] then
Notify("City Electric is ON", "success", 5000)
else
Notify("City Electric is OFF", "error", 5000)
end
TriggerServerEvent("qb-weathersync:server:toggleBlackout", Templates.Control["City Electiric"])
end🔧 How to Integrate with Your Own Weather Script
Last updated