mirror of
https://github.com/lifestorm/wnsrc.git
synced 2025-12-16 21:33:46 +03:00
43 lines
1.4 KiB
Lua
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 |