mirror of
https://github.com/Michatec/wk_wars2x.git
synced 2026-04-01 00:16:27 +02:00
Updated file tagging, moved function
This commit is contained in:
@@ -1,16 +1,16 @@
|
|||||||
--[[-----------------------------------------------------------------------
|
--[[-----------------------------------------------------------------------
|
||||||
|
|
||||||
Wraith Radar System - v2.0.0
|
Wraith ARS 2X - v1.0.0
|
||||||
Created by WolfKnight
|
Created by WolfKnight
|
||||||
|
|
||||||
-----------------------------------------------------------------------]]--
|
-----------------------------------------------------------------------]]--
|
||||||
|
|
||||||
resource_manifest_version '44febabe-d386-4d18-afbe-5e627f4af937'
|
resource_manifest_version '44febabe-d386-4d18-afbe-5e627f4af937'
|
||||||
|
|
||||||
name 'WraithRS 2'
|
name 'Wraith ARS 2X'
|
||||||
description 'An advanced radar system for FiveM'
|
description 'An advanced radar system for FiveM'
|
||||||
author 'WolfKnight'
|
author 'WolfKnight'
|
||||||
version '2.0.0'
|
version '1.0.0'
|
||||||
|
|
||||||
ui_page "nui/radar.html"
|
ui_page "nui/radar.html"
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
--[[------------------------------------------------------------------------
|
--[[------------------------------------------------------------------------
|
||||||
|
|
||||||
Wraith Radar System - v2.0.0
|
Wraith ARS 2X - v1.0.0
|
||||||
Created by WolfKnight
|
Created by WolfKnight
|
||||||
|
|
||||||
------------------------------------------------------------------------]]--
|
------------------------------------------------------------------------]]--
|
||||||
|
|||||||
17
cl_utils.lua
17
cl_utils.lua
@@ -1,6 +1,6 @@
|
|||||||
--[[-----------------------------------------------------------------------
|
--[[-----------------------------------------------------------------------
|
||||||
|
|
||||||
Wraith Radar System - v2.0.0
|
Wraith ARS 2X - v1.0.0
|
||||||
Created by WolfKnight
|
Created by WolfKnight
|
||||||
|
|
||||||
-----------------------------------------------------------------------]]--
|
-----------------------------------------------------------------------]]--
|
||||||
@@ -11,13 +11,9 @@ function UTIL:Round( num, numDecimalPlaces )
|
|||||||
return tonumber( string.format( "%." .. ( numDecimalPlaces or 0 ) .. "f", num ) )
|
return tonumber( string.format( "%." .. ( numDecimalPlaces or 0 ) .. "f", num ) )
|
||||||
end
|
end
|
||||||
|
|
||||||
function UTIL:OppositeAngle( ang )
|
-- function UTIL:FormatSpeed( speed )
|
||||||
return ( ang + 180 ) % 360
|
-- return string.format( "%03d", speed )
|
||||||
end
|
-- end
|
||||||
|
|
||||||
function UTIL:FormatSpeed( speed )
|
|
||||||
return string.format( "%03d", speed )
|
|
||||||
end
|
|
||||||
|
|
||||||
function UTIL:Clamp( val, min, max )
|
function UTIL:Clamp( val, min, max )
|
||||||
if ( val < min ) then
|
if ( val < min ) then
|
||||||
@@ -46,7 +42,6 @@ function UTIL:Values( xs )
|
|||||||
return xs[i]
|
return xs[i]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
function UTIL:GetVehicleInDirection( entFrom, coordFrom, coordTo )
|
function UTIL:GetVehicleInDirection( entFrom, coordFrom, coordTo )
|
||||||
local rayHandle = StartShapeTestCapsule( coordFrom.x, coordFrom.y, coordFrom.z, coordTo.x, coordTo.y, coordTo.z, 20.0, 10, entFrom, 7 )
|
local rayHandle = StartShapeTestCapsule( coordFrom.x, coordFrom.y, coordFrom.z, coordTo.x, coordTo.y, coordTo.z, 20.0, 10, entFrom, 7 )
|
||||||
@@ -54,6 +49,10 @@ function UTIL:GetVehicleInDirection( entFrom, coordFrom, coordTo )
|
|||||||
return vehicle
|
return vehicle
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function UTIL:OppositeAngle( ang )
|
||||||
|
return ( ang + 180 ) % 360
|
||||||
|
end
|
||||||
|
|
||||||
function UTIL:IsEntityInMyHeading( myAng, tarAng, angToCheck )
|
function UTIL:IsEntityInMyHeading( myAng, tarAng, angToCheck )
|
||||||
local rangeStartFront = myAng - ( angToCheck / 2 )
|
local rangeStartFront = myAng - ( angToCheck / 2 )
|
||||||
local rangeEndFront = myAng + ( angToCheck / 2 )
|
local rangeEndFront = myAng + ( angToCheck / 2 )
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
--[[------------------------------------------------------------------------
|
--[[------------------------------------------------------------------------
|
||||||
|
|
||||||
Wraith Radar System - v2.0.0
|
Wraith ARS 2X - v1.0.0
|
||||||
Created by WolfKnight
|
Created by WolfKnight
|
||||||
|
|
||||||
------------------------------------------------------------------------]]--
|
------------------------------------------------------------------------]]--
|
||||||
|
|||||||
Reference in New Issue
Block a user