From 9232b290cd5f9f48c8d57b2e419497ced327be6d Mon Sep 17 00:00:00 2001 From: Alexander Pickering Date: Thu, 31 Dec 2015 19:06:56 -0500 Subject: Added mas_sethp command --- gamemode/shared/system_admin.lua | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/gamemode/shared/system_admin.lua b/gamemode/shared/system_admin.lua index 09b223b..dfd0d66 100644 --- a/gamemode/shared/system_admin.lua +++ b/gamemode/shared/system_admin.lua @@ -47,6 +47,19 @@ if (SERVER) then end 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 + for k,v in pairs(player.GetAll()) do + if(v:Name():lower():find(arg[1]:lower())) then + v:SetHealth(arg[2]) + break; + end + end + end) + --Useage: mas_bring string_playername concommand.Add("mas_bring", function(pl,com,arg) if (!IsValid(pl) or !pl:IsAdmin()) then return end -- cgit v1.2.3-70-g09d2