Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --@name Shield Strengthener
- --@author J.Dredd
- if SERVER then
- RTBC = {}
- RTBC.Commands = {}
- function RTBC.registerCommand(CMD,FUNC)
- RTBC.Commands[CMD] = FUNC
- end
- function RTBC.removeCommand(CMD)
- RTBC.Commands[CMD] = nil
- end
- function RTBC.runCommand(chatStr,Ply)
- local CMD = chatStr[1]
- if RTBC.Commands[CMD] ~= nil then
- table.remove(chatStr,1)
- RTBC.Commands[CMD](chatStr,Ply)
- end
- end
- function RTBC.ParseChat(Message,Ply)
- if Message:sub(1,1) ~= "!" and Message:sub(1,1) ~= "/" then
- return
- else
- Message = Message:sub(2,#Message)
- end
- local chatStr = {}
- for i in string.gmatch(Message, "%S+") do
- table.insert(chatStr,i)
- end
- RTBC.runCommand(chatStr,Ply)
- end
- wire.createInputs( {"Shield",} , {"normal"} )
- RTBC.registerCommand("spower",function(chatStr,Ply)
- if chatStr[1]== "spower" then --Shield Divert Power function start
- if chatStr[2] == "fore" then
- Shield["Divert Power"] = 1
- elseif chatStr[2] == "aft" then
- Shield["Divert Power"] = 2
- elseif chatStr[2] == "port" then
- Shield["Divert Power"] = 3
- elseif chatStr[2] == "starboard" then
- Shield["Divert Power"] = 4
- elseif chatStr[2] == "dorsal" then
- Shield["Divert Power"] = 5
- elseif chatStr[2] == "ventral" then
- Shield["Divert Power"] = 6
- elseif chatStr[2] == "all" then
- Shield["Divert Power"] = -1
- end
- printColor(Color(255,255,255),"Diverting Shield Power To "..chatStr[4].." Sheilds ", ents.owner():getTeamColor(), ents.owner():name())
- end
- end)
- chat.listen(RTBC.ParseChat)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement