Hey ahm as i have just a very small knowledge of lua coding... does anyone know whats the problem on this code?
I wanted too make a lua script that load/enable unload/disable hammer entities like a prop_dynamic with a specific name
why and for what do i need this script? well i always was amazed about how valve put multiple gamemodes in one map like they did on L4D
in the older source engine versions -> hl2 you cant do that as gmod for example has no info_gamemode where u can set a custom gamemode which can use in/outputs on entities
info_gamemode
(i know it exist in gmod but it doesnt work that well... and as i said you cant set custom gamemodes)
so i thought it is possible if you do it with a lua script so i put some stuff together and i think this here is the way how you can do it but for some reason if i set a prop like prop_dynamic disabled on start you cant enable it with this script is there a reason why? or is there someone who could do something about this?
// ------------------------------------------------------------------------------------------ //
if engine.ActiveGamemode() == "terrortown" then
for _,ent in ipairs(ents.FindByName("TTT")) do
ent:SetKeyValue( "StartDisabled", "0")
end
end
// ------------------------------------------------------------------------------------------ //
PS: sorry for my horrible english.
Sorry, you need to Log In to post a reply to this thread.