aboutsummaryrefslogtreecommitdiff
path: root/gamemode
diff options
context:
space:
mode:
Diffstat (limited to 'gamemode')
-rw-r--r--gamemode/itemsystem/items/runeexplosive.lua2
-rw-r--r--gamemode/shared/system_admin.lua52
2 files changed, 43 insertions, 11 deletions
diff --git a/gamemode/itemsystem/items/runeexplosive.lua b/gamemode/itemsystem/items/runeexplosive.lua
index 35b280f..9718fab 100644
--- a/gamemode/itemsystem/items/runeexplosive.lua
+++ b/gamemode/itemsystem/items/runeexplosive.lua
@@ -49,8 +49,8 @@ function ITEM:OnUse(user)
user:TakeDamage(40)
end
end
+ if(CLIENT) then return end
user:RemoveItem(self.Name,1)
- if(CLIENT) then return end
local exp = ents.Create("env_explosion")
exp:SetPos(user:GetPos())
exp:Fire("Explode","",0)
diff --git a/gamemode/shared/system_admin.lua b/gamemode/shared/system_admin.lua
index 9d748f6..a0e90cc 100644
--- a/gamemode/shared/system_admin.lua
+++ b/gamemode/shared/system_admin.lua
@@ -38,83 +38,115 @@ if (SERVER) then
--Useage: mas_goto string_playername
concommand.Add("mas_goto", function(pl,com,arg)
if (!IsValid(pl) or !pl:IsAdmin()) then return end
- if(!arg[1]) then return end
+ if(!arg[1]) then
+ print("Usage: mas_goto string_playername")
+ return
+ end
for k,v in pairs(player.GetAll()) do
if(v:Name():lower():find(arg[1]:lower())) then
pl:SetPos(v:GetPos()+(v:GetUp()*72))
- break;
+ return
end
end
+ print("Player not found" .. arg[1])
end)
--Useage: mas_sethp string_playername number_health
--Spawn health is 100
concommand.Add("mas_sethp", function(pl,com,arg)
if (!IsValid(pl) or !pl:IsAdmin()) then return end
- if(!arg[1]) then return end
+ if(!arg[1] or !arg[2]) then
+ print("Usage: mas_sethp string_playername number_health")
+ return
+ end
for k,v in pairs(player.GetAll()) do
if(v:Name():lower():find(arg[1]:lower())) then
v:SetHealth(arg[2])
- break;
+ return
end
end
+ print("Player not found" .. arg[1])
end)
--Useage: mas_bring string_playername
concommand.Add("mas_bring", function(pl,com,arg)
if (!IsValid(pl) or !pl:IsAdmin()) then return end
- if(!arg[1]) then return end
+ if(!arg[1]) then
+ print("Usage: mas_bring string_playername")
+ return
+ end
for k,v in pairs(player.GetAll()) do
if(v:Name():lower():find(arg[1]:lower())) then
v:SetPos(pl:GetPos()+(pl:GetUp()*72))
- break;
+ return
end
end
+ print("Player not found" .. arg[1])
end)
--Useage: mas_god string_playername
--Note: all bars will still tick up, but no dammage will be taken
concommand.Add("mas_god", function(pl,com,arg)
if (!IsValid(pl) or !pl:IsAdmin()) then return end
- if(!arg[1]) then return end
+ if(!arg[1]) then
+ print("Usage: mas_god string_playername")
+ return
+ end
for k,v in pairs(player.GetAll()) do
if(v:Name():lower():find(arg[1]:lower())) then
v:GodEnable()
+ return
end
end
+ print("Player not found" .. arg[1])
end)
--Useage: mas_ungod string_playername
concommand.Add("mas_ungod", function(pl,com,arg)
if (!IsValid(pl) or !pl:IsAdmin()) then return end
- if(!arg[1]) then return end
+ if(!arg[1]) then
+ print("Usage: mas_ungod string_playername")
+ return
+ end
for k,v in pairs(player.GetAll()) do
if(v:Name():lower():find(arg[1]:lower())) then
v:GodDisable()
+ return
end
end
+ print("Player not found" .. arg[1])
end)
--Useage: mas_vanish string_playername
concommand.Add("mas_vanish", function(pl,com,arg)
if (!IsValid(pl) or !pl:IsAdmin()) then return end
- if(!arg[1]) then return end
+ if(!arg[1]) then
+ print("Usage: mas_vanish string_playername")
+ return
+ end
for k,v in pairs(player.GetAll()) do
if(v:Name():lower():find(arg[1]:lower())) then
v:SetColor(Color(0,0,0,0))
+ return
end
end
+ print("Player not found" .. arg[1])
end)
--Useage: mas_unvanish string_playername
concommand.Add("mas_unvanish", function(pl,com,arg)
if (!IsValid(pl) or !pl:IsAdmin()) then return end
- if(!arg[1]) then return end
+ if(!arg[1]) then
+ print("Usage: mas_unvanish string_playername")
+ return
+ end
for k,v in pairs(player.GetAll()) do
if(v:Name():lower():find(arg[1]:lower())) then
v:SetColor(Color(255,255,255,255))
+ return
end
end
+ print("Player not found" .. arg[1])
end)
--Useage: mas_bansteamid string_steamid number_time string_reason