Angel
she/her/they nonbinary transfem
- Joined
- Apr 26, 2016
- Messages
- 9,940
- Nebulae
- 8,986
@Zak & @Zombine watch out 'cause "Not a previous Clockwork Developer" has fucking arrived.
Either way...
First thing I did (not counting the Gmod Wiki Challenges):
Gist Link
Thanks to @Zombine for answering all my dumb ass questions and helping me a lot with this very simple, yet odd piece of lua.
Very simply, you can kill yourself by typing /kill and set your health and armor with /sethealth and /setarmor respectively.
It is capped at 100 for both armor and health.. and uh.. it prints shit when you do it.
Hopefully more to come!
Either way...
First thing I did (not counting the Gmod Wiki Challenges):
Gist Link
Code:
hook.Add("PlayerSay", "ChatCommands", function(client, text)
if (IsValid(client)) then
local PlayerSay = string.Explode(" ", text)
local amount = tonumber(PlayerSay[2])
if (PlayerSay[1]:lower() == "/kill") then
client:Kill()
client:ChatPrint("You killed yourself!")
return
end
if (amount < 0 or amount > 100) then
client:ChatPrint("You can only use values between 0 and 100!")
return
end
if (PlayerSay[1]:lower() == "/sethealth") then
client:SetHealth(amount)
client:ChatPrint("Your Health has been set to " .. amount)
elseif (PlayerSay[1]:lower() == "/setarmor") then
client:SetArmor(amount)
client:ChatPrint("Your Armor has been set to " .. amount)
end
end
end)
Very simply, you can kill yourself by typing /kill and set your health and armor with /sethealth and /setarmor respectively.
It is capped at 100 for both armor and health.. and uh.. it prints shit when you do it.
Hopefully more to come!
Reactions:
List