Files
wnsrc/gamemodes/darkrp/plugins/waypoints/libs/sv_waypoint.lua
lifestorm 73479cff9e Upload
2024-08-04 22:55:00 +03:00

35 lines
835 B
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/
--]]
ix.waypoint = ix.waypoint or {}
ix.waypoint.types = ix.waypoint.types or {}
local PLUGIN = PLUGIN
function ix.waypoint.AddWaypoint(position, text, color, time, addedBy, ...)
if (!position or !isvector(position) or !position.Add) then
ErrorNoHalt("[WAYPOINTS] Position invalide donnée "..(position or nil))
return
end
position:Add(Vector(0, 0, 30))
color = color or color_white
time = time or 8
local waypoint = {
pos = position,
text = text,
color = color,
addedBy = addedBy,
arguments = {...},
time = CurTime() + time
}
PLUGIN:AddWaypoint(waypoint)
end