Files
wnsrc/gamemodes/darkrp/plugins/showgeneticdescription.lua
lifestorm 94063e4369 Upload
2024-08-04 22:55:00 +03:00

43 lines
1.4 KiB
Lua

--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
local PLUGIN = PLUGIN
PLUGIN.name = "Show Genetic Description"
PLUGIN.author = "M!NT"
PLUGIN.description = "Adds /showgendesc command that will show the genetic description of the targeted character"
ix.command.Add("ShowGenDesc", {
description = "Show the genetic description of the player you are looking at",
OnRun = function(self, client)
local target = client:GetEyeTraceNoCursor().Entity
if (!IsValid(target) or !target:IsPlayer()) then
client:NotifyLocalized("Vous n'êtes pas en présence d'un joueur valide !")
else
local targetchar = target:GetCharacter()
local text =
"AGE : "..string.lower(targetchar:GetAge())..
" TAILLE : "..string.lower(targetchar:GetHeight())..
" YEUX : "..string.lower(targetchar:GetEyeColor())
net.Start("OnShowGeneticDescription")
net.WriteString(text)
net.Send(client)
end
end,
bNoIndicator = true
})
if (CLIENT) then
net.Receive("OnShowGeneticDescription", function()
local text = net.ReadString()
chat.AddText(Color(255,255,255), text)
end)
else
util.AddNetworkString("OnShowGeneticDescription")
end