mirror of
https://github.com/lifestorm/wnsrc.git
synced 2025-12-17 21:53:46 +03:00
Upload
This commit is contained in:
57
gamemodes/darkrp/plugins/bird/cl_plugin.lua
Normal file
57
gamemodes/darkrp/plugins/bird/cl_plugin.lua
Normal file
@@ -0,0 +1,57 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
|
||||
net.Receive("toggleBuildingNest", function()
|
||||
LocalPlayer().isBuildingNest = net.ReadBool()
|
||||
end)
|
||||
|
||||
local blocked = {}
|
||||
|
||||
net.Receive("BirdMountRequest", function()
|
||||
local client = net.ReadEntity()
|
||||
|
||||
if (blocked[client]) then
|
||||
net.Start("BirdMountDecline")
|
||||
net.SendToServer()
|
||||
|
||||
return
|
||||
end
|
||||
|
||||
local name = hook.Run("GetCharacterName", client, "ic") or client:GetName()
|
||||
local panel = Derma_Query(name .. " is trying to land on you. Will you let it do that?", "Bird Mount Request",
|
||||
"Allow", function()
|
||||
net.Start("BirdMountAllow")
|
||||
net.SendToServer()
|
||||
end,
|
||||
"Decline", function()
|
||||
net.Start("BirdMountDecline")
|
||||
net.SendToServer()
|
||||
end,
|
||||
"Block", function()
|
||||
net.Start("BirdMountDecline")
|
||||
net.SendToServer()
|
||||
|
||||
blocked[client] = true
|
||||
end)
|
||||
|
||||
timer.Simple(30, function()
|
||||
if (IsValid(panel)) then
|
||||
panel:Remove()
|
||||
|
||||
net.Start("BirdMountTimeout")
|
||||
net.SendToServer()
|
||||
end
|
||||
end)
|
||||
end)
|
||||
|
||||
net.Receive("birdEggHatch", function()
|
||||
vgui.Create("ixbirdEggHatch")
|
||||
end)
|
||||
Reference in New Issue
Block a user