-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added DoorSetAllUnownable/DoorSetAllOwnable commands. * *Contributed by Trurascalz.* * Allow SQL host urls with/without http:// or https:// to be used. * *Contributed by RJ.* * Added check for iniTable so that the framework doesn't crash if a plugin doesn't have an ini file. * *Contributed by NightAngel.* * Added checks to chatbox that solve len bug from utf8 commit. * *Contributed by NightAngel.*
- Loading branch information
Showing
8 changed files
with
157 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
...rrysmod/gamemodes/clockwork/plugins/doorcommands/plugin/commands/sh_doorsetallownable.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
--[[ | ||
© 2015 CloudSixteen.com do not share, re-distribute or modify | ||
without permission of its author (kurozael@gmail.com). | ||
Clockwork was created by Conna Wiles (also known as kurozael.) | ||
http://cloudsixteen.com/license/clockwork.html | ||
--]] | ||
local COMMAND = Clockwork.command:New("DoorSetAllOwnable"); | ||
COMMAND.tip = "Set all doors ownable."; | ||
COMMAND.text = "<string Name>"; | ||
COMMAND.flags = CMD_DEFAULT; | ||
COMMAND.access = "a"; | ||
COMMAND.arguments = 1; | ||
-- Called when the command has been run. | ||
function COMMAND:OnRun(player, arguments) | ||
good_doors = 0; | ||
for k,v in pairs(ents.GetAll()) do | ||
if(IsValid(v) and Clockwork.entity:IsDoor(v)) then | ||
local data = { | ||
customName = true, | ||
position = v:GetPos(), | ||
entity = v, | ||
name = table.concat(arguments or {}, " ") or "" | ||
}; | ||
Clockwork.entity:SetDoorUnownable(data.entity, false); | ||
Clockwork.entity:SetDoorText(data.entity, false); | ||
Clockwork.entity:SetDoorName(data.entity, data.name); | ||
cwDoorCmds.doorData[data.entity] = data; | ||
cwDoorCmds:SaveDoorData(); | ||
good_doors = good_doors + 1; | ||
end | ||
end | ||
Clockwork.player:Notify(player, good_doors.." doors have been set ownable."); | ||
Clockwork.player:Notify(player, "Remember: This is ALL Doors!"); | ||
end; | ||
COMMAND:Register(); |
42 changes: 42 additions & 0 deletions
42
...ysmod/gamemodes/clockwork/plugins/doorcommands/plugin/commands/sh_doorsetallunownable.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
--[[ | ||
© 2015 CloudSixteen.com do not share, re-distribute or modify | ||
without permission of its author (kurozael@gmail.com). | ||
Clockwork was created by Conna Wiles (also known as kurozael.) | ||
http://cloudsixteen.com/license/clockwork.html | ||
--]] | ||
local COMMAND = Clockwork.command:New("DoorSetAllUnownable"); | ||
COMMAND.tip = "Set all doors unownable."; | ||
COMMAND.text = "<string Name>"; | ||
COMMAND.flags = CMD_DEFAULT; | ||
COMMAND.access = "a"; | ||
COMMAND.arguments = 1; | ||
-- Called when the command has been run. | ||
function COMMAND:OnRun(player, arguments) | ||
good_doors = 0; | ||
for k,v in pairs(ents.GetAll()) do | ||
if(IsValid(v) and Clockwork.entity:IsDoor(v)) then | ||
local data = { | ||
position = v:GetPos(), | ||
entity = v, | ||
text = arguments[2], | ||
name = arguments[1] | ||
}; | ||
Clockwork.entity:SetDoorName(data.entity, data.name); | ||
Clockwork.entity:SetDoorText(data.entity, data.text); | ||
Clockwork.entity:SetDoorUnownable(data.entity, true); | ||
cwDoorCmds.doorData[data.entity] = data; | ||
cwDoorCmds:SaveDoorData(); | ||
good_doors = good_doors + 1; | ||
end | ||
end | ||
Clockwork.player:Notify(player, good_doors.." doors have been set unownable."); | ||
Clockwork.player:Notify(player, "Remember: This is ALL Doors!"); | ||
end; | ||
COMMAND:Register(); |