Team Spartan Cookies & Milk Forums
sf help - Printable Version

+- Team Spartan Cookies & Milk Forums (https://teamscm.co.uk)
+-- Forum: Garry's Mod (https://teamscm.co.uk/forum-4.html)
+--- Forum: Starfall (https://teamscm.co.uk/forum-7.html)
+--- Thread: sf help (/thread-349.html)



sf help - busterbeej332 - 11-06-2014

hi guys as you know i love atlantis i want to make an starfall thing that when my e2 emmits lock=1 it will say server wide warning atlantis in lockdown or something like that or something to control atlantis but i have no clue how to do it thx for any help


RE: sf help - Liizzii - 11-06-2014

I don't think having a server wide lockdown message would be benificial. E2 botSay global chat got banned because people were spamming it with random stuff

EDIT: moved to Starfall subforum


RE: sf help - busterbeej332 - 11-06-2014

im gonna imbed within it a gate msg to


RE: sf help - Liizzii - 11-06-2014

So it should only get triggered when the gate is dialed into during a lockdown?


RE: sf help - busterbeej332 - 11-06-2014

i tried to do it a whilei go i got it a bit but it got to the point where i was getting global errors


RE: sf help - Liizzii - 11-06-2014

Hmm, ok.. something like (following code) should do it

--@name Buster's lockdown warning
--@author SirJoshOfEnder

local BotTag = "Atlantis"
local BotMsg = "Beware: Lockdown currently active!"

local WireLib = loadLibrary( "wire" )
local ChatLib = loadLibrary( "chat" )

WireLib.createInputs( {"GateInbound", "GateOpen", "Lockdown"}, {"normal", "normal", "normal"} )

hook( "input", "GettingDemValues", function( Input, Value)
if ( Input == "GateOpen" ) and ( Value == 1 ) then
if WireLib.ports.GateInbound == 1 then
if WireLib.ports.Lockdown == 1 then
ChatLib.botSay( BotTag, {r=255,g=0,b=0}, BotMsg )
end
end
end
end)



RE: sf help - busterbeej332 - 11-06-2014

thanks josh ill try it now