So I have a script here which I want to automatically run when the server is started | yes I can run it manually but I will not always be on to run it.
my file is called stormfix.lua
Here is code if it helps
--[[
Kill Storm System for rp_stalingrad_gamizer by Lg
[EN]
This system Disable the storm if it's actualy used by the map
After Disable entitys it will kill them after 1 seconds
[FR]
Ce Système éteint dans un premier temps Le brouillard si il est en cours de fonctionnement.
Dans un second temps il supprime les entitées.
--]]
for k,v in pairs (ents.FindByName("relay_storm_animation")) do v:Fire("Disable") end
for k,v in pairs (ents.FindByName("relay_storm_animation")) do v:Fire("kill") end
for k,v in pairs (ents.FindByName("relay_storm_disable")) do v:Fire("Disable") end
for k,v in pairs (ents.FindByName("relay_storm_disable")) do v:Fire("kill") end
for k,v in pairs (ents.FindByName("fog_blizzard")) do v:Fire("TurnOff") end
for k,v in pairs (ents.FindByName("fog_blizzard")) do v:Fire("kill", "0", "1") end
for k,v in pairs (ents.FindByName("smokevolume")) do v:Fire("setDensity", "0") end
for k,v in pairs (ents.FindByName("smokevolume")) do v:Fire("kill", "0", "1") end
for k,v in pairs (ents.FindByName("multiple_fog_blizzard")) do v:Fire("Disable") end
for k,v in pairs (ents.FindByName("multiple_fog_blizzard")) do v:Fire("kill") end
for k,v in pairs (ents.FindByName("sndsc_blizzard")) do v:Fire("Disable") end
for k,v in pairs (ents.FindByName("sndsc_blizzard")) do v:Fire("kill") end
for k,v in pairs (ents.FindByName("hurt_blizzard")) do v:Fire("Disable") end
for k,v in pairs (ents.FindByName("hurt_blizzard")) do v:Fire("kill") end
for k,v in pairs (ents.FindByName("tmp_smoke01")) do v:Fire("kill") end
for k,v in pairs (ents.FindByName("multiple_fog_normal")) do v:Fire("Enable", "0", "2") end
for k,v in pairs (ents.FindByName("fog_normal")) do v:Fire("TurnOn", "0", "2") end
Have you ever looked at any addons and noticed a folder called "autorun"?
literally wanted to say the same, after only seeing the OP title
If it's a single file you can also just place it into the lua/autorun/server folder.
Workshop Addon Creation View the addon structure stuff there and you will see your answer ;)
Sorry, you need to Log In to post a reply to this thread.