Skip to content

Commit

Permalink
General updates + lang fixes
Browse files Browse the repository at this point in the history
Added ability to copy vector3 coords while using free aim tool
  • Loading branch information
GhzGarage committed Nov 7, 2023
1 parent 42a2bf8 commit d5c189a
Show file tree
Hide file tree
Showing 22 changed files with 4,285 additions and 4,280 deletions.
90 changes: 45 additions & 45 deletions client/blipsnames.lua
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,21 @@ RegisterNetEvent('qb-admin:client:toggleBlips', function()
if not ShowBlips then
ShowBlips = true
NetCheck1 = true
QBCore.Functions.Notify(Lang:t("success.blips_activated"), "success")
QBCore.Functions.Notify(Lang:t('success.blips_activated'), 'success')
else
ShowBlips = false
QBCore.Functions.Notify(Lang:t("error.blips_deactivated"), "error")
QBCore.Functions.Notify(Lang:t('error.blips_deactivated'), 'error')
end
end)

RegisterNetEvent('qb-admin:client:toggleNames', function()
if not ShowNames then
ShowNames = true
NetCheck2 = true
QBCore.Functions.Notify(Lang:t("success.names_activated"), "success")
QBCore.Functions.Notify(Lang:t('success.names_activated'), 'success')
else
ShowNames = false
QBCore.Functions.Notify(Lang:t("error.names_deactivated"), "error")
QBCore.Functions.Notify(Lang:t('error.names_deactivated'), 'error')
end
end)

Expand All @@ -40,18 +40,18 @@ RegisterNetEvent('qb-admin:client:Show', function(players)
local playeridx = GetPlayerFromServerId(player.id)
local ped = GetPlayerPed(playeridx)
local blip = GetBlipFromEntity(ped)
local name = 'ID: '..player.id..' | '..player.name
local name = 'ID: ' .. player.id .. ' | ' .. player.name

local Tag = CreateFakeMpGamerTag(ped, name, false, false, "", false)
SetMpGamerTagAlpha(Tag, 0, 255) -- Sets "MP_TAG_GAMER_NAME" bar alpha to 100% (not needed just as a fail safe)
SetMpGamerTagAlpha(Tag, 2, 255) -- Sets "MP_TAG_HEALTH_ARMOUR" bar alpha to 100%
SetMpGamerTagAlpha(Tag, 4, 255) -- Sets "MP_TAG_AUDIO_ICON" bar alpha to 100%
SetMpGamerTagAlpha(Tag, 6, 255) -- Sets "MP_TAG_PASSIVE_MODE" bar alpha to 100%
SetMpGamerTagHealthBarColour(Tag, 25) --https://wiki.rage.mp/index.php?title=Fonts_and_Colors
local Tag = CreateFakeMpGamerTag(ped, name, false, false, '', false)
SetMpGamerTagAlpha(Tag, 0, 255) -- Sets "MP_TAG_GAMER_NAME" bar alpha to 100% (not needed just as a fail safe)
SetMpGamerTagAlpha(Tag, 2, 255) -- Sets "MP_TAG_HEALTH_ARMOUR" bar alpha to 100%
SetMpGamerTagAlpha(Tag, 4, 255) -- Sets "MP_TAG_AUDIO_ICON" bar alpha to 100%
SetMpGamerTagAlpha(Tag, 6, 255) -- Sets "MP_TAG_PASSIVE_MODE" bar alpha to 100%
SetMpGamerTagHealthBarColour(Tag, 25) --https://wiki.rage.mp/index.php?title=Fonts_and_Colors

if ShowNames then
SetMpGamerTagVisibility(Tag, 0, true) -- Activates the player ID Char name and FiveM name
SetMpGamerTagVisibility(Tag, 2, true) -- Activates the health (and armor if they have it on) bar below the player names
SetMpGamerTagVisibility(Tag, 0, true) -- Activates the player ID Char name and FiveM name
SetMpGamerTagVisibility(Tag, 2, true) -- Activates the health (and armor if they have it on) bar below the player names
if NetworkIsPlayerTalking(playeridx) then
SetMpGamerTagVisibility(Tag, 4, true) -- If player is talking a voice icon will show up on the left side of the name
else
Expand Down Expand Up @@ -83,104 +83,104 @@ RegisterNetEvent('qb-admin:client:Show', function(players)
--Payer Death
if not GetEntityHealth(ped) then
if blipSprite ~= 274 then
SetBlipSprite(blip, 274) --Dead icon
SetBlipSprite(blip, 274) --Dead icon
ShowHeadingIndicatorOnBlip(blip, false)
end
--Player in Vehicle
--Player in Vehicle
elseif veh ~= 0 then
local classveh = GetVehicleClass(veh)
local modelveh = GetEntityModel(veh)
--MotorCycles (8) or Cycles (13)
if classveh == 8 or classveh == 13 then
if classveh == 8 or classveh == 13 then
if blipSprite ~= 226 then
SetBlipSprite(blip, 226) --Motorcycle icon
SetBlipSprite(blip, 226) --Motorcycle icon
ShowHeadingIndicatorOnBlip(blip, false)
end
--OffRoad (9)
--OffRoad (9)
elseif classveh == 9 then
if blipSprite ~= 757 then
SetBlipSprite(blip, 757) --OffRoad icon
SetBlipSprite(blip, 757) --OffRoad icon
ShowHeadingIndicatorOnBlip(blip, false)
end
--Industrial (10)
--Industrial (10)
elseif classveh == 10 then
if blipSprite ~= 477 then
SetBlipSprite(blip, 477) --Truck icon
SetBlipSprite(blip, 477) --Truck icon
ShowHeadingIndicatorOnBlip(blip, false)
end
--Utility (11)
--Utility (11)
elseif classveh == 11 then
if blipSprite ~= 477 then
SetBlipSprite(blip, 477) --Truck icon despite finding better one
SetBlipSprite(blip, 477) --Truck icon despite finding better one
ShowHeadingIndicatorOnBlip(blip, false)
end
--Vans (12)
--Vans (12)
elseif classveh == 12 then
if blipSprite ~= 67 then
SetBlipSprite(blip, 67) --Van icon
SetBlipSprite(blip, 67) --Van icon
ShowHeadingIndicatorOnBlip(blip, false)
end
--Boats (14)
--Boats (14)
elseif classveh == 14 then
if blipSprite ~= 427 then
SetBlipSprite(blip, 427) --Boat icon
SetBlipSprite(blip, 427) --Boat icon
ShowHeadingIndicatorOnBlip(blip, false)
end
--Helicopters (15)
--Helicopters (15)
elseif classveh == 15 then
if blipSprite ~= 422 then
SetBlipSprite(blip, 422) --Moving helicopter icon
SetBlipSprite(blip, 422) --Moving helicopter icon
ShowHeadingIndicatorOnBlip(blip, false)
end
--Planes (16)
--Planes (16)
elseif classveh == 16 then
if modelveh == 'besra' or modelveh == 'hydra' or modelveh == 'lazer' then
if blipSprite ~= 424 then
SetBlipSprite(blip, 424) --Jet icon
SetBlipSprite(blip, 424) --Jet icon
ShowHeadingIndicatorOnBlip(blip, false)
end
elseif blipSprite ~= 423 then
SetBlipSprite(blip, 423) --Plane icon
SetBlipSprite(blip, 423) --Plane icon
ShowHeadingIndicatorOnBlip(blip, false)
end
--Service (17)
--Service (17)
elseif classveh == 17 then
if blipSprite ~= 198 then
SetBlipSprite(blip, 198) --Taxi icon
SetBlipSprite(blip, 198) --Taxi icon
ShowHeadingIndicatorOnBlip(blip, false)
end
--Emergency (18)
--Emergency (18)
elseif classveh == 18 then
if blipSprite ~= 56 then
SetBlipSprite(blip, 56) --Cop icon
SetBlipSprite(blip, 56) --Cop icon
ShowHeadingIndicatorOnBlip(blip, false)
end
--Military (19)
--Military (19)
elseif classveh == 19 then
if modelveh == 'rhino' then
if blipSprite ~= 421 then
SetBlipSprite(blip, 421) --Tank icon
SetBlipSprite(blip, 421) --Tank icon
ShowHeadingIndicatorOnBlip(blip, false)
end
elseif blipSprite ~= 750 then
SetBlipSprite(blip, 750) --Military truck icon
SetBlipSprite(blip, 750) --Military truck icon
ShowHeadingIndicatorOnBlip(blip, false)
end
--Commercial (20)
--Commercial (20)
elseif classveh == 20 then
if blipSprite ~= 477 then
SetBlipSprite(blip, 477) --Truck icon
SetBlipSprite(blip, 477) --Truck icon
ShowHeadingIndicatorOnBlip(blip, false)
end
--Every car (0, 1, 2, 3, 4, 5, 6, 7)
--Every car (0, 1, 2, 3, 4, 5, 6, 7)
else
if modelveh == 'insurgent' or modelveh == 'insurgent2' or modelveh == 'limo2' then
if blipSprite ~= 426 then
SetBlipSprite(blip, 426) --Armed car icon
SetBlipSprite(blip, 426) --Armed car icon
ShowHeadingIndicatorOnBlip(blip, false)
end
elseif blipSprite ~= 225 then
SetBlipSprite(blip, 225) --Car icon
SetBlipSprite(blip, 225) --Car icon
ShowHeadingIndicatorOnBlip(blip, true)
end
end
Expand All @@ -194,7 +194,7 @@ RegisterNetEvent('qb-admin:client:Show', function(players)
else
HideNumberOnBlip(blip)
end
--Player on Foot
--Player on Foot
else
HideNumberOnBlip(blip)
if blipSprite ~= 1 then
Expand Down
Loading

0 comments on commit d5c189a

Please sign in to comment.