From 5c4ebc932d8c02522802c842d43d863d89aca162 Mon Sep 17 00:00:00 2001 From: Apickx Date: Mon, 28 Dec 2015 19:10:44 -0500 Subject: Initial commit --- gamemode/server/concommands.lua | 66 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 gamemode/server/concommands.lua (limited to 'gamemode/server/concommands.lua') diff --git a/gamemode/server/concommands.lua b/gamemode/server/concommands.lua new file mode 100644 index 0000000..a6c891c --- /dev/null +++ b/gamemode/server/concommands.lua @@ -0,0 +1,66 @@ +concommand.Add("ws_giveitem",function(pl,com,args) + if (!IsValid(pl)) then return end + if (!pl:IsAdmin()) then return end + if (!args[1]) then return end + + pl:AddItem(args[1],tonumber(args[2] or 1)) +end) + +concommand.Add("ws_revive",function(pl,com,args) + if (IsValid(pl) and !pl:IsAdmin()) then return end + if (!args[1]) then return end + + for k,v in pairs(player.GetAll()) do + if (v:Nick():lower():find(args[1]) and v:IsPigeon()) then + v:ChatPrint("You have been resurrected from the dead by an admin!") + v:SetHuman(true) + v:KillSilent() + v:EmitSound("wintersurvival2/ritual/wololo.mp3") + end + end +end) + +--Manual generate a proprain, for debugging +concommand.Add("ws_proprain",function(ply,cmd,args) + if (IsValid(pl) and !pl:IsAdmin()) then return end + GAMEMODE:GeneratePropRain() +end) + +--Manual reload of items + recepies, usefull for testing +concommand.Add("ws_reloaditems",function(ply,cmd,args) + if (IsValid(pl) and !pl:IsAdmin()) then return end + GAMEMODE:LoadItems() +end) + +--Manual reload of npc's, usefull for testing +concommand.Add("ws_reloadnpcs",function(ply,cmd,args) + if (IsValid(pl) and !pl:IsAdmin()) then return end + GAMEMODE:LoadNPCS() +end) + +--Generate a nice HTML representation of all the recepies. +concommand.Add("ws_generaterecipes",function(pl,com,args) + if (IsValid(pl) and !pl:IsAdmin()) then return end + local filename = "ws_recipedata.txt" + for k,v in pairs(GAMEMODE.Recipes) do + if not v.Recipe then continue end + if not v.Name then continue end + file.Append(filename,"
  • \n\t\n
  • \n") + end +end) -- cgit v1.2.3-70-g09d2