Updated file tagging, moved function

This commit is contained in:
Dan
2019-11-18 21:16:21 +00:00
parent f98fd71904
commit 8ff0662aa3
4 changed files with 13 additions and 14 deletions

View File

@@ -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"

View File

@@ -1,6 +1,6 @@
--[[------------------------------------------------------------------------ --[[------------------------------------------------------------------------
Wraith Radar System - v2.0.0 Wraith ARS 2X - v1.0.0
Created by WolfKnight Created by WolfKnight
------------------------------------------------------------------------]]-- ------------------------------------------------------------------------]]--

View File

@@ -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
@@ -47,13 +43,16 @@ function UTIL:Values( xs )
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 )
local _, hitEntity, endCoords, surfaceNormal, vehicle = GetShapeTestResult( rayHandle ) local _, hitEntity, endCoords, surfaceNormal, vehicle = GetShapeTestResult( rayHandle )
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 )

View File

@@ -1,6 +1,6 @@
--[[------------------------------------------------------------------------ --[[------------------------------------------------------------------------
Wraith Radar System - v2.0.0 Wraith ARS 2X - v1.0.0
Created by WolfKnight Created by WolfKnight
------------------------------------------------------------------------]]-- ------------------------------------------------------------------------]]--