mirror of
https://github.com/lifestorm/wnsrc.git
synced 2025-12-17 13:53:45 +03:00
Upload
This commit is contained in:
43
gamemodes/darkrp/plugins/showgeneticdescription.lua
Normal file
43
gamemodes/darkrp/plugins/showgeneticdescription.lua
Normal file
@@ -0,0 +1,43 @@
|
||||
--[[
|
||||
| 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
|
||||
Reference in New Issue
Block a user