Skip to content

Commit

Permalink
PERFORMANCE UPDATE
Browse files Browse the repository at this point in the history
PERFORMANCE UPDATE
  • Loading branch information
LeSiiN authored Mar 5, 2024
1 parent 201d176 commit c716999
Show file tree
Hide file tree
Showing 10 changed files with 180 additions and 534 deletions.
5 changes: 0 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
- Evidence can be checked via weapon_flashlight ( can be picked up )
- Criminals can remove evidence
- Also work when Player is using a Camera ( must be playing a specific animation )
- By using the Laserpointer near a Bullethole u can see the DrawLines of each shoot
- Evidence automatically removes after 45Min. (Performance thing)

# Commands ( OPTIONAL )
Expand Down Expand Up @@ -46,7 +45,6 @@ ensure lsn-evidence
```
rag = { name = 'rag', label = 'Rag', weight = 100, type = 'item', image = 'rag.png', unique = false, useable = true, shouldClose = true, combinable = nil, description = 'Could get Handy.' },
evidencecleaningkit = { name = 'evidencecleaningkit', label = 'Evidence Cleaning Kit', weight = 250, type = 'item', image = 'cleaningkit.png', unique = false, useable = true, shouldClose = true, combinable = nil, description = 'Cleans every Evidence near a police Officer.' },
policepointer = { name = 'policepointer', label = 'Laserpointer', weight = 250, type = 'item', image = 'laserpointer.png', unique = true, useable = true, shouldClose = true, combinable = nil, description = 'Can be placed inside Bulletholes.' },
```
</details>

Expand All @@ -55,7 +53,6 @@ policepointer = { name = 'policepointer', label = 'Laserpointer', weight
```
["rag"] = { ["name"] = 'rag', ["label"] = 'Rag', ["weight"] = 100, ["type"] = 'item', ["image"] = 'rag.png', ["unique"] = false, ["useable"] = true, ["shouldClose"] = true, ["combinable"] = nil, ["description"] = 'Could get Handy.' },
["evidencecleaningkit"] = { ["name"] = 'evidencecleaningkit', ["label"] = 'Evidence Cleaning Kit', ["weight"] = 250, ["type"] = 'item', ["image"] = 'cleaningkit.png', ["unique"] = false, ["useable"] = true, ["shouldClose"] = true, ["combinable"] = nil, ["description"] = 'Cleans every Evidence near a police Officer.' },
["policepointer"] = { ["name"] = 'policepointer', ["label"] = 'Laserpointer', ["weight"] = 250, ["type"] = 'item', ["image"] = 'laserpointer.png', ["unique"] = true, ["useable"] = true, ["shouldClose"] = true, ["combinable"] = nil, ["description"] = 'Can be placed inside Bulletholes.' },
```
</details>

Expand Down Expand Up @@ -226,8 +223,6 @@ examine_menu_bullet_b = "By examining the ammunition fragment you can determine
examine_menu_frags_h = "Vehicle fragment",
examine_menu_frags_b = "By examining the vehicle fragment you can determine the model and serial number of the vehicle",
```
# If using ox_inventory with qb-core or qbox do this:
- head to shared/weapons.lua and change the ammo type to match the ammo type in ox_inventory ox_inventory/data/weapons.lua.

## 💰 You can help me by Donating
[![BuyMeACoffee](https://img.shields.io/badge/Buy%20Me%20a%20Coffee-ffdd00?style=for-the-badge&logo=buy-me-a-coffee&logoColor=black)](https://buymeacoffee.com/LeSiiN)
Expand Down
652 changes: 178 additions & 474 deletions client/evidence.lua

Large diffs are not rendered by default.

37 changes: 0 additions & 37 deletions config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ Config = {}
Config.ShowShootersLine = true

---------[ If TRUE Police will create evidence aswell ]---------
---------[ If Config.PoliceCreatesEvidence on TRUE DrawLine will be Green if the shoot was from a Police Officer ]---------
Config.PoliceCreatesEvidence = true

---------[ Enable or Disable Commands ]---------
Expand All @@ -22,10 +21,6 @@ Config.Inventory = "qb" -- "qb" for qb/ps/lj-inventory or "ox" for ox_inve
---------[ WARNING: Dont make this to low, otherwise Cops cant really do anything to make a Report ]---------
Config.RemoveEvidence = 45

---------[ Change the Keybind to Pickup Evidence :// Use This -> https://docs.fivem.net/docs/game-references/controls/#control-types ]---------
Config.EvidencePickupButton = 38 -- 'E' key ('F' key = 23)
Config.EvidencePickupButtonString = 'E' -- Set the string of the key you choose here (for drawtext locale)


Config.AmmoLabels = {
['AMMO_PISTOL'] = '9x19mm',
Expand All @@ -36,38 +31,6 @@ Config.AmmoLabels = {
['AMMO_SNIPER'] = 'Large caliber',
}

---------[ Change the Colour of the Casing Markers ]---------
Config.CasingMarkerRGBA = {
r = 0,
g = 0,
b = 255,
a = 175,
}

---------[ Change the Colour of the Blooddrops Markers ]---------
Config.BloodMarkerRGBA = { --Change the Colour of the Blooddrops Markers
r = 255,
g = 0,
b = 0,
a = 175,
}

---------[ Change the Colour of the Fingerprint Markers ]---------
Config.FingerprintMarkerRGBA = { --Change the Colour of the Fingerprint Markers
r = 255,
g = 127,
b = 80,
a = 175,
}

---------[ Change the Colour of the Bullethole Markers ]---------
Config.BulletholeMarkerRGBA = { --Change the Colour of the Bullethole Markers
r = 160,
g = 32,
b = 240,
a = 255,
}

---------[ These are the Events that can be added to ANY Client to make people drop Finger/Blood Drops. ]---------
--TriggerServerEvent("evidence:server:CreateFingerDrop", pos)
--TriggerServerEvent('evidence:server:CreateBloodDrop', QBCore.Functions.GetPlayerData().citizenid, QBCore.Functions.GetPlayerData().metadata['bloodtype'], coords)
9 changes: 1 addition & 8 deletions locales/en.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ local Translations = {
no_player = 'No Player in reach!',
have_evidence_bag = 'You must have an empty evidence bag with you',
plate_nil = 'Plate is nil!',
drawLine_disabled = 'Laserpointer was removed!',
drawLine_enabled = 'Laserpointer was activated!',
drawLine_weapon_in_hand = 'Not while carrying a Weapon!',
drawLine_too_far_away = 'No Casings nearby!',
},
success = {
blood_clear = 'Blood Cleared',
Expand All @@ -23,13 +19,10 @@ local Translations = {
},
info = {
dna_sample = 'DNA Sample',
bullet_casing = '[~g~'..Config.EvidencePickupButtonString..'~s~] Pick up',
casing = 'Bullet Casing',
bullet = 'Bullet',
blood = 'Blood',
blood_text = '[~g~'..Config.EvidencePickupButtonString..'~s~] Pick up',
fingerprint_text = '[~g~'..Config.EvidencePickupButtonString..'~s~] Pick up',
vehicle_fragment = 'Vehicle Fragment',
vehiclefragment = 'Fragment',
fingerprint = 'Fingerprint',
player_id = 'ID of Player',
unknown = 'Unknown',
Expand Down
11 changes: 1 addition & 10 deletions server/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -230,15 +230,6 @@ QBCore.Functions.CreateUseableItem("evidencecleaningkit", function(source)
end
end
end)

if Config.ShowShootersLine then
QBCore.Functions.CreateUseableItem("policepointer", function(source)
local src = source
local Player = QBCore.Functions.GetPlayer(src)
if not Player then return end
TriggerClientEvent('evidence:client:toggleDrawLine', src)
end)
end
------------------------------------------------------------------------------[ EVENTS ]------------------------------------------------------------------------------

-----------------------------------------[ BLOOD ]-----------------------------------------
Expand Down Expand Up @@ -499,7 +490,7 @@ RegisterNetEvent('evidence:server:AddBulletToInventory', function(bulletholeId,
end
end)

-----------------------------------------[ VEHICLE FRAGMENTS ]-----------------------------------------
-----------------------------------------[ VEHICLE FRAGEMENTS ]-----------------------------------------
RegisterNetEvent('evidence:server:CreateVehicleFragment', function(weapon, raycastcoords, pedcoords, heading, currentTime, entityHit, r, g, b)
local src = source
local Player = QBCore.Functions.GetPlayer(src)
Expand Down
Binary file added stream/blooddrops.ytd
Binary file not shown.
Binary file added stream/bullethole.ytd
Binary file not shown.
Binary file added stream/casings.ytd
Binary file not shown.
Binary file added stream/fingerprints.ytd
Binary file not shown.
Binary file added stream/interact.ytd
Binary file not shown.

0 comments on commit c716999

Please sign in to comment.