Initial commit
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
resource_manifest_version '05cfa83c-a124-4cfa-a768-c24a5811d8f9'
|
||||
|
||||
client_script 'client.lua'
|
||||
@@ -0,0 +1,61 @@
|
||||
-- FiveM Above Head ID/Name Client Script
|
||||
|
||||
local showPlayerBlips = false
|
||||
local ignorePlayerNameDistance = false
|
||||
local disPlayerNames = 12.5
|
||||
local playerSource = 0
|
||||
|
||||
function DrawText3D(x,y,z, text) -- some useful function, use it if you want!
|
||||
local onScreen,_x,_y=World3dToScreen2d(x,y,z)
|
||||
local px,py,pz=table.unpack(GetGameplayCamCoords())
|
||||
local dist = GetDistanceBetweenCoords(px,py,pz, x,y,z, 1)
|
||||
|
||||
local scale = (1/dist)*2
|
||||
local fov = (1/GetGameplayCamFov())*100
|
||||
local scale = scale*fov
|
||||
|
||||
if onScreen then
|
||||
SetTextScale(0.0*scale, 0.55*scale)
|
||||
SetTextFont(4)
|
||||
SetTextProportional(1)
|
||||
-- SetTextScale(0.0, 0.55)
|
||||
SetTextColour(255, 255, 255, 255)
|
||||
SetTextDropshadow(0, 0, 0, 0, 255)
|
||||
SetTextEdge(2, 0, 0, 0, 225)
|
||||
SetTextDropShadow()
|
||||
SetTextOutline()
|
||||
SetTextEntry("STRING")
|
||||
SetTextCentre(1)
|
||||
AddTextComponentString(text)
|
||||
DrawText(_x,_y)
|
||||
end
|
||||
end
|
||||
|
||||
Citizen.CreateThread(function()
|
||||
while true do
|
||||
for i=0,99 do
|
||||
N_0x31698aa80e0223f8(i)
|
||||
end
|
||||
for id = 0, 31 do
|
||||
if ((NetworkIsPlayerActive( id )) and GetPlayerPed( id ) ~= GetPlayerPed( -1 )) then
|
||||
ped = GetPlayerPed( id )
|
||||
blip = GetBlipFromEntity( ped )
|
||||
|
||||
x1, y1, z1 = table.unpack( GetEntityCoords( GetPlayerPed( -1 ), true ) )
|
||||
x2, y2, z2 = table.unpack( GetEntityCoords( GetPlayerPed( id ), true ) )
|
||||
distance = math.floor(GetDistanceBetweenCoords(x1, y1, z1, x2, y2, z2, true))
|
||||
|
||||
if(ignorePlayerNameDistance) then
|
||||
DrawText3D(x2, y2, z2+1, GetPlayerServerId(id) .. "~r~ | ~w~" .. string.sub(GetPlayerName(id), 1, 50))
|
||||
end
|
||||
|
||||
if ((distance < disPlayerNames)) then
|
||||
if not (ignorePlayerNameDistance) then
|
||||
DrawText3D(x2, y2, z2+1, GetPlayerServerId(id) .. "~r~ | ~w~" .. string.sub(GetPlayerName(id), 1, 50))
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
Citizen.Wait(0)
|
||||
end
|
||||
end)
|
||||
@@ -0,0 +1,91 @@
|
||||
-- FiveM Above Head ID/Name Client Script
|
||||
|
||||
local showPlayerBlips = false
|
||||
local ignorePlayerNameDistance = false
|
||||
local disPlayerNames = 12.5
|
||||
local playerSource = 0
|
||||
|
||||
function DrawText3D(x,y,z, text) -- some useful function, use it if you want!
|
||||
local onScreen,_x,_y=World3dToScreen2d(x,y,z)
|
||||
local px,py,pz=table.unpack(GetGameplayCamCoords())
|
||||
local dist = GetDistanceBetweenCoords(px,py,pz, x,y,z, 1)
|
||||
|
||||
local scale = (1/dist)*2
|
||||
local fov = (1/GetGameplayCamFov())*100
|
||||
local scale = scale*fov
|
||||
|
||||
if onScreen then
|
||||
SetTextScale(0.0*scale, 0.55*scale)
|
||||
SetTextFont(4)
|
||||
SetTextProportional(1)
|
||||
-- SetTextScale(0.0, 0.55)
|
||||
SetTextColour(255, 255, 255, 255)
|
||||
SetTextDropshadow(0, 0, 0, 0, 255)
|
||||
SetTextEdge(2, 0, 0, 0, 225)
|
||||
SetTextDropShadow()
|
||||
SetTextOutline()
|
||||
SetTextEntry("STRING")
|
||||
SetTextCentre(1)
|
||||
AddTextComponentString(text)
|
||||
DrawText(_x,_y)
|
||||
end
|
||||
end
|
||||
|
||||
Citizen.CreateThread(function()
|
||||
while true do
|
||||
for i=0,99 do
|
||||
N_0x31698aa80e0223f8(i)
|
||||
end
|
||||
for id = 0, 31 do
|
||||
if ((NetworkIsPlayerActive( id )) and GetPlayerPed( id ) ~= GetPlayerPed( -1 )) then
|
||||
ped = GetPlayerPed( id )
|
||||
blip = GetBlipFromEntity( ped )
|
||||
|
||||
x1, y1, z1 = table.unpack( GetEntityCoords( GetPlayerPed( -1 ), true ) )
|
||||
x2, y2, z2 = table.unpack( GetEntityCoords( GetPlayerPed( id ), true ) )
|
||||
distance = math.floor(GetDistanceBetweenCoords(x1, y1, z1, x2, y2, z2, true))
|
||||
|
||||
if(ignorePlayerNameDistance) and (isafk == false) then
|
||||
DrawText3D(x2, y2, z2+1, GetPlayerServerId(id) .. "~r~ | ~w~" .. string.sub(GetPlayerName(id), 1, 50))
|
||||
end
|
||||
|
||||
elseif(ignorePlayerNameDistance) and (isafk == true) then
|
||||
DrawText3D(x2, y2, z2+1, "~r~[AFK] ~w~" .. GetPlayerServerId(id) .. "~r~ | ~w~" .. string.sub(GetPlayerName(id), 1, 50))
|
||||
end
|
||||
|
||||
if ((distance < disPlayerNames)) and (isafk == false) then
|
||||
if not (ignorePlayerNameDistance) then
|
||||
DrawText3D(x2, y2, z2+1, GetPlayerServerId(id) .. "~r~ | ~w~" .. string.sub(GetPlayerName(id), 1, 50))
|
||||
end
|
||||
end
|
||||
elseif ((distance < disPlayerNames)) and (isafk == true) then
|
||||
if not (ignorePlayerNameDistance) then
|
||||
DrawText3D(x2, y2, z2+1, "~r~[AFK] ~w~" .. GetPlayerServerId(id) .. "~r~ | ~w~" .. string.sub(GetPlayerName(id), 1, 50))
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
Citizen.Wait(0)
|
||||
end
|
||||
end)
|
||||
|
||||
function toggleAFK()
|
||||
if(isafk == nil) then
|
||||
isafk = true
|
||||
end
|
||||
|
||||
if(isafk == true) then
|
||||
isafk = false
|
||||
end
|
||||
|
||||
if(isafk == false) then
|
||||
isafk = true
|
||||
end
|
||||
end
|
||||
|
||||
RegisterCommand('afk', function()
|
||||
toggleAFK()
|
||||
end, false)
|
||||
|
||||
--Register the /afk command
|
||||
TriggerEvent('chat:addSuggestion', '/afk', 'Toggle AFK above your nametag.')
|
||||
@@ -0,0 +1,2 @@
|
||||
resource_manifest_version "44febabe-d386-4d18-afbe-5e627f4af937"
|
||||
this_is_a_map 'yes'
|
||||
@@ -0,0 +1,2 @@
|
||||
use openiv to edit ytd "lafa2k_animation.ytd" file.
|
||||
mods\update\x64\dlcpacks\lafa2k_animated\dlc.rpf\x64\levels\gta5\lafa2k_animated\props.rpf\
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,9 @@
|
||||
resource_manifest_version '44febabe-d386-4d18-afbe-5e627f4af937'
|
||||
|
||||
title 'Auto Announcements'
|
||||
author 'Rage_YouTube'
|
||||
|
||||
client_scripts {
|
||||
'config.lua',
|
||||
'client.lua'
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
--============================================================
|
||||
-- Please do not touch or edit any of this code, unless your =
|
||||
-- smarter than me and know what your doing. Thanks <3 =======
|
||||
--============================================================
|
||||
|
||||
local delay = config.delay * 60000
|
||||
local prefix = config.prefix
|
||||
local messages = config.messages
|
||||
|
||||
Citizen.CreateThread(function()
|
||||
while true do
|
||||
for a = 1, #config.messages do
|
||||
TriggerEvent('chat:addMessage', {args = { prefix .. messages[a] }})
|
||||
Citizen.Wait(delay)
|
||||
end
|
||||
Citizen.Wait(0)
|
||||
end
|
||||
end)
|
||||
@@ -0,0 +1,24 @@
|
||||
config = {}
|
||||
|
||||
-- The delay is in minutes, so 10 will be 10 minutes.
|
||||
config.delay = 10
|
||||
|
||||
-- If you understand color coding in text, you will know what the ^[NumberHere] is for, otherwise refer to the guide on the page.
|
||||
config.prefix = '^*^8[Announcement] ^7'
|
||||
|
||||
--===================================================================
|
||||
-- Add any message you want within the '' This is an unlimited list =
|
||||
-- so you can add as many messages as you want, make sure ===========
|
||||
-- to use , after '' before the last message on the list. ===========
|
||||
--===================================================================
|
||||
config.messages = {
|
||||
'CAD is a requirement on our server! You can join by heading to: cad.elite-gaming.co.uk',
|
||||
'Join our discord for news and updates by using /discord! (discord.gg/2XvwvgR)',
|
||||
'Any suggestions are welcome to be shared at our Elite Gaming RP discord server!',
|
||||
'Want to apply for a job? Head over to: forum.elite-gaming.co.uk and apply for a role today!',
|
||||
'Did you know we have over 50+ add-on interiors around the map!',
|
||||
'Need help around the server? Head over to our discord to access the #server-faq channel which has useful guides!',
|
||||
'The AOP can be found next to the minimap, which shows where the Area Of Patrol is currently located.'
|
||||
'Server Status can be found on our discord through Elite Bot!'
|
||||
'We have move EGRP into the main EGUK discord. Make sure to join the EGUK discord through: discord.gg/2XvwvgR'
|
||||
}
|
||||
@@ -0,0 +1,162 @@
|
||||
local vehicle = nil
|
||||
local isDriver = false
|
||||
local fTractionLossMult = nil
|
||||
local isModed = false
|
||||
local class = nil
|
||||
local isBlacklisted = false
|
||||
|
||||
local classMod = {
|
||||
[0]= 2.51, -- Compacts
|
||||
[1] = 2.51, --Sedans
|
||||
[2] = 1.01, --SUVs
|
||||
[3] = 2.51, --Coupes
|
||||
[4] = 2.501, --Muscle
|
||||
[5] = 2.51, --Sports Classics
|
||||
[6] = 2.51, --Sports
|
||||
[7] = 2.51, --Super
|
||||
[8] = 1.51, --Motorcycles
|
||||
[9] = 0, --Off-road
|
||||
[10] = 0, --Industrial
|
||||
[11] = 0, --Utility
|
||||
[12] = 2.21, --Vans
|
||||
[13] = 0, --Cycles
|
||||
[14] = 0, --Boats
|
||||
[15] = 0, --Helicopters
|
||||
[16] = 0, --Planes
|
||||
[17] = 0, --Service
|
||||
[18] = 2.21, --Emergency
|
||||
[19] = 0, --Military
|
||||
[20] = 2.21, --Commercial
|
||||
[21] = 0 --Trains
|
||||
}
|
||||
|
||||
local blackListed = {
|
||||
788045382, --"sanchez"
|
||||
-1453280962,--"sanchez2"
|
||||
1753414259, --"enduro"
|
||||
2035069708, --"esskey"
|
||||
86520421, --"bf400"
|
||||
-- Here you can add some vehicles hash
|
||||
}
|
||||
|
||||
Citizen.CreateThread(function()
|
||||
while true do
|
||||
local ped = GetPlayerPed(-1)
|
||||
if IsPedInAnyVehicle(ped, false) then
|
||||
if vehicle == nil then
|
||||
vehicle = GetVehiclePedIsUsing(ped)
|
||||
if GetPedInVehicleSeat(vehicle, -1) == ped then
|
||||
isDriver = true
|
||||
if DecorExistOn(vehicle, 'fTractionLossMult') then
|
||||
fTractionLossMult = DecorGetFloat(vehicle, 'fTractionLossMult')
|
||||
--print("Default value: "..fTractionLossMult)
|
||||
else
|
||||
fTractionLossMult = GetVehicleHandlingFloat(vehicle, 'CHandlingData', 'fTractionLossMult')
|
||||
DecorRegister('fTractionLossMult', 1)
|
||||
DecorSetFloat(vehicle,'fTractionLossMult', fTractionLossMult)
|
||||
--print("Default value: "..fTractionLossMult)
|
||||
end
|
||||
class = GetVehicleClass(vehicle)
|
||||
isBlacklisted = isModelBlacklisted(GetEntityModel(vehicle))
|
||||
end
|
||||
end
|
||||
else
|
||||
if vehicle ~= nil then
|
||||
if DoesEntityExist(vehicle) then
|
||||
setTractionLost (fTractionLossMult)
|
||||
end
|
||||
Citizen.Wait(1000)
|
||||
vehicle = nil
|
||||
isDriver = false
|
||||
fTractionLossMult = nil
|
||||
isModed = false
|
||||
class = nil
|
||||
isBlacklisted = false
|
||||
end
|
||||
end
|
||||
Citizen.Wait(2000)
|
||||
end
|
||||
end)
|
||||
|
||||
Citizen.CreateThread(function()
|
||||
while true do
|
||||
if isBlacklisted == false then
|
||||
if vehicle ~= nil and isDriver == true then
|
||||
local speed = GetEntitySpeed(vehicle)*3.6
|
||||
if not pointingRoad(vehicle) then
|
||||
if groundAsphalt() or speed <= 35.0 then
|
||||
if isModed == true then
|
||||
isModed = false
|
||||
setTractionLost (fTractionLossMult)
|
||||
end
|
||||
else
|
||||
if isModed == false and speed > 35.0 then
|
||||
isModed = true
|
||||
setTractionLost (fTractionLossMult + classMod[class])
|
||||
end
|
||||
end
|
||||
else
|
||||
if isModed == true then
|
||||
isModed = false
|
||||
setTractionLost (fTractionLossMult)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
Citizen.Wait(500)
|
||||
end
|
||||
end)
|
||||
|
||||
function setTractionLost (value)
|
||||
if isBlacklisted == false and vehicle ~= nil and value ~= nil then
|
||||
SetVehicleHandlingFloat(vehicle, 'CHandlingData', 'fTractionLossMult', value)
|
||||
--print("fTractionLossMult: "..value)
|
||||
end
|
||||
end
|
||||
|
||||
function isModelBlacklisted(model)
|
||||
local found = false
|
||||
for i = 1, #blackListed do
|
||||
if blackListed[i] == model then
|
||||
found = true
|
||||
break
|
||||
end
|
||||
end
|
||||
return found
|
||||
end
|
||||
|
||||
function groundAsphalt()
|
||||
local ped = PlayerPedId()
|
||||
|
||||
local playerCoord = GetEntityCoords(ped)
|
||||
local target = GetOffsetFromEntityInWorldCoords(ped, vector3(0,2,-3))
|
||||
local testRay = StartShapeTestRay(playerCoord, target, 17, ped, 7) -- This 7 is entirely cargo cult. No idea what it does.
|
||||
local _, hit, hitLocation, surfaceNormal, material, _ = GetShapeTestResultEx(testRay)
|
||||
|
||||
if hit then
|
||||
--print (material)
|
||||
if material == 282940568 then
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
else
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
||||
function pointingRoad(veh)
|
||||
local pos = GetEntityCoords(veh, true)
|
||||
if IsPointOnRoad(pos.x,pos.y,pos.z-1,false) then
|
||||
return true
|
||||
end
|
||||
local pos2 = GetOffsetFromEntityInWorldCoords(veh, 1.5, 0, 0)
|
||||
local pos3 = GetOffsetFromEntityInWorldCoords(veh, -1.5, 0, 0)
|
||||
if IsPointOnRoad(pos2.x,pos2.y,pos2.z-1,false) then
|
||||
return true
|
||||
end
|
||||
if IsPointOnRoad(pos3.x,pos3.y,pos3.z,false) then
|
||||
return true
|
||||
end
|
||||
return false
|
||||
end
|
||||
@@ -0,0 +1,9 @@
|
||||
fx_version 'bodacious'
|
||||
game 'gta5'
|
||||
description 'AntiPowerGaming - CFX.RE release'
|
||||
author 'Sosa#2021'
|
||||
|
||||
client_scripts {
|
||||
'client.lua'
|
||||
}
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
client_script 'client.lua'
|
||||
server_script 'server.lua'
|
||||
@@ -0,0 +1,493 @@
|
||||
RegisterNetEvent("TrafficAlert")
|
||||
AddEventHandler("TrafficAlert",function()
|
||||
DisplayOnscreenKeyboard(false, "FMMC_KEY_TIP8", "", "", "", "", "", 150)
|
||||
local input = true
|
||||
Citizen.CreateThread(function()
|
||||
while input do
|
||||
if input == true then
|
||||
HideHudAndRadarThisFrame()
|
||||
if UpdateOnscreenKeyboard() == 3 then
|
||||
input = false
|
||||
elseif UpdateOnscreenKeyboard() == 1 then
|
||||
local inputText = GetOnscreenKeyboardResult()
|
||||
if string.len(inputText) > 0 then
|
||||
TriggerServerEvent('SyncTrafficAlert', inputText)
|
||||
input = false
|
||||
else
|
||||
DisplayOnscreenKeyboard(false, "FMMC_KEY_TIP8", "", "", "", "", "", 150)
|
||||
end
|
||||
elseif UpdateOnscreenKeyboard() == 2 then
|
||||
input = false
|
||||
end
|
||||
end
|
||||
Citizen.Wait(0)
|
||||
end
|
||||
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent('DisplayTrafficAlert')
|
||||
AddEventHandler('DisplayTrafficAlert',function(inputText)
|
||||
|
||||
SetNotificationTextEntry("STRING");
|
||||
AddTextComponentString(inputText);
|
||||
SetNotificationMessage("CHAR_LS_TOURIST_BOARD", "CHAR_LS_TOURIST_BOARD", true, 1, "~y~LS Traffic~s~", "");
|
||||
DrawNotification(false, true);
|
||||
|
||||
end)
|
||||
|
||||
RegisterNetEvent("AmmuAd")
|
||||
AddEventHandler("AmmuAd",function()
|
||||
DisplayOnscreenKeyboard(false, "FMMC_KEY_TIP8", "", "", "", "", "", 150)
|
||||
local input = true
|
||||
Citizen.CreateThread(function()
|
||||
while input do
|
||||
if input == true then
|
||||
HideHudAndRadarThisFrame()
|
||||
if UpdateOnscreenKeyboard() == 3 then
|
||||
input = false
|
||||
elseif UpdateOnscreenKeyboard() == 1 then
|
||||
local inputText = GetOnscreenKeyboardResult()
|
||||
if string.len(inputText) > 0 then
|
||||
TriggerServerEvent('SyncAmmuAd', inputText)
|
||||
input = false
|
||||
else
|
||||
DisplayOnscreenKeyboard(false, "FMMC_KEY_TIP8", "", "", "", "", "", 150)
|
||||
end
|
||||
elseif UpdateOnscreenKeyboard() == 2 then
|
||||
input = false
|
||||
end
|
||||
end
|
||||
Citizen.Wait(0)
|
||||
end
|
||||
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent('DisplayAmmuAd')
|
||||
AddEventHandler('DisplayAmmuAd',function(inputText)
|
||||
|
||||
SetNotificationTextEntry("STRING");
|
||||
AddTextComponentString(inputText);
|
||||
SetNotificationMessage("CHAR_AMMUNATION", "CHAR_AMMUNATION", true, 1, "~y~Ammunation~s~", "");
|
||||
DrawNotification(false, true);
|
||||
|
||||
end)
|
||||
|
||||
RegisterNetEvent("AmmuAd")
|
||||
AddEventHandler("AmmuAd",function()
|
||||
DisplayOnscreenKeyboard(false, "FMMC_KEY_TIP8", "", "", "", "", "", 150)
|
||||
local input = true
|
||||
Citizen.CreateThread(function()
|
||||
while input do
|
||||
if input == true then
|
||||
HideHudAndRadarThisFrame()
|
||||
if UpdateOnscreenKeyboard() == 3 then
|
||||
input = false
|
||||
elseif UpdateOnscreenKeyboard() == 1 then
|
||||
local inputText = GetOnscreenKeyboardResult()
|
||||
if string.len(inputText) > 0 then
|
||||
TriggerServerEvent('SyncAmmuAd', inputText)
|
||||
input = false
|
||||
else
|
||||
DisplayOnscreenKeyboard(false, "FMMC_KEY_TIP8", "", "", "", "", "", 150)
|
||||
end
|
||||
elseif UpdateOnscreenKeyboard() == 2 then
|
||||
input = false
|
||||
end
|
||||
end
|
||||
Citizen.Wait(0)
|
||||
end
|
||||
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent('DisplayAmmuAd')
|
||||
AddEventHandler('DisplayAmmuAd',function(inputText)
|
||||
|
||||
SetNotificationTextEntry("STRING");
|
||||
AddTextComponentString(inputText);
|
||||
SetNotificationMessage("CHAR_AMMUNATION", "CHAR_AMMUNATION", true, 1, "~y~Ammunation~s~", "");
|
||||
DrawNotification(false, true);
|
||||
|
||||
end)
|
||||
|
||||
RegisterNetEvent("FleecaAd")
|
||||
AddEventHandler("FleecaAd",function()
|
||||
DisplayOnscreenKeyboard(false, "FMMC_KEY_TIP8", "", "", "", "", "", 150)
|
||||
local input = true
|
||||
Citizen.CreateThread(function()
|
||||
while input do
|
||||
if input == true then
|
||||
HideHudAndRadarThisFrame()
|
||||
if UpdateOnscreenKeyboard() == 3 then
|
||||
input = false
|
||||
elseif UpdateOnscreenKeyboard() == 1 then
|
||||
local inputText = GetOnscreenKeyboardResult()
|
||||
if string.len(inputText) > 0 then
|
||||
TriggerServerEvent('SyncFleecaAd', inputText)
|
||||
input = false
|
||||
else
|
||||
DisplayOnscreenKeyboard(false, "FMMC_KEY_TIP8", "", "", "", "", "", 150)
|
||||
end
|
||||
elseif UpdateOnscreenKeyboard() == 2 then
|
||||
input = false
|
||||
end
|
||||
end
|
||||
Citizen.Wait(0)
|
||||
end
|
||||
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent('DisplayFleecaAd')
|
||||
AddEventHandler('DisplayFleecaAd',function(inputText)
|
||||
|
||||
SetNotificationTextEntry("STRING");
|
||||
AddTextComponentString(inputText);
|
||||
SetNotificationMessage("CHAR_BANK_FLEECA", "CHAR_BANK_FLEECA", true, 1, "~y~Fleeca Bank~s~", "");
|
||||
DrawNotification(false, true);
|
||||
|
||||
end)
|
||||
|
||||
RegisterNetEvent("MBankAd")
|
||||
AddEventHandler("MBankAd",function()
|
||||
DisplayOnscreenKeyboard(false, "FMMC_KEY_TIP8", "", "", "", "", "", 150)
|
||||
local input = true
|
||||
Citizen.CreateThread(function()
|
||||
while input do
|
||||
if input == true then
|
||||
HideHudAndRadarThisFrame()
|
||||
if UpdateOnscreenKeyboard() == 3 then
|
||||
input = false
|
||||
elseif UpdateOnscreenKeyboard() == 1 then
|
||||
local inputText = GetOnscreenKeyboardResult()
|
||||
if string.len(inputText) > 0 then
|
||||
TriggerServerEvent('SyncMBankAd', inputText)
|
||||
input = false
|
||||
else
|
||||
DisplayOnscreenKeyboard(false, "FMMC_KEY_TIP8", "", "", "", "", "", 150)
|
||||
end
|
||||
elseif UpdateOnscreenKeyboard() == 2 then
|
||||
input = false
|
||||
end
|
||||
end
|
||||
Citizen.Wait(0)
|
||||
end
|
||||
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent('DisplayMBankAd')
|
||||
AddEventHandler('DisplayMBankAd',function(inputText)
|
||||
|
||||
SetNotificationTextEntry("STRING");
|
||||
AddTextComponentString(inputText);
|
||||
SetNotificationMessage("CHAR_BANK_MAZE", "CHAR_BANK_MAZE", true, 1, "~y~Maze Bank~s~", "");
|
||||
DrawNotification(false, true);
|
||||
|
||||
end)
|
||||
|
||||
RegisterNetEvent("LMotorsAd")
|
||||
AddEventHandler("LMotorsAd",function()
|
||||
DisplayOnscreenKeyboard(false, "FMMC_KEY_TIP8", "", "", "", "", "", 150)
|
||||
local input = true
|
||||
Citizen.CreateThread(function()
|
||||
while input do
|
||||
if input == true then
|
||||
HideHudAndRadarThisFrame()
|
||||
if UpdateOnscreenKeyboard() == 3 then
|
||||
input = false
|
||||
elseif UpdateOnscreenKeyboard() == 1 then
|
||||
local inputText = GetOnscreenKeyboardResult()
|
||||
if string.len(inputText) > 0 then
|
||||
TriggerServerEvent('SyncLMotorsAd', inputText)
|
||||
input = false
|
||||
else
|
||||
DisplayOnscreenKeyboard(false, "FMMC_KEY_TIP8", "", "", "", "", "", 150)
|
||||
end
|
||||
elseif UpdateOnscreenKeyboard() == 2 then
|
||||
input = false
|
||||
end
|
||||
end
|
||||
Citizen.Wait(0)
|
||||
end
|
||||
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent('DisplayLMotorsAd')
|
||||
AddEventHandler('DisplayLMotorsAd',function(inputText)
|
||||
|
||||
SetNotificationTextEntry("STRING");
|
||||
AddTextComponentString(inputText);
|
||||
SetNotificationMessage("CHAR_CARSITE", "CHAR_CARSITE", true, 1, "~y~Legendary Motorsports~s~", "");
|
||||
DrawNotification(false, true);
|
||||
|
||||
end)
|
||||
|
||||
RegisterNetEvent("SAMotorsAd")
|
||||
AddEventHandler("SAMotorsAd",function()
|
||||
DisplayOnscreenKeyboard(false, "FMMC_KEY_TIP8", "", "", "", "", "", 150)
|
||||
local input = true
|
||||
Citizen.CreateThread(function()
|
||||
while input do
|
||||
if input == true then
|
||||
HideHudAndRadarThisFrame()
|
||||
if UpdateOnscreenKeyboard() == 3 then
|
||||
input = false
|
||||
elseif UpdateOnscreenKeyboard() == 1 then
|
||||
local inputText = GetOnscreenKeyboardResult()
|
||||
if string.len(inputText) > 0 then
|
||||
TriggerServerEvent('SyncSAMotorsAd', inputText)
|
||||
input = false
|
||||
else
|
||||
DisplayOnscreenKeyboard(false, "FMMC_KEY_TIP8", "", "", "", "", "", 150)
|
||||
end
|
||||
elseif UpdateOnscreenKeyboard() == 2 then
|
||||
input = false
|
||||
end
|
||||
end
|
||||
Citizen.Wait(0)
|
||||
end
|
||||
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent('DisplaySAMotorsAd')
|
||||
AddEventHandler('DisplaySAMotorsAd',function(inputText)
|
||||
|
||||
SetNotificationTextEntry("STRING");
|
||||
AddTextComponentString(inputText);
|
||||
SetNotificationMessage("CHAR_CARSITE2", "CHAR_CARSITE2", true, 1, "~y~San Andreas Motorsports~s~", "");
|
||||
DrawNotification(false, true);
|
||||
|
||||
end)
|
||||
|
||||
RegisterNetEvent("LSCustomsAd")
|
||||
AddEventHandler("LSCustomsAd",function()
|
||||
DisplayOnscreenKeyboard(false, "FMMC_KEY_TIP8", "", "", "", "", "", 150)
|
||||
local input = true
|
||||
Citizen.CreateThread(function()
|
||||
while input do
|
||||
if input == true then
|
||||
HideHudAndRadarThisFrame()
|
||||
if UpdateOnscreenKeyboard() == 3 then
|
||||
input = false
|
||||
elseif UpdateOnscreenKeyboard() == 1 then
|
||||
local inputText = GetOnscreenKeyboardResult()
|
||||
if string.len(inputText) > 0 then
|
||||
TriggerServerEvent('SyncLSCustomsAd', inputText)
|
||||
input = false
|
||||
else
|
||||
DisplayOnscreenKeyboard(false, "FMMC_KEY_TIP8", "", "", "", "", "", 150)
|
||||
end
|
||||
elseif UpdateOnscreenKeyboard() == 2 then
|
||||
input = false
|
||||
end
|
||||
end
|
||||
Citizen.Wait(0)
|
||||
end
|
||||
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent('DisplayLSCustomsAd')
|
||||
AddEventHandler('DisplayLSCustomsAd',function(inputText)
|
||||
|
||||
SetNotificationTextEntry("STRING");
|
||||
AddTextComponentString(inputText);
|
||||
SetNotificationMessage("CHAR_LS_CUSTOMS", "CHAR_LS_CUSTOMS", true, 1, "~y~LS Customs~s~", "");
|
||||
DrawNotification(false, true);
|
||||
|
||||
end)
|
||||
|
||||
RegisterNetEvent("CabAd")
|
||||
AddEventHandler("CabAd",function()
|
||||
DisplayOnscreenKeyboard(false, "FMMC_KEY_TIP8", "", "", "", "", "", 150)
|
||||
local input = true
|
||||
Citizen.CreateThread(function()
|
||||
while input do
|
||||
if input == true then
|
||||
HideHudAndRadarThisFrame()
|
||||
if UpdateOnscreenKeyboard() == 3 then
|
||||
input = false
|
||||
elseif UpdateOnscreenKeyboard() == 1 then
|
||||
local inputText = GetOnscreenKeyboardResult()
|
||||
if string.len(inputText) > 0 then
|
||||
TriggerServerEvent('SyncCabAd', inputText)
|
||||
input = false
|
||||
else
|
||||
DisplayOnscreenKeyboard(false, "FMMC_KEY_TIP8", "", "", "", "", "", 150)
|
||||
end
|
||||
elseif UpdateOnscreenKeyboard() == 2 then
|
||||
input = false
|
||||
end
|
||||
end
|
||||
Citizen.Wait(0)
|
||||
end
|
||||
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent('DisplayCabAd')
|
||||
AddEventHandler('DisplayCabAd',function(inputText)
|
||||
|
||||
SetNotificationTextEntry("STRING");
|
||||
AddTextComponentString(inputText);
|
||||
SetNotificationMessage("CHAR_TAXI", "CHAR_TAXI", true, 1, "~y~Downtown Cab Co.~s~", "");
|
||||
DrawNotification(false, true);
|
||||
|
||||
end)
|
||||
|
||||
RegisterNetEvent("FBAd")
|
||||
AddEventHandler("FBAd",function()
|
||||
DisplayOnscreenKeyboard(false, "FMMC_KEY_TIP8", "", "", "", "", "", 150)
|
||||
local input = true
|
||||
Citizen.CreateThread(function()
|
||||
while input do
|
||||
if input == true then
|
||||
HideHudAndRadarThisFrame()
|
||||
if UpdateOnscreenKeyboard() == 3 then
|
||||
input = false
|
||||
elseif UpdateOnscreenKeyboard() == 1 then
|
||||
local inputText = GetOnscreenKeyboardResult()
|
||||
if string.len(inputText) > 0 then
|
||||
TriggerServerEvent('SyncFBAd', inputText)
|
||||
input = false
|
||||
else
|
||||
DisplayOnscreenKeyboard(false, "FMMC_KEY_TIP8", "", "", "", "", "", 150)
|
||||
end
|
||||
elseif UpdateOnscreenKeyboard() == 2 then
|
||||
input = false
|
||||
end
|
||||
end
|
||||
Citizen.Wait(0)
|
||||
end
|
||||
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent('DisplayFBAd')
|
||||
AddEventHandler('DisplayFBAd',function(inputText)
|
||||
|
||||
SetNotificationTextEntry("STRING");
|
||||
AddTextComponentString(inputText);
|
||||
SetNotificationMessage("CHAR_FACEBOOK", "CHAR_FACEBOOK", true, 1, "~y~Facebook~s~", "");
|
||||
DrawNotification(false, true);
|
||||
|
||||
end)
|
||||
|
||||
RegisterNetEvent("247Ad")
|
||||
AddEventHandler("247Ad",function()
|
||||
DisplayOnscreenKeyboard(false, "FMMC_KEY_TIP8", "", "", "", "", "", 150)
|
||||
local input = true
|
||||
Citizen.CreateThread(function()
|
||||
while input do
|
||||
if input == true then
|
||||
HideHudAndRadarThisFrame()
|
||||
if UpdateOnscreenKeyboard() == 3 then
|
||||
input = false
|
||||
elseif UpdateOnscreenKeyboard() == 1 then
|
||||
local inputText = GetOnscreenKeyboardResult()
|
||||
if string.len(inputText) > 0 then
|
||||
TriggerServerEvent('Sync247Ad', inputText)
|
||||
input = false
|
||||
else
|
||||
DisplayOnscreenKeyboard(false, "FMMC_KEY_TIP8", "", "", "", "", "", 150)
|
||||
end
|
||||
elseif UpdateOnscreenKeyboard() == 2 then
|
||||
input = false
|
||||
end
|
||||
end
|
||||
Citizen.Wait(0)
|
||||
end
|
||||
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent('Display247Ad')
|
||||
AddEventHandler('Display247Ad',function(inputText)
|
||||
|
||||
SetNotificationTextEntry("STRING");
|
||||
AddTextComponentString(inputText);
|
||||
SetNotificationMessage("CHAR_PROPERTY_WEED_SHOP", "CHAR_PROPERTY_WEED_SHOP", true, 1, "~y~247 Store~s~", "");
|
||||
DrawNotification(false, true);
|
||||
|
||||
end)
|
||||
|
||||
RegisterNetEvent("YoutubeAd")
|
||||
AddEventHandler("YoutubeAd",function()
|
||||
DisplayOnscreenKeyboard(false, "FMMC_KEY_TIP8", "", "", "", "", "", 150)
|
||||
local input = true
|
||||
Citizen.CreateThread(function()
|
||||
while input do
|
||||
if input == true then
|
||||
HideHudAndRadarThisFrame()
|
||||
if UpdateOnscreenKeyboard() == 3 then
|
||||
input = false
|
||||
elseif UpdateOnscreenKeyboard() == 1 then
|
||||
local inputText = GetOnscreenKeyboardResult()
|
||||
if string.len(inputText) > 0 then
|
||||
TriggerServerEvent('SyncYoutubeAd', inputText)
|
||||
input = false
|
||||
else
|
||||
DisplayOnscreenKeyboard(false, "FMMC_KEY_TIP8", "", "", "", "", "", 150)
|
||||
end
|
||||
elseif UpdateOnscreenKeyboard() == 2 then
|
||||
input = false
|
||||
end
|
||||
end
|
||||
Citizen.Wait(0)
|
||||
end
|
||||
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent('DisplayYoutubeAd')
|
||||
AddEventHandler('DisplayYoutubeAd',function(inputText)
|
||||
|
||||
SetNotificationTextEntry("STRING");
|
||||
AddTextComponentString(inputText);
|
||||
SetNotificationMessage("CHAR_YOUTUBE", "CHAR_YOUTUBE", true, 1, "~y~Youtube~s~", "");
|
||||
DrawNotification(false, true);
|
||||
|
||||
end)
|
||||
|
||||
RegisterNetEvent("MilitaryAd")
|
||||
AddEventHandler("MilitaryAd",function()
|
||||
DisplayOnscreenKeyboard(false, "FMMC_KEY_TIP8", "", "", "", "", "", 150)
|
||||
local input = true
|
||||
Citizen.CreateThread(function()
|
||||
while input do
|
||||
if input == true then
|
||||
HideHudAndRadarThisFrame()
|
||||
if UpdateOnscreenKeyboard() == 3 then
|
||||
input = false
|
||||
elseif UpdateOnscreenKeyboard() == 1 then
|
||||
local inputText = GetOnscreenKeyboardResult()
|
||||
if string.len(inputText) > 0 then
|
||||
TriggerServerEvent('SyncMilitaryAd', inputText)
|
||||
input = false
|
||||
else
|
||||
DisplayOnscreenKeyboard(false, "FMMC_KEY_TIP8", "", "", "", "", "", 150)
|
||||
end
|
||||
elseif UpdateOnscreenKeyboard() == 2 then
|
||||
input = false
|
||||
end
|
||||
end
|
||||
Citizen.Wait(0)
|
||||
end
|
||||
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent('DisplayMilitaryAd')
|
||||
AddEventHandler('DisplayMilitaryAd',function(inputText)
|
||||
|
||||
SetNotificationTextEntry("STRING");
|
||||
AddTextComponentString(inputText);
|
||||
SetNotificationMessage("CHAR_MP_MERRYWEATHER", "CHAR_MP_MERRYWEATHER", true, 1, "~y~SA Military~s~", "");
|
||||
DrawNotification(false, true);
|
||||
|
||||
end)
|
||||
@@ -0,0 +1,142 @@
|
||||
RegisterServerEvent("SyncTrafficAlert")
|
||||
AddEventHandler('SyncTrafficAlert', function(inputText)
|
||||
TriggerClientEvent('DisplayTrafficAlert', -1, inputText)
|
||||
end)
|
||||
|
||||
|
||||
AddEventHandler('chatMessage', function(from, name, message)
|
||||
if message == "/ad traffic" then
|
||||
CancelEvent()
|
||||
TriggerClientEvent("TrafficAlert", from)
|
||||
end
|
||||
end)
|
||||
|
||||
RegisterServerEvent("SyncAmmuAd")
|
||||
AddEventHandler('SyncAmmuAd', function(inputText)
|
||||
TriggerClientEvent('DisplayAmmuAd', -1, inputText)
|
||||
end)
|
||||
|
||||
|
||||
AddEventHandler('chatMessage', function(from, name, message)
|
||||
if message == "/ad ammunation" then
|
||||
CancelEvent()
|
||||
TriggerClientEvent("AmmuAd", from)
|
||||
end
|
||||
end)
|
||||
|
||||
RegisterServerEvent("SyncFleecaAd")
|
||||
AddEventHandler('SyncFleecaAd', function(inputText)
|
||||
TriggerClientEvent('DisplayFleecaAd', -1, inputText)
|
||||
end)
|
||||
|
||||
|
||||
AddEventHandler('chatMessage', function(from, name, message)
|
||||
if message == "/ad fleeca" then
|
||||
CancelEvent()
|
||||
TriggerClientEvent("FleecaAd", from)
|
||||
end
|
||||
end)
|
||||
|
||||
RegisterServerEvent("SyncMBankAd")
|
||||
AddEventHandler('SyncMBankAd', function(inputText)
|
||||
TriggerClientEvent('DisplayMBankAd', -1, inputText)
|
||||
end)
|
||||
|
||||
|
||||
AddEventHandler('chatMessage', function(from, name, message)
|
||||
if message == "/ad mazebank" then
|
||||
CancelEvent()
|
||||
TriggerClientEvent("MBankAd", from)
|
||||
end
|
||||
end)
|
||||
|
||||
RegisterServerEvent("SyncLMotorsAd")
|
||||
AddEventHandler('SyncLMotorsAd', function(inputText)
|
||||
TriggerClientEvent('DisplayLMotorsAd', -1, inputText)
|
||||
end)
|
||||
|
||||
|
||||
AddEventHandler('chatMessage', function(from, name, message)
|
||||
if message == "/ad lmotors" then
|
||||
CancelEvent()
|
||||
TriggerClientEvent("LMotorsAd", from)
|
||||
end
|
||||
end)
|
||||
|
||||
RegisterServerEvent("SyncSAMotorsAd")
|
||||
AddEventHandler('SyncSAMotorsAd', function(inputText)
|
||||
TriggerClientEvent('DisplaySAMotorsAd', -1, inputText)
|
||||
end)
|
||||
|
||||
|
||||
AddEventHandler('chatMessage', function(from, name, message)
|
||||
if message == "/ad samotors" then
|
||||
CancelEvent()
|
||||
TriggerClientEvent("SAMotorsAd", from)
|
||||
end
|
||||
end)
|
||||
|
||||
RegisterServerEvent("SyncLSCustomsAd")
|
||||
AddEventHandler('SyncLSCustomsAd', function(inputText)
|
||||
TriggerClientEvent('DisplayLSCustomsAd', -1, inputText)
|
||||
end)
|
||||
|
||||
|
||||
AddEventHandler('chatMessage', function(from, name, message)
|
||||
if message == "/ad lscustoms" then
|
||||
CancelEvent()
|
||||
TriggerClientEvent("LSCustomsAd", from)
|
||||
end
|
||||
end)
|
||||
|
||||
RegisterServerEvent("SyncCabAd")
|
||||
AddEventHandler('SyncCabAd', function(inputText)
|
||||
TriggerClientEvent('DisplayCabAd', -1, inputText)
|
||||
end)
|
||||
|
||||
|
||||
AddEventHandler('chatMessage', function(from, name, message)
|
||||
if message == "/ad taxi" then
|
||||
CancelEvent()
|
||||
TriggerClientEvent("CabAd", from)
|
||||
end
|
||||
end)
|
||||
|
||||
RegisterServerEvent("Sync247Ad")
|
||||
AddEventHandler('Sync247Ad', function(inputText)
|
||||
TriggerClientEvent('Display247Ad', -1, inputText)
|
||||
end)
|
||||
|
||||
|
||||
AddEventHandler('chatMessage', function(from, name, message)
|
||||
if message == "/ad 247" then
|
||||
CancelEvent()
|
||||
TriggerClientEvent("247Ad", from)
|
||||
end
|
||||
end)
|
||||
|
||||
RegisterServerEvent("SyncYoutubeAd")
|
||||
AddEventHandler('SyncYoutubeAd', function(inputText)
|
||||
TriggerClientEvent('DisplayYoutubeAd', -1, inputText)
|
||||
end)
|
||||
|
||||
|
||||
AddEventHandler('chatMessage', function(from, name, message)
|
||||
if message == "/ad youtube" then
|
||||
CancelEvent()
|
||||
TriggerClientEvent("YoutubeAd", from)
|
||||
end
|
||||
end)
|
||||
|
||||
RegisterServerEvent("SyncMilitaryAd")
|
||||
AddEventHandler('SyncMilitaryAd', function(inputText)
|
||||
TriggerClientEvent('DisplayMilitaryAd', -1, inputText)
|
||||
end)
|
||||
|
||||
|
||||
AddEventHandler('chatMessage', function(from, name, message)
|
||||
if message == "/ad military" then
|
||||
CancelEvent()
|
||||
TriggerClientEvent("MilitaryAd", from)
|
||||
end
|
||||
end)
|
||||
@@ -0,0 +1,2 @@
|
||||
# Auto detect text files and perform LF normalization
|
||||
* text=auto
|
||||
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2020 Jordan.#2139
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
@@ -0,0 +1,29 @@
|
||||
# Calm-AI V3
|
||||
## What is it?
|
||||
Essentially Calm-AI V3 is a script that takes the old Calm-AI by NickThe0ne but improves it by adding a feature that lets you control the amount of AI around you as well all in a nice config file. This script is 100% standalone and requires minimal configuration. You can configure the AI density(amount of AI) in the `config.lua` and manage the AI relationships in the `relationships.dat` file. This script also allows for the disabling of AI dispatching as a whole.
|
||||
|
||||
### Configuration
|
||||
```
|
||||
-------------------------------------------------------------
|
||||
-- Calm-AI V3- A Simple FiveM Script, Made By Jordan.#2139 --
|
||||
-------------------------------------------------------------
|
||||
|
||||
-------------------------------------------------------
|
||||
-- CONFIG YOUR PERIPHERALS HERE! --
|
||||
-------------------------------------------------------
|
||||
Config = {
|
||||
VehDensity = 1, -- How many vehicles are driving (10 - 1) | The lower the number the less cars
|
||||
PedDensity = 1, -- How many AI are around (10 - 1) | The lower the number the less AI
|
||||
RanVehDensity = 1, -- How many Random Cars (10 - 1) | The lower the number the less cars
|
||||
ParkCarDensity = 1, -- How many parked cars (10 - 1) | The lower the number the less cars
|
||||
ScenePedDensity = 1, -- How many AI doing emotes (scenarios) (10 - 1) | The lower the number the less AI
|
||||
DispatchDead = true, -- Do you want AI to dispatch? True = No | False = Yes
|
||||
}
|
||||
--------------------------
|
||||
-- ^^^ DO THAT HERE ^^^ --
|
||||
--------------------------
|
||||
```
|
||||
# Acknowledgments
|
||||
- NickThe0ne- Inital Calm-AI Release
|
||||
# TJH Development Discord
|
||||
[](https://discord.com/invite/x7cYjg5)
|
||||
@@ -0,0 +1,49 @@
|
||||
-------------------------------------------------------------
|
||||
-- Calm-AI V3- A Simple FiveM Script, Made By Jordan.#2139 --
|
||||
-------------------------------------------------------------
|
||||
----------------------------------------------------------------------------------------------
|
||||
-- !WARNING! !WARNING! !WARNING! !WARNING! !WARNING! --
|
||||
-- DO NOT TOUCH THIS FILE OR YOU /WILL/ FUCK SHIT UP! EDIT THE CONFIG.LUA --
|
||||
-- DO NOT BE STUPID AND WHINE TO ME ABOUT THIS BEING BROKEN IF YOU TOUCHED THE LINES BELOW. --
|
||||
----------------------------------------------------------------------------------------------
|
||||
|
||||
SetRelationshipBetweenGroups(1, GetHashKey("AMBIENT_GANG_HILLBILLY"), GetHashKey('PLAYER'))
|
||||
SetRelationshipBetweenGroups(1, GetHashKey("AMBIENT_GANG_BALLAS"), GetHashKey('PLAYER'))
|
||||
SetRelationshipBetweenGroups(1, GetHashKey("AMBIENT_GANG_MEXICAN"), GetHashKey('PLAYER'))
|
||||
SetRelationshipBetweenGroups(1, GetHashKey("AMBIENT_GANG_FAMILY"), GetHashKey('PLAYER'))
|
||||
SetRelationshipBetweenGroups(1, GetHashKey("AMBIENT_GANG_MARABUNTE"), GetHashKey('PLAYER'))
|
||||
SetRelationshipBetweenGroups(1, GetHashKey("AMBIENT_GANG_SALVA"), GetHashKey('PLAYER'))
|
||||
SetRelationshipBetweenGroups(1, GetHashKey("GANG_1"), GetHashKey('PLAYER'))
|
||||
SetRelationshipBetweenGroups(1, GetHashKey("GANG_2"), GetHashKey('PLAYER'))
|
||||
SetRelationshipBetweenGroups(1, GetHashKey("GANG_9"), GetHashKey('PLAYER'))
|
||||
SetRelationshipBetweenGroups(1, GetHashKey("GANG_10"), GetHashKey('PLAYER'))
|
||||
SetRelationshipBetweenGroups(1, GetHashKey("FIREMAN"), GetHashKey('PLAYER'))
|
||||
SetRelationshipBetweenGroups(1, GetHashKey("MEDIC"), GetHashKey('PLAYER'))
|
||||
SetRelationshipBetweenGroups(1, GetHashKey("COP"), GetHashKey('PLAYER'))
|
||||
|
||||
Citizen.CreateThread(function()
|
||||
while true do
|
||||
Citizen.Wait(0)
|
||||
SetVehicleDensityMultiplierThisFrame(Config.VehDensity)
|
||||
SetPedDensityMultiplierThisFrame(Config.PedDensity)
|
||||
SetRandomVehicleDensityMultiplierThisFrame(Config.RanVehDensity)
|
||||
SetParkedVehicleDensityMultiplierThisFrame(Config.ParkCarDensity)
|
||||
SetScenarioPedDensityMultiplierThisFrame(Config.ScenePedDensity, Config.ScenePedDensity)
|
||||
end
|
||||
end)
|
||||
|
||||
Citizen.CreateThread(function()
|
||||
if Config.DispatchDead then
|
||||
while true do
|
||||
Wait(0)
|
||||
for i = 1, 12 do
|
||||
EnableDispatchService(i, false)
|
||||
end
|
||||
SetPlayerWantedLevel(PlayerId(), 0, false)
|
||||
SetPlayerWantedLevelNow(PlayerId(), false)
|
||||
SetPlayerWantedLevelNoDrop(PlayerId(), 0, false)
|
||||
end
|
||||
else
|
||||
end
|
||||
end)
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
-------------------------------------------------------------
|
||||
-- Calm-AI V3- A Simple FiveM Script, Made By Jordan.#2139 --
|
||||
-------------------------------------------------------------
|
||||
|
||||
-------------------------------------------------------
|
||||
-- CONFIG YOUR PERIPHERALS HERE! --
|
||||
-------------------------------------------------------
|
||||
Config = {
|
||||
VehDensity = 0.90, -- How many vehicles are driving (0.0 - 1.0) | The lower the number the less cars
|
||||
PedDensity = 0.85, -- How many AI are around (0.0 - 1.0) | The lower the number the less AI
|
||||
RanVehDensity = 0.85, -- How many Random Cars (0.0 - 1.0) | The lower the number the less cars
|
||||
ParkCarDensity = 0.90, -- How many parked cars (0.0 - 1.0) | The lower the number the less cars
|
||||
ScenePedDensity = 0.35, -- How many AI doing emotes (scenarios) (0.0 - 1.0) | The lower the number the less AI
|
||||
DispatchDead = true, -- Do you want AI to dispatch? True = No | False = Yes
|
||||
}
|
||||
--------------------------
|
||||
-- ^^^ DO THAT HERE ^^^ --
|
||||
--------------------------
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,30 @@
|
||||
-------------------------------------------------------------
|
||||
-- Calm-AI V3- A Simple FiveM Script, Made By Jordan.#2139 --
|
||||
-------------------------------------------------------------
|
||||
|
||||
fx_version 'bodacious'
|
||||
games { 'gta5' }
|
||||
|
||||
-- Define the resource metadata
|
||||
name 'Calm-AI V3'
|
||||
description 'A simple reboot that also includes an AI density manager'
|
||||
author 'Jordan.#2139'
|
||||
version 'v1.1.0'
|
||||
|
||||
|
||||
-- Client Scripts
|
||||
client_script "config.lua"
|
||||
client_script "client.lua"
|
||||
|
||||
-- Server Scripts
|
||||
server_script "config.lua"
|
||||
server_script "version_check.lua"
|
||||
|
||||
-- Calling Files For The Script
|
||||
files {
|
||||
'events.meta',
|
||||
'relationships.dat'
|
||||
}
|
||||
|
||||
-- Defining the data file
|
||||
data_file 'FIVEM_LOVES_YOU_4B38E96CC036038F' 'events.meta'
|
||||
@@ -0,0 +1,138 @@
|
||||
#-------------------------------------------------------------
|
||||
#-- Calm-AI V3- A Simple FiveM Script, Made By Jordan.#2139 --
|
||||
#-------------------------------------------------------------
|
||||
|
||||
# Acquaintance options:
|
||||
# - Hate (More than likley will immediately attack)
|
||||
# - Dislike (Will tease and talk bad about player but won't immediately attack)
|
||||
# - Like (Will attempt to interact or greet. Good greetings)
|
||||
# - Respect (Nuteral)
|
||||
|
||||
# People Options
|
||||
PLAYER
|
||||
CIVMALE
|
||||
CIVFEMALE
|
||||
COP
|
||||
SECURITY_GUARD
|
||||
PRIVATE_SECURITY
|
||||
FIREMAN
|
||||
GANG_1
|
||||
GANG_2
|
||||
GANG_9
|
||||
GANG_10
|
||||
AMBIENT_GANG_LOST
|
||||
AMBIENT_GANG_MEXICAN
|
||||
AMBIENT_GANG_FAMILY
|
||||
AMBIENT_GANG_BALLAS
|
||||
AMBIENT_GANG_MARABUNTE
|
||||
AMBIENT_GANG_CULT
|
||||
AMBIENT_GANG_SALVA
|
||||
AMBIENT_GANG_WEICHENG
|
||||
AMBIENT_GANG_HILLBILLY
|
||||
DEALER
|
||||
HATES_PLAYER
|
||||
HEN
|
||||
WILD_ANIMAL
|
||||
SHARK
|
||||
COUGAR
|
||||
NO_RELATIONSHIP
|
||||
SPECIAL
|
||||
MISSION2
|
||||
MISSION3
|
||||
MISSION4
|
||||
MISSION5
|
||||
MISSION6
|
||||
MISSION7
|
||||
MISSION8
|
||||
ARMY
|
||||
GUARD_DOG
|
||||
AGGRESSIVE_INVESTIGATE
|
||||
MEDIC
|
||||
CAT
|
||||
|
||||
#
|
||||
PLAYER
|
||||
Like PLAYER
|
||||
CIVMALE
|
||||
Respect CIVMALE
|
||||
Respect CIVFEMALE
|
||||
CIVFEMALE
|
||||
Respect CIVFEMALE
|
||||
Respect CIVMALE
|
||||
COP
|
||||
Respect MEDIC FIREMAN COP
|
||||
Respect ARMY
|
||||
Respect PLAYER
|
||||
Like SECURITY_GUARD
|
||||
ARMY
|
||||
Like ARMY
|
||||
Respect COP
|
||||
SECURITY_GUARD
|
||||
Like COP SECURITY_GUARD GUARD_DOG
|
||||
PRIVATE_SECURITY
|
||||
Like PRIVATE_SECURITY GUARD_DOG
|
||||
PRISONER
|
||||
Like PRISONER
|
||||
Hate PLAYER
|
||||
FIREMAN
|
||||
Respect MEDIC FIREMAN COP
|
||||
Respect PLAYER
|
||||
GANG_1
|
||||
Respect GANG_1
|
||||
GANG_2
|
||||
Respect GANG_2
|
||||
GANG_9
|
||||
Respect GANG_9
|
||||
GANG_10
|
||||
Respect GANG_10
|
||||
HATES_PLAYER
|
||||
Hate PLAYER
|
||||
Like HATES_PLAYER AGGRESSIVE_INVESTIGATE
|
||||
HEN
|
||||
Dislike PLAYER
|
||||
AMBIENT_GANG_LOST
|
||||
Like AMBIENT_GANG_LOST GUARD_DOG
|
||||
AMBIENT_GANG_MEXICAN
|
||||
Respect PLAYER
|
||||
Like AMBIENT_GANG_MEXICAN GUARD_DOG
|
||||
AMBIENT_GANG_FAMILY
|
||||
Like AMBIENT_GANG_FAMILY GUARD_DOG
|
||||
AMBIENT_GANG_BALLAS
|
||||
Respect PLAYER
|
||||
Like AMBIENT_GANG_BALLAS GUARD_DOG
|
||||
AMBIENT_GANG_MARABUNTE
|
||||
Like AMBIENT_GANG_MARABUNTE GUARD_DOG
|
||||
AMBIENT_GANG_CULT
|
||||
Like AMBIENT_GANG_CULT GUARD_DOG
|
||||
AMBIENT_GANG_SALVA
|
||||
Like AMBIENT_GANG_SALVA GUARD_DOG
|
||||
AMBIENT_GANG_WEICHENG
|
||||
Like AMBIENT_GANG_WEICHENG GUARD_DOG
|
||||
AMBIENT_GANG_HILLBILLY
|
||||
Respect PLAYER
|
||||
Like AMBIENT_GANG_HILLBILLY GUARD_DOG
|
||||
DOMESTIC_ANIMAL
|
||||
Hate PLAYER
|
||||
Like CIVMALE CIVFEMALE COP SECURITY_GUARD DOMESTIC_ANIMAL FIREMAN GANG_1 GANG_2 GANG_9 GANG_10 AMBIENT_GANG_LOST AMBIENT_GANG_MEXICAN AMBIENT_GANG_BALLAS AMBIENT_GANG_FAMILY DEALER HATES_PLAYER
|
||||
WILD_ANIMAL
|
||||
Hate PLAYER CIVMALE CIVFEMALE COP SECURITY_GUARD FIREMAN GANG_1 GANG_2 GANG_9 GANG_10 AMBIENT_GANG_LOST AMBIENT_GANG_MEXICAN AMBIENT_GANG_BALLAS AMBIENT_GANG_FAMILY DEALER HATES_PLAYER
|
||||
DEER
|
||||
Hate PLAYER CIVMALE CIVFEMALE COP SECURITY_GUARD FIREMAN GANG_1 GANG_2 GANG_9 GANG_10 AMBIENT_GANG_LOST AMBIENT_GANG_MEXICAN AMBIENT_GANG_BALLAS AMBIENT_GANG_FAMILY DEALER HATES_PLAYER
|
||||
Respect DEER
|
||||
SHARK
|
||||
Hate PLAYER
|
||||
GUARD_DOG
|
||||
Like GUARD_DOG CIVMALE CIVFEMALE SECURITY_GUARD AMBIENT_GANG_LOST AMBIENT_GANG_MEXICAN AMBIENT_GANG_FAMILY AMBIENT_GANG_BALLAS AMBIENT_GANG_MARABUNTE AMBIENT_GANG_CULT AMBIENT_GANG_SALVA AMBIENT_GANG_WEICHENG AMBIENT_GANG_HILLBILLY PRIVATE_SECURITY
|
||||
AGGRESSIVE_INVESTIGATE
|
||||
Hate PLAYER
|
||||
Like HATES_PLAYER AGGRESSIVE_INVESTIGATE
|
||||
MEDIC
|
||||
Respect PLAYER
|
||||
Like MEDIC
|
||||
Respect COP ARMY SECURITY_GUARD FIREMAN
|
||||
COUGAR
|
||||
Hate PLAYER CIVMALE CIVFEMALE SECURITY_GUARD AMBIENT_GANG_LOST AMBIENT_GANG_MEXICAN AMBIENT_GANG_FAMILY AMBIENT_GANG_BALLAS AMBIENT_GANG_MARABUNTE AMBIENT_GANG_CULT AMBIENT_GANG_SALVA AMBIENT_GANG_WEICHENG AMBIENT_GANG_HILLBILLY PRIVATE_SECURITY COP ARMY PRISONER FIREMAN
|
||||
CAT
|
||||
Hate PLAYER
|
||||
Like CIVMALE CIVFEMALE COP SECURITY_GUARD DOMESTIC_ANIMAL FIREMAN GANG_1 GANG_2 GANG_9 GANG_10 AMBIENT_GANG_LOST AMBIENT_GANG_MEXICAN AMBIENT_GANG_BALLAS AMBIENT_GANG_FAMILY DEALER HATES_PLAYER
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
-------------------------------------------------------------
|
||||
-- Calm-AI V3- A Simple FiveM Script, Made By Jordan.#2139 --
|
||||
-------------------------------------------------------------
|
||||
----------------------------------------------------------------------------------------------
|
||||
-- !WARNING! !WARNING! !WARNING! !WARNING! !WARNING! --
|
||||
-- DO NOT TOUCH THIS FILE OR YOU /WILL/ FUCK SHIT UP! EDIT THE CONFIG.LUA --
|
||||
-- DO NOT BE STUPID AND WHINE TO ME ABOUT THIS BEING BROKEN IF YOU TOUCHED THE LINES BELOW. --
|
||||
----------------------------------------------------------------------------------------------
|
||||
|
||||
local label =
|
||||
[[
|
||||
//
|
||||
||
|
||||
||
|
||||
|| ______ __ ___ ____ _ _______
|
||||
|| / ____/___ _/ /___ ___ / | / _/ | | / /__ /
|
||||
|| / / / __ `/ / __ `__ \______/ /| | / / | | / / /_ <
|
||||
|| / /___/ /_/ / / / / / / /_____/ ___ |_/ / | |/ /___/ /
|
||||
|| \____/\__,_/_/_/ /_/ /_/ /_/ |_/___/ |___//____/
|
||||
||
|
||||
||
|
||||
|| Created by Jordan.#2139
|
||||
||]]
|
||||
|
||||
Citizen.CreateThread(function()
|
||||
local CurrentVersion = GetResourceMetadata(GetCurrentResourceName(), 'version', 0)
|
||||
if not CurrentVersion then
|
||||
print('^1Calm-AI V3 Version Check Failed!^7')
|
||||
end
|
||||
|
||||
function VersionCheckHTTPRequest()
|
||||
PerformHttpRequest('https://raw.githubusercontent.com/Jordan2139/versions/master/calmv3.json', VersionCheck, 'GET')
|
||||
end
|
||||
|
||||
function VersionCheck(err, response, headers)
|
||||
Citizen.Wait(3000)
|
||||
if err == 200 then
|
||||
local Data = json.decode(response)
|
||||
if CurrentVersion ~= Data.NewestVersion then
|
||||
print( label )
|
||||
print(' || \n || Calm-AI V3 is outdated!')
|
||||
print(' || Current version: ^2' .. Data.NewestVersion .. '^7')
|
||||
print(' || Your version: ^1' .. CurrentVersion .. '^7')
|
||||
print(' || Please download the lastest version from ^5' .. Data.DownloadLocation .. '^7')
|
||||
if Data.Changes ~= '' then
|
||||
print(' || \n || ^5Changes: ^7' .. Data.Changes .. "\n^0 \\\\\n")
|
||||
end
|
||||
else
|
||||
print( label )
|
||||
print(' || ^2Calm-AI V3 is up to date!\n^0 ||\n \\\\\n')
|
||||
end
|
||||
else
|
||||
print( label )
|
||||
print(' || ^1There was an error getting the latest version information, if the issue persists contact Jordan.#2139 on Discord.\n^0 ||\n \\\\\n')
|
||||
end
|
||||
|
||||
SetTimeout(60000000, VersionCheckHTTPRequest)
|
||||
end
|
||||
|
||||
VersionCheckHTTPRequest()
|
||||
end)
|
||||
@@ -0,0 +1,34 @@
|
||||
Advanced nitro system for FiveM
|
||||
===============================
|
||||
|
||||
The most advanced nitro system for FiveM, inspired by the Need for Speed: Underground series. Works out of the box, no configuration is required.
|
||||
|
||||
Features
|
||||
--------
|
||||
|
||||
- Torque-based speed modifier
|
||||
- Exhaust particles
|
||||
- NOS purge
|
||||
- Light trails
|
||||
<!-- - Nitro fuel system -->
|
||||
- Screen effects
|
||||
- Fully synced
|
||||
- Controller support
|
||||
|
||||
<!--
|
||||
Planned features:
|
||||
- Implement exported API for:
|
||||
- Customizable control configuration
|
||||
- Customizable speed modifier
|
||||
- Customizable exhaust particles
|
||||
- Customizable purge locations & colors
|
||||
- Customizable light trail length, fade & color
|
||||
- Customizable nitro fuel depletion speed
|
||||
- Synchronized nitro fuel levels
|
||||
-->
|
||||
|
||||
Controls
|
||||
--------
|
||||
|
||||
- **Keyboard**: Hold `INPUT_CHARACTER_WHEEL` (Default: left ALT)
|
||||
- **Gamepad:** Hold `INPUT_VEH_DUCK` (Default: A on Xbox, X on DualShock)
|
||||
@@ -0,0 +1,74 @@
|
||||
local vehicles = {}
|
||||
|
||||
function SetNitroBoostScreenEffectsEnabled(enabled)
|
||||
if enabled then
|
||||
StopScreenEffect('RaceTurbo')
|
||||
StartScreenEffect('RaceTurbo', 0, false)
|
||||
SetTimecycleModifier('rply_motionblur')
|
||||
ShakeGameplayCam('SKY_DIVING_SHAKE', 0.25)
|
||||
else
|
||||
StopGameplayCamShaking(true)
|
||||
SetTransitionTimecycleModifier('default', 0.35)
|
||||
end
|
||||
end
|
||||
|
||||
function IsVehicleNitroBoostEnabled(vehicle)
|
||||
return vehicles[vehicle] == true
|
||||
end
|
||||
|
||||
function SetVehicleNitroBoostEnabled(vehicle, enabled)
|
||||
if IsVehicleNitroBoostEnabled(vehicle) == enabled then
|
||||
return
|
||||
end
|
||||
|
||||
if IsPedInVehicle(PlayerPedId(), vehicle) then
|
||||
SetNitroBoostScreenEffectsEnabled(enabled)
|
||||
end
|
||||
|
||||
SetVehicleBoostActive(vehicle, enabled)
|
||||
vehicles[vehicle] = enabled or nil
|
||||
end
|
||||
|
||||
Citizen.CreateThread(function ()
|
||||
local function BackfireLoop()
|
||||
-- TODO: Only do this for nearby vehicles.
|
||||
for vehicle in pairs(vehicles) do
|
||||
CreateVehicleExhaustBackfire(vehicle, 1.25)
|
||||
end
|
||||
end
|
||||
|
||||
while true do
|
||||
Citizen.Wait(0)
|
||||
BackfireLoop()
|
||||
end
|
||||
end)
|
||||
|
||||
Citizen.CreateThread(function ()
|
||||
local function BoostLoop()
|
||||
local player = PlayerPedId()
|
||||
local vehicle = GetVehiclePedIsIn(player)
|
||||
local driver = GetPedInVehicleSeat(vehicle, -1)
|
||||
local enabled = IsVehicleNitroBoostEnabled(vehicle)
|
||||
|
||||
if vehicle == 0 or driver ~= player or not enabled then
|
||||
return
|
||||
end
|
||||
|
||||
-- TODO: Use better math. The effect of nitro is quite extreme for cars with
|
||||
-- custom handling, while slow cars have almost no effect from this at all.
|
||||
-- Also, maybe torque is not the correct setting to change.
|
||||
if not IsVehicleStopped(vehicle) then
|
||||
local vehicleModel = GetEntityModel(vehicle)
|
||||
local currentSpeed = GetEntitySpeed(vehicle)
|
||||
local maximumSpeed = GetVehicleModelMaxSpeed(vehicleModel)
|
||||
local multiplier = 2.0 * maximumSpeed / currentSpeed
|
||||
|
||||
SetVehicleEngineTorqueMultiplier(vehicle, multiplier)
|
||||
end
|
||||
end
|
||||
|
||||
while true do
|
||||
Citizen.Wait(0)
|
||||
BoostLoop()
|
||||
end
|
||||
end)
|
||||
@@ -0,0 +1,81 @@
|
||||
local vehicles = {}
|
||||
local lastNitro = 0
|
||||
local nitroCooldown = 2500 -- TODO: per-vehicle cooldown?
|
||||
|
||||
local nitroFuelSize = 2000
|
||||
local nitroFuelDrainRate = 10
|
||||
local nitroPurgeFuelDrainRate = nitroFuelDrainRate * 2
|
||||
local nitroRechargeRate = nitroFuelDrainRate / 2
|
||||
|
||||
function InitNitroFuel(vehicle)
|
||||
if not vehicles[vehicle] then
|
||||
vehicles[vehicle] = nitroFuelSize
|
||||
end
|
||||
end
|
||||
|
||||
function DrainNitroFuel(vehicle, purge)
|
||||
if not purge then
|
||||
purge = false
|
||||
end
|
||||
|
||||
if not vehicles[vehicle] then
|
||||
vehicles[vehicle] = nitroFuelSize
|
||||
end
|
||||
|
||||
if vehicles[vehicle] > 0 then
|
||||
if purge then
|
||||
vehicles[vehicle] = vehicles[vehicle] - nitroFuelDrainRate * 2
|
||||
else
|
||||
vehicles[vehicle] = vehicles[vehicle] - nitroFuelDrainRate
|
||||
end
|
||||
lastNitro = GetGameTimer()
|
||||
end
|
||||
end
|
||||
|
||||
function RechargeNitroFuel(vehicle)
|
||||
if not vehicles[vehicle] then
|
||||
vehicles[vehicle] = nitroFuelSize
|
||||
end
|
||||
|
||||
if vehicles[vehicle] and vehicles[vehicle] < nitroFuelSize then
|
||||
vehicles[vehicle] = vehicles[vehicle] + nitroRechargeRate
|
||||
end
|
||||
end
|
||||
|
||||
function GetNitroFuelLevel(vehicle)
|
||||
if vehicles[vehicle] then
|
||||
return math.max(0, vehicles[vehicle])
|
||||
end
|
||||
|
||||
return 0
|
||||
end
|
||||
|
||||
function SetNitroFuelLevel(vehicle, level)
|
||||
vehicles[vehicle] = level
|
||||
end
|
||||
|
||||
Citizen.CreateThread(function ()
|
||||
local function FuelLoop()
|
||||
local player = PlayerPedId()
|
||||
local vehicle = GetVehiclePedIsIn(player)
|
||||
local driver = GetPedInVehicleSeat(vehicle, -1)
|
||||
local isRunning = GetIsVehicleEngineRunning(vehicle)
|
||||
local isBoosting = IsVehicleNitroBoostEnabled(vehicle)
|
||||
local isPurging = IsVehicleNitroPurgeEnabled(vehicle)
|
||||
|
||||
if vehicle == 0 or driver ~= player or not isRunning then
|
||||
return
|
||||
end
|
||||
|
||||
if isRunning then
|
||||
if isBoosting == false and isPurging == false and GetGameTimer() > lastNitro + nitroCooldown then
|
||||
RechargeNitroFuel(vehicle)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
while true do
|
||||
Citizen.Wait(0)
|
||||
FuelLoop()
|
||||
end
|
||||
end)
|
||||
@@ -0,0 +1,114 @@
|
||||
local INPUT_CHARACTER_WHEEL = 19
|
||||
local INPUT_VEH_ACCELERATE = 71
|
||||
local INPUT_VEH_DUCK = 73
|
||||
|
||||
local function IsNitroControlPressed()
|
||||
if not IsInputDisabled(2) then
|
||||
DisableControlAction(2, INPUT_VEH_DUCK)
|
||||
return IsDisabledControlPressed(2, INPUT_VEH_DUCK)
|
||||
end
|
||||
|
||||
return IsControlPressed(0, INPUT_CHARACTER_WHEEL)
|
||||
end
|
||||
|
||||
local function IsDrivingControlPressed()
|
||||
return IsControlPressed(0, INPUT_VEH_ACCELERATE)
|
||||
end
|
||||
|
||||
local function NitroLoop(lastVehicle)
|
||||
local player = PlayerPedId()
|
||||
local vehicle = GetVehiclePedIsIn(player)
|
||||
local driver = GetPedInVehicleSeat(vehicle, -1)
|
||||
|
||||
if lastVehicle ~= 0 and lastVehicle ~= vehicle then
|
||||
SetVehicleNitroBoostEnabled(lastVehicle, false)
|
||||
SetVehicleLightTrailEnabled(lastVehicle, false)
|
||||
SetVehicleNitroPurgeEnabled(lastVehicle, false)
|
||||
TriggerServerEvent('nitro:__sync', false, false, true)
|
||||
end
|
||||
|
||||
if vehicle == 0 or driver ~= player then
|
||||
return 0
|
||||
end
|
||||
|
||||
local model = GetEntityModel(vehicle)
|
||||
|
||||
if not IsThisModelACar(model) or IsVehicleElectric(vehicle) then
|
||||
return 0
|
||||
end
|
||||
|
||||
local isEnabled = IsNitroControlPressed()
|
||||
local isDriving = IsDrivingControlPressed()
|
||||
local isRunning = GetIsVehicleEngineRunning(vehicle)
|
||||
local isBoosting = IsVehicleNitroBoostEnabled(vehicle)
|
||||
local isPurging = IsVehicleNitroPurgeEnabled(vehicle)
|
||||
local isFueled = GetNitroFuelLevel(vehicle) > 0
|
||||
|
||||
if isRunning and isEnabled and isFueled then
|
||||
if isDriving then
|
||||
if not isBoosting then
|
||||
SetVehicleNitroBoostEnabled(vehicle, true)
|
||||
SetVehicleLightTrailEnabled(vehicle, true)
|
||||
SetVehicleNitroPurgeEnabled(vehicle, false)
|
||||
TriggerServerEvent('nitro:__sync', true, false, false)
|
||||
end
|
||||
else
|
||||
if not isPurging then
|
||||
SetVehicleNitroBoostEnabled(vehicle, false)
|
||||
SetVehicleLightTrailEnabled(vehicle, false)
|
||||
SetVehicleNitroPurgeEnabled(vehicle, true)
|
||||
TriggerServerEvent('nitro:__sync', false, true, false)
|
||||
end
|
||||
end
|
||||
elseif isBoosting or isPurging then
|
||||
SetVehicleNitroBoostEnabled(vehicle, false)
|
||||
SetVehicleLightTrailEnabled(vehicle, false)
|
||||
SetVehicleNitroPurgeEnabled(vehicle, false)
|
||||
TriggerServerEvent('nitro:__sync', false, false, false)
|
||||
end
|
||||
|
||||
return vehicle
|
||||
end
|
||||
|
||||
Citizen.CreateThread(function ()
|
||||
local lastVehicle = 0
|
||||
|
||||
while true do
|
||||
Citizen.Wait(0)
|
||||
lastVehicle = NitroLoop(lastVehicle)
|
||||
end
|
||||
end)
|
||||
|
||||
RegisterNetEvent('nitro:__update')
|
||||
AddEventHandler('nitro:__update', function (playerServerId, boostEnabled, purgeEnabled, lastVehicle)
|
||||
local playerId = GetPlayerFromServerId(playerServerId)
|
||||
|
||||
-- Sometimes, the source player is disconnected from our session. If we don't
|
||||
-- check for that, their player ID will be -1. GetPlayerPed(-1) is our local
|
||||
-- player, so the logic to apply nitro sync will apply it to our vehicle when
|
||||
-- that happens.
|
||||
--
|
||||
-- Say, the source player enables nitro, but is not connected in our session.
|
||||
-- Nitro is then synced on the vehicle for player -1, which is us, so nitro is
|
||||
-- activated on our vehicle. However, because we're not actually pressing the
|
||||
-- nitro key, our client will update the nitro state accordingly, and turn it
|
||||
-- off. That then syncs to the original source player, who has the exact same
|
||||
-- network issue as we do. Nitro will be disabled on his vehicle, but he's
|
||||
-- still pressing the nitro key, so it's being enabled right after. Long story
|
||||
-- short, this causes an infinite sync loop between all clients as long as at
|
||||
-- least one player has nitro activated.
|
||||
--
|
||||
-- Therefor, simply check if the source player is connected to our session. If
|
||||
-- not, ignore the synced state and don't do anything.
|
||||
if not NetworkIsPlayerConnected(playerId) then
|
||||
return
|
||||
end
|
||||
|
||||
local player = GetPlayerPed(playerId)
|
||||
local vehicle = GetVehiclePedIsIn(player, lastVehicle)
|
||||
local driver = GetPedInVehicleSeat(vehicle, -1)
|
||||
|
||||
SetVehicleNitroBoostEnabled(vehicle, boostEnabled)
|
||||
SetVehicleLightTrailEnabled(vehicle, boostEnabled)
|
||||
SetVehicleNitroPurgeEnabled(vehicle, purgeEnabled)
|
||||
end)
|
||||
@@ -0,0 +1,82 @@
|
||||
-- TODO: Get actual exhaust positions and rotations. This is based on bone
|
||||
-- positions, but custom exhausts can have different positions or rotations.
|
||||
function CreateVehicleExhaustBackfire(vehicle, scale)
|
||||
local exhaustNames = {
|
||||
"exhaust", "exhaust_2", "exhaust_3", "exhaust_4",
|
||||
"exhaust_5", "exhaust_6", "exhaust_7", "exhaust_8",
|
||||
"exhaust_9", "exhaust_10", "exhaust_11", "exhaust_12",
|
||||
"exhaust_13", "exhaust_14", "exhaust_15", "exhaust_16"
|
||||
}
|
||||
|
||||
for _, exhaustName in ipairs(exhaustNames) do
|
||||
local boneIndex = GetEntityBoneIndexByName(vehicle, exhaustName)
|
||||
|
||||
if boneIndex ~= -1 then
|
||||
local pos = GetWorldPositionOfEntityBone(vehicle, boneIndex)
|
||||
local off = GetOffsetFromEntityGivenWorldCoords(vehicle, pos.x, pos.y, pos.z)
|
||||
|
||||
UseParticleFxAssetNextCall('core')
|
||||
StartParticleFxNonLoopedOnEntity('veh_backfire', vehicle, off.x, off.y, off.z, 0.0, 0.0, 0.0, scale, false, false, false)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function CreateVehiclePurgeSpray(vehicle, xOffset, yOffset, zOffset, xRot, yRot, zRot, scale)
|
||||
UseParticleFxAssetNextCall('core')
|
||||
return StartParticleFxLoopedOnEntity('ent_sht_steam', vehicle, xOffset, yOffset, zOffset, xRot, yRot, zRot, scale, false, false, false)
|
||||
end
|
||||
|
||||
function CreateVehicleLightTrail(vehicle, bone, scale)
|
||||
UseParticleFxAssetNextCall('core')
|
||||
local ptfx = StartParticleFxLoopedOnEntityBone('veh_light_red_trail', vehicle, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, bone, scale, false, false, false)
|
||||
SetParticleFxLoopedEvolution(ptfx, "speed", 1.0, false)
|
||||
return ptfx
|
||||
end
|
||||
|
||||
function StopVehicleLightTrail(ptfx, duration)
|
||||
Citizen.CreateThread(function()
|
||||
local startTime = GetGameTimer()
|
||||
local endTime = GetGameTimer() + duration
|
||||
while GetGameTimer() < endTime do
|
||||
Citizen.Wait(0)
|
||||
local now = GetGameTimer()
|
||||
local scale = (endTime - now) / duration
|
||||
SetParticleFxLoopedScale(ptfx, scale)
|
||||
SetParticleFxLoopedAlpha(ptfx, scale)
|
||||
end
|
||||
StopParticleFxLooped(ptfx)
|
||||
end)
|
||||
end
|
||||
|
||||
-- function CreateVehiclePurgeSpray(vehicle, xOffset, yOffset, zOffset, xRot, yRot, zRot, scale, density, r, g, b)
|
||||
-- local boneIndex = GetEntityBoneIndexByName(vehicle, 'bonnet')
|
||||
-- local pos = GetWorldPositionOfEntityBone(vehicle, boneIndex)
|
||||
-- local off = GetOffsetFromEntityGivenWorldCoords(vehicle, pos.x, pos.y, pos.z)
|
||||
--
|
||||
-- local xOffset = (xOffset or 0) + off.x
|
||||
-- local yOffset = (yOffset or 0) + off.y
|
||||
-- local zOffset = (zOffset or 0) + off.z
|
||||
--
|
||||
-- local xRot = xRot or 0
|
||||
-- local yRot = yRot or 0
|
||||
-- local zRot = zRot or 0
|
||||
--
|
||||
-- local scale = scale or 0.5
|
||||
-- local density = density or 3
|
||||
--
|
||||
-- local r = (r or 255) / 255
|
||||
-- local g = (g or 255) / 255
|
||||
-- local b = (b or 255) / 255
|
||||
--
|
||||
-- local particles = {}
|
||||
--
|
||||
-- for i = 0, density do
|
||||
-- UseParticleFxAssetNextCall('core')
|
||||
-- local fx1 = StartParticleFxLoopedOnEntity('ent_sht_steam', vehicle, off.x - 0.5, off.y + 0.05, off.z, 40.0, -20.0, 0.0, 0.5, false, false, false)
|
||||
-- SetParticleFxLoopedColour(fx1, r, g, b)
|
||||
--
|
||||
-- UseParticleFxAssetNextCall('core')
|
||||
-- local fx2 = StartParticleFxLoopedOnEntity('ent_sht_steam', vehicle, off.x + 0.5, off.y + 0.05, off.z, 40.0, 20.0, 0.0, 0.5, false, false, false)
|
||||
-- SetParticleFxLoopedColour(fx2, r, g, b)
|
||||
-- end
|
||||
-- end
|
||||
@@ -0,0 +1,74 @@
|
||||
-- local DEFAULT_PURGE_CONFIG = {
|
||||
-- infernus = {
|
||||
-- [1] = {
|
||||
-- scale: 0.5,
|
||||
-- density: 3,
|
||||
-- color: { 255, 255, 255 },
|
||||
-- position: { 0.0, 0.0, 0.0 },
|
||||
-- rotation: { 0.0, 0.0, 0.0 }
|
||||
-- }
|
||||
-- }
|
||||
-- }
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
-- local modelConfig = {}
|
||||
-- local entityConfig = {}
|
||||
--
|
||||
-- local function AddVehicleModelNitroPurgeNozzle() end
|
||||
-- local function RemoveVehicleModelNitroPurgeNozzle() end
|
||||
-- local function SetVehicleModelNitroPurgeNozzleScale() end
|
||||
-- local function SetVehicleModelNitroPurgeNozzleDensity() end
|
||||
-- local function SetVehicleModelNitroPurgeNozzleColor() end
|
||||
-- local function SetVehicleModelNitroPurgeNozzlePosition() end
|
||||
-- local function SetVehicleModelNitroPurgeNozzleRotation() end
|
||||
--
|
||||
-- local function AddVehicleNitroPurgeNozzle() end
|
||||
-- local function RemoveVehicleNitroPurgeNozzle() end
|
||||
-- local function SetVehicleNitroPurgeNozzleScale() end
|
||||
-- local function SetVehicleNitroPurgeNozzleDensity() end
|
||||
-- local function SetVehicleNitroPurgeNozzleColor() end
|
||||
-- local function SetVehicleNitroPurgeNozzlePosition() end
|
||||
-- local function SetVehicleNitroPurgeNozzleRotation() end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
local vehicles = {}
|
||||
local particles = {}
|
||||
|
||||
function IsVehicleNitroPurgeEnabled(vehicle)
|
||||
return vehicles[vehicle] == true
|
||||
end
|
||||
|
||||
function SetVehicleNitroPurgeEnabled(vehicle, enabled)
|
||||
if IsVehicleNitroPurgeEnabled(vehicle) == enabled then
|
||||
return
|
||||
end
|
||||
|
||||
if enabled then
|
||||
local bone = GetEntityBoneIndexByName(vehicle, 'bonnet')
|
||||
local pos = GetWorldPositionOfEntityBone(vehicle, bone)
|
||||
local off = GetOffsetFromEntityGivenWorldCoords(vehicle, pos.x, pos.y, pos.z)
|
||||
local ptfxs = {}
|
||||
|
||||
for i=0,3 do
|
||||
local leftPurge = CreateVehiclePurgeSpray(vehicle, off.x - 0.5, off.y + 0.05, off.z, 40.0, -20.0, 0.0, 0.5)
|
||||
local rightPurge = CreateVehiclePurgeSpray(vehicle, off.x + 0.5, off.y + 0.05, off.z, 40.0, 20.0, 0.0, 0.5)
|
||||
|
||||
table.insert(ptfxs, leftPurge)
|
||||
table.insert(ptfxs, rightPurge)
|
||||
end
|
||||
|
||||
vehicles[vehicle] = true
|
||||
particles[vehicle] = ptfxs
|
||||
else
|
||||
if particles[vehicle] and #particles[vehicle] > 0 then
|
||||
for _, particleId in ipairs(particles[vehicle]) do
|
||||
StopParticleFxLooped(particleId)
|
||||
end
|
||||
end
|
||||
|
||||
vehicles[vehicle] = nil
|
||||
particles[vehicle] = nil
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,36 @@
|
||||
-- synced by Xinerki :^)
|
||||
|
||||
local vehicles = {}
|
||||
local particles = {}
|
||||
|
||||
function IsVehicleLightTrailEnabled(vehicle)
|
||||
return vehicles[vehicle] == true
|
||||
end
|
||||
|
||||
function SetVehicleLightTrailEnabled(vehicle, enabled)
|
||||
if IsVehicleLightTrailEnabled(vehicle) == enabled then
|
||||
return
|
||||
end
|
||||
|
||||
if enabled then
|
||||
local ptfxs = {}
|
||||
|
||||
local leftTrail = CreateVehicleLightTrail(vehicle, GetEntityBoneIndexByName(vehicle, "taillight_l"), 1.0)
|
||||
local rightTrail = CreateVehicleLightTrail(vehicle, GetEntityBoneIndexByName(vehicle, "taillight_r"), 1.0)
|
||||
|
||||
table.insert(ptfxs, leftTrail)
|
||||
table.insert(ptfxs, rightTrail)
|
||||
|
||||
vehicles[vehicle] = true
|
||||
particles[vehicle] = ptfxs
|
||||
else
|
||||
if particles[vehicle] and #particles[vehicle] > 0 then
|
||||
for _, particleId in ipairs(particles[vehicle]) do
|
||||
StopVehicleLightTrail(particleId, 500)
|
||||
end
|
||||
end
|
||||
|
||||
vehicles[vehicle] = nil
|
||||
particles[vehicle] = nil
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,22 @@
|
||||
local ELECTRIC_VEHICLES = {
|
||||
[GetHashKey('AIRTUG')] = true,
|
||||
[GetHashKey('CYCLONE')] = true,
|
||||
[GetHashKey('CADDY')] = true,
|
||||
[GetHashKey('CADDY2')] = true,
|
||||
[GetHashKey('CADDY3')] = true,
|
||||
[GetHashKey('DILETTANTE')] = true,
|
||||
[GetHashKey('IMORGON')] = true,
|
||||
[GetHashKey('KHAMEL')] = true,
|
||||
[GetHashKey('NEON')] = true,
|
||||
[GetHashKey('RAIDEN')] = true,
|
||||
[GetHashKey('SURGE')] = true,
|
||||
[GetHashKey('VOLTIC')] = true,
|
||||
[GetHashKey('TEZERACT')] = true
|
||||
}
|
||||
|
||||
-- TODO: Replace with `FLAG_IS_ELECTRIC` from vehicles.meta:
|
||||
-- https://gtamods.com/wiki/Vehicles.meta
|
||||
function IsVehicleElectric(vehicle)
|
||||
local model = GetEntityModel(vehicle)
|
||||
return ELECTRIC_VEHICLES[model] or false
|
||||
end
|
||||
@@ -0,0 +1,17 @@
|
||||
fx_version 'bodacious'
|
||||
game 'gta5'
|
||||
|
||||
name 'sw-nitro'
|
||||
description 'The most advanced nitro system for FiveM'
|
||||
author 'Deltanic - https://github.com/Deltanic/'
|
||||
url 'https://github.com/swcfx/sw-nitro'
|
||||
|
||||
client_script 'client/utils.lua'
|
||||
client_script 'client/fuel.lua'
|
||||
client_script 'client/ptfx.lua'
|
||||
client_script 'client/boost.lua'
|
||||
client_script 'client/purge.lua'
|
||||
client_script 'client/trails.lua'
|
||||
client_script 'client/main.lua'
|
||||
|
||||
server_script 'server/main.lua'
|
||||
@@ -0,0 +1,11 @@
|
||||
RegisterNetEvent('nitro:__sync')
|
||||
AddEventHandler('nitro:__sync', function (boostEnabled, purgeEnabled, lastVehicle)
|
||||
-- Fix for source reference being lost during loop below.
|
||||
local source = source
|
||||
|
||||
for _, player in ipairs(GetPlayers()) do
|
||||
if player ~= tostring(source) then
|
||||
TriggerClientEvent('nitro:__update', player, source, boostEnabled, purgeEnabled, lastVehicle)
|
||||
end
|
||||
end
|
||||
end)
|
||||
@@ -0,0 +1 @@
|
||||
client_script "client.lua"
|
||||
@@ -0,0 +1,10 @@
|
||||
Citizen.CreateThread(function()
|
||||
while true do
|
||||
Citizen.Wait(1)
|
||||
car = GetVehiclePedIsIn(GetPlayerPed(-1), false)
|
||||
|
||||
if car then
|
||||
Citizen.InvokeNative(0xB736A491E64A32CF,Citizen.PointerValueIntInitialized(car))
|
||||
end
|
||||
end
|
||||
end)
|
||||
@@ -0,0 +1,2 @@
|
||||
resource_manifest_version '77731fab-63ca-442c-a67b-abc70f28dfa5'
|
||||
client_script 'carhud.lua'
|
||||
@@ -0,0 +1,154 @@
|
||||
-- ###################################
|
||||
--
|
||||
-- C O N F I G
|
||||
--
|
||||
-- ###################################
|
||||
|
||||
|
||||
|
||||
-- show/hide compoent
|
||||
local HUD = {
|
||||
|
||||
Speed = 'mph', -- kmh or mph
|
||||
|
||||
DamageSystem = true,
|
||||
|
||||
SpeedIndicator = true,
|
||||
|
||||
ParkIndicator = false,
|
||||
|
||||
Top = true, -- ALL TOP PANAL ( oil, dsc, plate, fluid, ac )
|
||||
|
||||
Plate = true, -- only if Top is false and you want to keep Plate Number
|
||||
|
||||
}
|
||||
|
||||
-- move all ui
|
||||
local UI = {
|
||||
|
||||
x = 0.000 , -- Base Screen Coords + x
|
||||
y = -0.001 , -- Base Screen Coords + -y
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
-- ###################################
|
||||
--
|
||||
-- C O D E
|
||||
--
|
||||
-- ###################################
|
||||
|
||||
|
||||
|
||||
Citizen.CreateThread(function()
|
||||
while true do Citizen.Wait(1)
|
||||
|
||||
|
||||
local MyPed = GetPlayerPed(-1)
|
||||
|
||||
if(IsPedInAnyVehicle(MyPed, false))then
|
||||
|
||||
local MyPedVeh = GetVehiclePedIsIn(GetPlayerPed(-1),false)
|
||||
local PlateVeh = GetVehicleNumberPlateText(MyPedVeh)
|
||||
local VehStopped = IsVehicleStopped(MyPedVeh)
|
||||
local VehEngineHP = GetVehicleEngineHealth(MyPedVeh)
|
||||
local VehBodyHP = GetVehicleBodyHealth(MyPedVeh)
|
||||
local VehBurnout = IsVehicleInBurnout(MyPedVeh)
|
||||
|
||||
if HUD.Speed == 'kmh' then
|
||||
Speed = GetEntitySpeed(GetVehiclePedIsIn(GetPlayerPed(-1), false)) * 3.6
|
||||
elseif HUD.Speed == 'mph' then
|
||||
Speed = GetEntitySpeed(GetVehiclePedIsIn(GetPlayerPed(-1), false)) * 2.236936
|
||||
else
|
||||
Speed = 0.0
|
||||
end
|
||||
|
||||
if HUD.Top then
|
||||
drawTxt(UI.x + 0.563, UI.y + 1.2624, 1.0,1.0,0.55, "~w~" .. PlateVeh, 255, 255, 255, 255)
|
||||
drawTxt(UI.x + 0.619, UI.y + 1.245, 1.0,1.0,0.45, "ENG", 114, 219, 165,200)
|
||||
|
||||
if VehBurnout then
|
||||
drawTxt(UI.x + 0.535, UI.y + 1.266, 1.0,1.0,0.44, "~r~DSC", 255, 255, 255, 200)
|
||||
else
|
||||
drawTxt(UI.x + 0.535, UI.y + 1.266, 1.0,1.0,0.44, "DSC", 255, 255, 255, 150)
|
||||
end
|
||||
|
||||
if (VehEngineHP > 0) and (VehEngineHP < 300) then
|
||||
drawTxt(UI.x + 0.619, UI.y + 1.266, 1.0,1.0,0.45, "~r~Fluid", 255, 255, 255, 200)
|
||||
drawTxt(UI.x + 0.514, UI.y + 1.266, 1.0,1.0,0.45, "~r~Oil", 255, 255, 255, 200)
|
||||
drawTxt(UI.x + 0.645, UI.y + 1.266, 1.0,1.0,0.45, "~r~AC", 255, 255, 255, 200)
|
||||
drawTxt(UI.x + 0.619, UI.y + 1.245, 1.0,1.0,0.45, "~r~ENG", 255, 255, 255, 200)
|
||||
elseif VehEngineHP < 1 then
|
||||
drawRct(UI.x + 0.159, UI.y + 0.809, 0.005, 0,0,0,0,100) -- panel damage
|
||||
drawTxt(UI.x + 0.619, UI.y + 1.266, 1.0,1.0,0.45, "~r~Fluid", 255, 255, 255, 200)
|
||||
drawTxt(UI.x + 0.514, UI.y + 1.266, 1.0,1.0,0.45, "~r~Oil", 255, 255, 255, 200)
|
||||
drawTxt(UI.x + 0.645, UI.y + 1.266, 1.0,1.0,0.45, "~r~AC", 255, 255, 255, 200)
|
||||
drawTxt(UI.x + 0.619, UI.y + 1.245, 1.0,1.0,0.45, "~r~ENG", 255, 255, 255, 200)
|
||||
else
|
||||
drawTxt(UI.x + 0.619, UI.y + 1.266, 1.0,1.0,0.45, "Fluid", 255, 255, 255, 150)
|
||||
drawTxt(UI.x + 0.514, UI.y + 1.266, 1.0,1.0,0.45, "Oil", 255, 255, 255, 150)
|
||||
drawTxt(UI.x + 0.645, UI.y + 1.266, 1.0,1.0,0.45, "AC", 255, 255, 255, 150)
|
||||
drawTxt(UI.x + 0.619, UI.y + 1.245, 1.0,1.0,0.45, "ENG", 87, 158, 113,200)
|
||||
end
|
||||
if HUD.ParkIndicator then
|
||||
if VehStopped then
|
||||
drawTxt(UI.x + 0.6605, UI.y + 1.262, 1.0,1.0,0.6, "~r~P", 255, 255, 255, 200)
|
||||
else
|
||||
drawTxt(UI.x + 0.6605, UI.y + 1.262, 1.0,1.0,0.6, "P", 255, 255, 255, 150)
|
||||
end
|
||||
end
|
||||
else
|
||||
if HUD.Plate then
|
||||
drawTxt(UI.x + 0.61, UI.y + 1.385, 1.0,1.0,0.55, "~w~" .. PlateVeh, 255, 255, 255, 255)
|
||||
end
|
||||
if HUD.ParkIndicator then
|
||||
|
||||
if VehStopped then
|
||||
drawTxt(UI.x + 0.643, UI.y + 1.34, 1.0,1.0,0.6, "~r~P", 255, 255, 255, 200)
|
||||
else
|
||||
drawTxt(UI.x + 0.643, UI.y + 1.34, 1.0,1.0,0.6, "P", 255, 255, 255, 150)
|
||||
end
|
||||
end
|
||||
end
|
||||
if HUD.SpeedIndicator then
|
||||
drawRct(UI.x + 0.11, UI.y + 0.932, 0.046,0.03,0,0,0,150) -- Speed panel
|
||||
if HUD.Speed == 'kmh' then
|
||||
drawTxt(UI.x + 0.61, UI.y + 1.42, 1.0,1.0,0.64 , "~w~" .. math.ceil(Speed), 255, 255, 255, 255)
|
||||
drawTxt(UI.x + 0.633, UI.y + 1.432, 1.0,1.0,0.4, "~w~ km/h", 255, 255, 255, 255)
|
||||
elseif HUD.Speed == 'mph' then
|
||||
drawTxt(UI.x + 0.61, UI.y + 1.42, 1.0,1.0,0.64 , "~w~" .. math.ceil(Speed), 255, 255, 255, 255)
|
||||
drawTxt(UI.x + 0.633, UI.y + 1.432, 1.0,1.0,0.4, "~w~ mph", 255, 255, 255, 255)
|
||||
else
|
||||
drawTxt(UI.x + 0.81, UI.y + 1.42, 1.0,1.0,0.64 , [[Carhud ~r~ERROR~w~ ~c~in ~w~HUD Speed~c~ config (something else than ~y~'kmh'~c~ or ~y~'mph'~c~)]], 255, 255, 255, 255)
|
||||
end
|
||||
end
|
||||
|
||||
if HUD.DamageSystem then
|
||||
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
function drawTxt(x,y ,width,height,scale, text, r,g,b,a)
|
||||
SetTextFont(4)
|
||||
SetTextProportional(0)
|
||||
SetTextScale(scale, scale)
|
||||
SetTextColour(r, g, b, a)
|
||||
SetTextDropShadow(0, 0, 0, 0,255)
|
||||
SetTextEdge(2, 0, 0, 0, 255)
|
||||
SetTextDropShadow()
|
||||
SetTextOutline()
|
||||
SetTextEntry("STRING")
|
||||
AddTextComponentString(text)
|
||||
DrawText(x - width/2, y - height/2 + 0.005)
|
||||
end
|
||||
|
||||
function drawRct(x,y,width,height,r,g,b,a)
|
||||
DrawRect(x + width/2, y + height/2, width, height, r, g, b, a)
|
||||
end
|
||||
@@ -0,0 +1,6 @@
|
||||
# Carry People by Robbster
|
||||
|
||||
Instructions on how to use:
|
||||
Type /carry close to someone then either person can cancel by again doing /carry
|
||||
|
||||
Feel free to make improvements with PRs
|
||||
@@ -0,0 +1,2 @@
|
||||
client_script "cl_carry.lua"
|
||||
server_script "sv_carry.lua"
|
||||
@@ -0,0 +1,137 @@
|
||||
local carryingBackInProgress = false
|
||||
local carryAnimNamePlaying = ""
|
||||
local carryAnimDictPlaying = ""
|
||||
local carryControlFlagPlaying = 0
|
||||
|
||||
RegisterCommand("carry",function(source, args)
|
||||
if not carryingBackInProgress then
|
||||
local player = PlayerPedId()
|
||||
lib = 'missfinale_c2mcs_1'
|
||||
anim1 = 'fin_c2_mcs_1_camman'
|
||||
lib2 = 'nm'
|
||||
anim2 = 'firemans_carry'
|
||||
distans = 0.15
|
||||
distans2 = 0.27
|
||||
height = 0.63
|
||||
spin = 0.0
|
||||
length = 100000
|
||||
controlFlagMe = 49
|
||||
controlFlagTarget = 33
|
||||
animFlagTarget = 1
|
||||
local closestPlayer = GetClosestPlayer(3)
|
||||
target = GetPlayerServerId(closestPlayer)
|
||||
if closestPlayer ~= -1 and closestPlayer ~= nil then
|
||||
carryingBackInProgress = true
|
||||
TriggerServerEvent('CarryPeople:sync', closestPlayer, lib,lib2, anim1, anim2, distans, distans2, height,target,length,spin,controlFlagMe,controlFlagTarget,animFlagTarget)
|
||||
else
|
||||
drawNativeNotification("No one nearby to carry!")
|
||||
end
|
||||
else
|
||||
carryingBackInProgress = false
|
||||
ClearPedSecondaryTask(GetPlayerPed(-1))
|
||||
DetachEntity(GetPlayerPed(-1), true, false)
|
||||
local closestPlayer = GetClosestPlayer(3)
|
||||
target = GetPlayerServerId(closestPlayer)
|
||||
if target ~= 0 then
|
||||
TriggerServerEvent("CarryPeople:stop",target)
|
||||
end
|
||||
end
|
||||
end,false)
|
||||
|
||||
RegisterNetEvent('CarryPeople:syncTarget')
|
||||
AddEventHandler('CarryPeople:syncTarget', function(target, animationLib, animation2, distans, distans2, height, length,spin,controlFlag)
|
||||
local playerPed = GetPlayerPed(-1)
|
||||
local targetPed = GetPlayerPed(GetPlayerFromServerId(target))
|
||||
carryingBackInProgress = true
|
||||
RequestAnimDict(animationLib)
|
||||
|
||||
while not HasAnimDictLoaded(animationLib) do
|
||||
Citizen.Wait(10)
|
||||
end
|
||||
if spin == nil then spin = 180.0 end
|
||||
AttachEntityToEntity(GetPlayerPed(-1), targetPed, 0, distans2, distans, height, 0.5, 0.5, spin, false, false, false, false, 2, false)
|
||||
if controlFlag == nil then controlFlag = 0 end
|
||||
TaskPlayAnim(playerPed, animationLib, animation2, 8.0, -8.0, length, controlFlag, 0, false, false, false)
|
||||
carryAnimNamePlaying = animation2
|
||||
carryAnimDictPlaying = animationLib
|
||||
carryControlFlagPlaying = controlFlag
|
||||
end)
|
||||
|
||||
RegisterNetEvent('CarryPeople:syncMe')
|
||||
AddEventHandler('CarryPeople:syncMe', function(animationLib, animation,length,controlFlag,animFlag)
|
||||
local playerPed = GetPlayerPed(-1)
|
||||
RequestAnimDict(animationLib)
|
||||
|
||||
while not HasAnimDictLoaded(animationLib) do
|
||||
Citizen.Wait(10)
|
||||
end
|
||||
Wait(500)
|
||||
if controlFlag == nil then controlFlag = 0 end
|
||||
TaskPlayAnim(playerPed, animationLib, animation, 8.0, -8.0, length, controlFlag, 0, false, false, false)
|
||||
carryAnimNamePlaying = animation
|
||||
carryAnimDictPlaying = animationLib
|
||||
carryControlFlagPlaying = controlFlag
|
||||
end)
|
||||
|
||||
RegisterNetEvent('CarryPeople:cl_stop')
|
||||
AddEventHandler('CarryPeople:cl_stop', function()
|
||||
carryingBackInProgress = false
|
||||
ClearPedSecondaryTask(GetPlayerPed(-1))
|
||||
DetachEntity(GetPlayerPed(-1), true, false)
|
||||
end)
|
||||
|
||||
Citizen.CreateThread(function()
|
||||
while true do
|
||||
if carryingBackInProgress then
|
||||
while not IsEntityPlayingAnim(GetPlayerPed(-1), carryAnimDictPlaying, carryAnimNamePlaying, 3) do
|
||||
TaskPlayAnim(GetPlayerPed(-1), carryAnimDictPlaying, carryAnimNamePlaying, 8.0, -8.0, 100000, carryControlFlagPlaying, 0, false, false, false)
|
||||
Citizen.Wait(0)
|
||||
end
|
||||
end
|
||||
Wait(0)
|
||||
end
|
||||
end)
|
||||
|
||||
function GetPlayers()
|
||||
local players = {}
|
||||
|
||||
for i = 0, 255 do
|
||||
if NetworkIsPlayerActive(i) then
|
||||
table.insert(players, i)
|
||||
end
|
||||
end
|
||||
|
||||
return players
|
||||
end
|
||||
|
||||
function GetClosestPlayer(radius)
|
||||
local players = GetPlayers()
|
||||
local closestDistance = -1
|
||||
local closestPlayer = -1
|
||||
local ply = GetPlayerPed(-1)
|
||||
local plyCoords = GetEntityCoords(ply, 0)
|
||||
|
||||
for index,value in ipairs(players) do
|
||||
local target = GetPlayerPed(value)
|
||||
if(target ~= ply) then
|
||||
local targetCoords = GetEntityCoords(GetPlayerPed(value), 0)
|
||||
local distance = GetDistanceBetweenCoords(targetCoords['x'], targetCoords['y'], targetCoords['z'], plyCoords['x'], plyCoords['y'], plyCoords['z'], true)
|
||||
if(closestDistance == -1 or closestDistance > distance) then
|
||||
closestPlayer = value
|
||||
closestDistance = distance
|
||||
end
|
||||
end
|
||||
end
|
||||
--print("closest player is dist: " .. tostring(closestDistance))
|
||||
if closestDistance <= radius then
|
||||
return closestPlayer
|
||||
else
|
||||
return nil
|
||||
end
|
||||
end
|
||||
|
||||
function drawNativeNotification(text)
|
||||
SetTextComponentFormat('STRING')
|
||||
AddTextComponentString(text)
|
||||
DisplayHelpTextFromStringLabel(0, 0, 1, -1)
|
||||
end
|
||||
@@ -0,0 +1,10 @@
|
||||
RegisterServerEvent('CarryPeople:sync')
|
||||
AddEventHandler('CarryPeople:sync', function(target, animationLib,animationLib2, animation, animation2, distans, distans2, height,targetSrc,length,spin,controlFlagSrc,controlFlagTarget,animFlagTarget)
|
||||
TriggerClientEvent('CarryPeople:syncTarget', targetSrc, source, animationLib2, animation2, distans, distans2, height, length,spin,controlFlagTarget,animFlagTarget)
|
||||
TriggerClientEvent('CarryPeople:syncMe', source, animationLib, animation,length,controlFlagSrc,animFlagTarget)
|
||||
end)
|
||||
|
||||
RegisterServerEvent('CarryPeople:stop')
|
||||
AddEventHandler('CarryPeople:stop', function(targetSrc)
|
||||
TriggerClientEvent('CarryPeople:cl_stop', targetSrc)
|
||||
end)
|
||||
@@ -0,0 +1,24 @@
|
||||
d0p3t - https://www.d0p3t.nl
|
||||
|
||||
Copyright © 2020
|
||||
|
||||
-----
|
||||
|
||||
THIS PROJECT USES A CUSTOM LICENSE. MAKE SURE TO READ IT BEFORE THINKING ABOUT DOING ANYTHING WITH DOPE_ISLAND_HOPPER.
|
||||
|
||||
-----
|
||||
|
||||
- YOU ARE ALLOWED TO USE DOPE_ISLAND_HOPPER ON AS MANY SERVERS AS YOU WANT.
|
||||
- _YOU ARE ALSO ALLOWED TO EDIT THIS RESOURCE TO ADD/CHANGE/REMOVE WHATEVER YOU WANT._ (see the exception to this rule in the "credits" section below)
|
||||
- **YOU ARE HOWEVER _NOT_ ALLOWED TO RE-RELEASE (EDITED OR NON-EDITED) VERSIONS OF THIS RESOURCE WITHOUT WRITTEN PERMISSIONS BY MYSELF (REMCO TROOST / D0P3T). FOR ADDED FEATURES/CHANGES, FEEL FREE TO CREATE A FORK & CREATE A PULL REQUEST.**
|
||||
|
||||
----
|
||||
|
||||
**Credits**
|
||||
|
||||
Never should you change the credits (for example in the source code comment section) to claim this resource to be your own. 90% of the users will recognize this resource as being dope_island_hopper, so changing the name of it and removing the credits section, is just useless. You're just being extremely rude and nodoby likes you anymore if they find out you're a big fat liar.
|
||||
|
||||
-----
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
@@ -0,0 +1 @@
|
||||
No README here yet.
|
||||
@@ -0,0 +1,118 @@
|
||||
function LoadCutscene(cut, flag1, flag2)
|
||||
if (not flag1) then
|
||||
RequestCutscene(cut, 8)
|
||||
else
|
||||
RequestCutsceneEx(cut, flag1, flag2)
|
||||
end
|
||||
while (not HasThisCutsceneLoaded(cut)) do Wait(0) end
|
||||
return
|
||||
end
|
||||
|
||||
local function BeginCutsceneWithPlayer()
|
||||
local plyrId = PlayerPedId()
|
||||
local playerClone = ClonePed_2(plyrId, 0.0, false, true, 1)
|
||||
|
||||
SetBlockingOfNonTemporaryEvents(playerClone, true)
|
||||
SetEntityVisible(playerClone, false, false)
|
||||
SetEntityInvincible(playerClone, true)
|
||||
SetEntityCollision(playerClone, false, false)
|
||||
FreezeEntityPosition(playerClone, true)
|
||||
SetPedHelmet(playerClone, false)
|
||||
RemovePedHelmet(playerClone, true)
|
||||
|
||||
SetCutsceneEntityStreamingFlags('MP_1', 0, 1)
|
||||
RegisterEntityForCutscene(plyrId, 'MP_1', 0, GetEntityModel(plyrId), 64)
|
||||
|
||||
Wait(10)
|
||||
StartCutscene(0)
|
||||
Wait(10)
|
||||
ClonePedToTarget(playerClone, plyrId)
|
||||
Wait(10)
|
||||
DeleteEntity(playerClone)
|
||||
Wait(50)
|
||||
DoScreenFadeIn(250)
|
||||
|
||||
return playerClone
|
||||
end
|
||||
|
||||
local function Finish(timer)
|
||||
local tripped = false
|
||||
|
||||
repeat
|
||||
Wait(0)
|
||||
if (timer and (GetCutsceneTime() > timer))then
|
||||
DoScreenFadeOut(250)
|
||||
tripped = true
|
||||
end
|
||||
|
||||
if (GetCutsceneTotalDuration() - GetCutsceneTime() <= 250) then
|
||||
DoScreenFadeOut(250)
|
||||
tripped = true
|
||||
end
|
||||
until not IsCutscenePlaying()
|
||||
if (not tripped) then
|
||||
DoScreenFadeOut(100)
|
||||
Wait(150)
|
||||
end
|
||||
return
|
||||
end
|
||||
|
||||
local landAnim = {1, 2, 4}
|
||||
local timings = {
|
||||
[1] = 9100,
|
||||
[2] = 17500,
|
||||
[4] = 25400
|
||||
}
|
||||
|
||||
function BeginLeaving(isIsland)
|
||||
if (isIsland) then
|
||||
RequestCollisionAtCoord(-2392.838, -2427.619, 43.1663)
|
||||
|
||||
LoadCutscene('hs4_nimb_isd_lsa', 8, 24)
|
||||
BeginCutsceneWithPlayer()
|
||||
Finish()
|
||||
RemoveCutscene()
|
||||
else
|
||||
RequestCollisionAtCoord(-1652.79, -3117.5, 13.98)
|
||||
|
||||
LoadCutscene('hs4_lsa_take_nimb2')
|
||||
BeginCutsceneWithPlayer()
|
||||
|
||||
Finish()
|
||||
RemoveCutscene()
|
||||
|
||||
if (Config.Cutscenes.long) then
|
||||
LoadCutscene('hs4_nimb_lsa_isd', 128, 24)
|
||||
BeginCutsceneWithPlayer()
|
||||
Finish(165000)
|
||||
|
||||
LoadCutscene('hs4_nimb_lsa_isd', 256, 24)
|
||||
BeginCutsceneWithPlayer()
|
||||
Finish(170000)
|
||||
|
||||
LoadCutscene('hs4_nimb_lsa_isd', 512, 24)
|
||||
BeginCutsceneWithPlayer()
|
||||
Finish(175200)
|
||||
RemoveCutscene()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function BeginLanding(isIsland)
|
||||
if (isIsland) then
|
||||
RequestCollisionAtCoord(-1652.79, -3117.5, 13.98)
|
||||
local flag = landAnim[ math.random( #landAnim ) ]
|
||||
LoadCutscene('hs4_lsa_land_nimb', flag, 24)
|
||||
BeginCutsceneWithPlayer()
|
||||
Finish(timings[flag])
|
||||
RemoveCutscene()
|
||||
else
|
||||
LoadCutscene('hs4_nimb_lsa_isd_repeat')
|
||||
|
||||
RequestCollisionAtCoord(-2392.838, -2427.619, 43.1663)
|
||||
BeginCutsceneWithPlayer()
|
||||
|
||||
Finish()
|
||||
RemoveCutscene()
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,8 @@
|
||||
function EnableIsland(enabled)
|
||||
Citizen.InvokeNative(0x9A9D1BA639675CF1, "HeistIsland", enabled) -- Toggle island gta5 level
|
||||
Citizen.InvokeNative(0x5E1460624D194A38, enabled) -- Toggle island minimap
|
||||
end
|
||||
|
||||
function ToggleIslandPathNodes(enabled)
|
||||
Citizen.InvokeNative(0xF74B1FFA4A15FBEA, enabled) -- Toggle island path nodes
|
||||
end
|
||||
@@ -0,0 +1,274 @@
|
||||
local IsOnIsland = false
|
||||
local IsInSideTeleportLocation = false
|
||||
local ClosestTeleportLocation = nil
|
||||
local IsTeleporting = false
|
||||
local PedCoordinates = vector3(0.0, 0.0, 0.0)
|
||||
|
||||
local IslandBounds = {
|
||||
x1 = 6093.88,
|
||||
y1 = -5966.44,
|
||||
x2 = 3283.17,
|
||||
y2 = -4199.8
|
||||
}
|
||||
|
||||
local Blips = {}
|
||||
|
||||
local function GetFromCoordinate(location)
|
||||
local coordinate = location.LosSantosCoordinate
|
||||
local heading = location.LosSantosHeading
|
||||
if IsOnIsland then
|
||||
coordinate = location.IslandCoordinate
|
||||
heading = location.IslandHeading
|
||||
end
|
||||
|
||||
return coordinate, heading
|
||||
end
|
||||
|
||||
local function GetToCoordinate(location)
|
||||
local coordinate = location.IslandCoordinate
|
||||
local heading = location.IslandHeading
|
||||
|
||||
if IsOnIsland then
|
||||
coordinate = location.LosSantosCoordinate
|
||||
heading = location.LosSantosHeading
|
||||
end
|
||||
|
||||
return coordinate, heading
|
||||
end
|
||||
|
||||
local function CreateNewBlips()
|
||||
for _, blip in pairs(Blips) do
|
||||
RemoveBlip(blip)
|
||||
end
|
||||
|
||||
Blips = {}
|
||||
|
||||
for _, location in pairs(Config.TeleportLocations) do
|
||||
local blip = nil
|
||||
local blipName = Config.Blip.LosSantosName
|
||||
if not IsOnIsland then
|
||||
blip = AddBlipForCoord(location.LosSantosCoordinate.x, location.LosSantosCoordinate.y, location.LosSantosCoordinate.z)
|
||||
else
|
||||
blip = AddBlipForCoord(location.IslandCoordinate.x, location.IslandCoordinate.y, location.IslandCoordinate.z)
|
||||
blipName = Config.Blip.IslandName
|
||||
end
|
||||
|
||||
if blip then
|
||||
SetBlipAsShortRange(blip, Config.Blip.MinimapOnly)
|
||||
SetBlipSprite(blip, Config.Blip.Sprite)
|
||||
SetBlipColour(blip, Config.Blip.Color)
|
||||
SetBlipScale(blip, Config.Blip.Size)
|
||||
SetBlipDisplayIndicatorOnBlip(blip, false)
|
||||
BeginTextCommandSetBlipName("STRING")
|
||||
AddTextComponentSubstringPlayerName(blipName)
|
||||
EndTextCommandSetBlipName(blip)
|
||||
end
|
||||
table.insert(Blips, blip)
|
||||
end
|
||||
end
|
||||
|
||||
local function DisplayTeleportHelpText()
|
||||
local key = Config.Control
|
||||
|
||||
if not key or not IsInSideTeleportLocation then
|
||||
return
|
||||
end
|
||||
|
||||
local destination = "Cayo Perico"
|
||||
if IsOnIsland then
|
||||
destination = "Los Santos"
|
||||
end
|
||||
|
||||
BeginTextCommandDisplayHelp("DOPE_PERICO_HELP")
|
||||
AddTextComponentSubstringPlayerName(key.Name)
|
||||
AddTextComponentSubstringPlayerName(destination)
|
||||
EndTextCommandDisplayHelp(0, false, false, -1)
|
||||
end
|
||||
|
||||
local function ShowMarker()
|
||||
local marker = Config.Marker
|
||||
local startCoordinate = GetFromCoordinate(ClosestTeleportLocation)
|
||||
local endCoordinate = GetToCoordinate(ClosestTeleportLocation)
|
||||
|
||||
-- Some config issue
|
||||
if not marker or not startCoordinate or not endCoordinate then
|
||||
return
|
||||
end
|
||||
|
||||
-- Draw marker
|
||||
DrawMarker(
|
||||
marker.Type,
|
||||
startCoordinate.x,
|
||||
startCoordinate.y,
|
||||
startCoordinate.z,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
marker.Size,
|
||||
marker.Size,
|
||||
marker.Size,
|
||||
marker.Color.Red,
|
||||
marker.Color.Green,
|
||||
marker.Color.Blue,
|
||||
marker.Color.Alpha,
|
||||
false,
|
||||
true,
|
||||
2,
|
||||
nil,
|
||||
nil,
|
||||
nil,
|
||||
false
|
||||
)
|
||||
end
|
||||
|
||||
local function GetClosestLocation()
|
||||
local closestLocation = Config.TeleportLocations[1]
|
||||
local closestLocationCoords = GetFromCoordinate(closestLocation)
|
||||
|
||||
for index, location in pairs(Config.TeleportLocations) do
|
||||
local startCoordinate = GetFromCoordinate(location)
|
||||
|
||||
local distance = #(PedCoordinates - startCoordinate)
|
||||
local currentClosestDistance = #(PedCoordinates - closestLocationCoords)
|
||||
|
||||
if distance < currentClosestDistance then
|
||||
closestLocation = location
|
||||
closestLocationCoords = startCoordinate
|
||||
end
|
||||
end
|
||||
|
||||
ClosestTeleportLocation = closestLocation
|
||||
|
||||
local dist = #(PedCoordinates - closestLocationCoords)
|
||||
if #(PedCoordinates - closestLocationCoords) < Config.DrawDistance then
|
||||
IsInSideTeleportLocation = true
|
||||
end
|
||||
end
|
||||
|
||||
local function IsPointInsideRectangle(x, y, x1, y1, x2, y2)
|
||||
return (x1 < x and x < x2) and (y1 < y and y < y2)
|
||||
end
|
||||
|
||||
-- Refresh client's ped coordinates only once 500ms
|
||||
Citizen.CreateThread(
|
||||
function()
|
||||
if IsScreenFadedOut() then
|
||||
DoScreenFadeIn(500)
|
||||
end
|
||||
while true do
|
||||
PedCoordinates = GetEntityCoords(PlayerPedId(), true)
|
||||
Wait(500)
|
||||
end
|
||||
end
|
||||
)
|
||||
|
||||
Citizen.CreateThread(
|
||||
function()
|
||||
local waitTime = 500
|
||||
AddTextEntry("DOPE_PERICO_HELP", "Press ~a~ to teleport to ~a~")
|
||||
CreateNewBlips()
|
||||
while true do
|
||||
Wait(waitTime)
|
||||
|
||||
if not IsInSideTeleportLocation then
|
||||
GetClosestLocation()
|
||||
else
|
||||
local closestLocationCoords = GetFromCoordinate(ClosestTeleportLocation)
|
||||
|
||||
local distance = #(PedCoordinates - closestLocationCoords)
|
||||
if distance > 20.0 then
|
||||
IsInSideTeleportLocation = false
|
||||
waitTime = 500
|
||||
else
|
||||
waitTime = 0
|
||||
|
||||
if distance < (Config.Marker.Size * Config.ActivationDistanceScaler) then
|
||||
DisplayTeleportHelpText()
|
||||
end
|
||||
ShowMarker()
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
)
|
||||
|
||||
RegisterKeyMapping("+dope_perico", "Teleport to/from Cayo Perico Island", "keyboard", Config.Control.Key)
|
||||
|
||||
RegisterCommand(
|
||||
"+dope_perico",
|
||||
function()
|
||||
if not IsInSideTeleportLocation then
|
||||
return
|
||||
end
|
||||
|
||||
local endCoordinate, endHeading = GetToCoordinate(ClosestTeleportLocation)
|
||||
|
||||
if not IsTeleporting then
|
||||
Citizen.CreateThread(
|
||||
function()
|
||||
if not IsPlayerTeleportActive() then
|
||||
IsTeleporting = true
|
||||
|
||||
local ped = PlayerPedId()
|
||||
FreezeEntityPosition(ped, true)
|
||||
if IsScreenFadedIn() then
|
||||
DoScreenFadeOut(500)
|
||||
while not IsScreenFadedOut() do
|
||||
Wait(50)
|
||||
end
|
||||
end
|
||||
|
||||
if (Config.Cutscenes.enabled) then BeginLeaving(IsOnIsland) end
|
||||
|
||||
EnableIsland(not IsOnIsland)
|
||||
|
||||
if (Config.Cutscenes.enabled) then BeginLanding(IsOnIsland) end
|
||||
|
||||
StartPlayerTeleport(PlayerId(), endCoordinate.x, endCoordinate.y, endCoordinate.z, endHeading, true, true, false)
|
||||
|
||||
local start = GetGameTimer()
|
||||
while IsPlayerTeleportActive() do
|
||||
if GetGameTimer() - start > 20000 then
|
||||
print("^1Could not teleport. Report this to server administrator(s).^7")
|
||||
if IsScreenFadedOut() then
|
||||
DoScreenFadeIn(0)
|
||||
end
|
||||
return
|
||||
end
|
||||
Wait(500)
|
||||
end
|
||||
|
||||
SetGameplayCamRelativePitch(0.0, 1.0)
|
||||
SetGameplayCamRelativeHeading(0.0)
|
||||
|
||||
if IsScreenFadedOut() then
|
||||
DoScreenFadeIn(1000)
|
||||
while not IsScreenFadedIn() do
|
||||
Wait(50)
|
||||
end
|
||||
end
|
||||
|
||||
IsTeleporting = false
|
||||
IsOnIsland = not IsOnIsland
|
||||
|
||||
CreateNewBlips()
|
||||
ToggleIslandPathNodes(IsOnIsland)
|
||||
FreezeEntityPosition(ped, false)
|
||||
end
|
||||
end
|
||||
)
|
||||
end
|
||||
end,
|
||||
false
|
||||
)
|
||||
|
||||
RegisterCommand(
|
||||
"-dope_perico",
|
||||
function()
|
||||
-- empty to prevent chat message
|
||||
end,
|
||||
false
|
||||
)
|
||||
@@ -0,0 +1,16 @@
|
||||
fx_version "cerulean"
|
||||
game "gta5"
|
||||
|
||||
author "d0p3t <d0p3t89@gmail.com>"
|
||||
description "Conveniently hop between Los Santos and Cayo Perico island"
|
||||
version "1.0.0"
|
||||
|
||||
client_scripts {
|
||||
'shared/config.lua',
|
||||
'client/*.lua'
|
||||
}
|
||||
|
||||
server_scripts {
|
||||
'shared/config.lua',
|
||||
'server/*.lua'
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
local function VerifyConfig()
|
||||
local invalid = false
|
||||
|
||||
if not Config then
|
||||
print("^1Could not find shared/config.lua!^7")
|
||||
invalid = true
|
||||
end
|
||||
|
||||
if Config.Debug == nil or not Config.Marker or not Config.DrawDistance or not Config.ActivationDistanceScaler then
|
||||
print("^1Missing default values Debug, Marker, DrawDistance or ActivationDistanceScaler.^7")
|
||||
invalid = true
|
||||
end
|
||||
|
||||
-- Check Config.Control
|
||||
if not Config.Control.Key or not Config.Control.Name then
|
||||
print("^1Invalid Control setting.^7")
|
||||
invalid = true
|
||||
end
|
||||
|
||||
-- Check Config.TeleportLocations
|
||||
if not Config.TeleportLocations then
|
||||
print("^1Could not find TeleportLocations.^7")
|
||||
invalid = true
|
||||
else
|
||||
for index, location in ipairs(Config.TeleportLocations) do
|
||||
if not location.LosSantosCoordinate or not location.IslandCoordinate then
|
||||
print("^1Could not find Markers, LosSantosCoordinate or IslandCoordinate in teleport location " .. index .. ".^7")
|
||||
invalid = true
|
||||
break
|
||||
end
|
||||
|
||||
if type(location.LosSantosCoordinate) ~= "vector3" or type(location.IslandCoordinate) ~= "vector3" then
|
||||
print("^1Invalid type for LosSantosCoordinate or IslandCoordinate in teleport location " .. index .. ". Type must be vector3^7")
|
||||
invalid = true
|
||||
break
|
||||
end
|
||||
|
||||
if not location.LosSantosHeading or not location.IslandHeading then
|
||||
print("^1Could not find location headings.^7")
|
||||
invalid = true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if invalid then
|
||||
local resource = GetCurrentResourceName()
|
||||
print("^1You have one or more errors in your configuration file. Please check Config.lua.^7")
|
||||
print("^3Can't fix this issue yourself? Check the forum topic of" .. resource .. " on the Cfx.re forum.^7")
|
||||
print("^1Stopping " .. resource .. " ...^7")
|
||||
StopResource(GetCurrentResourceName())
|
||||
end
|
||||
end
|
||||
|
||||
Citizen.CreateThread(
|
||||
function()
|
||||
VerifyConfig()
|
||||
end
|
||||
)
|
||||
@@ -0,0 +1,59 @@
|
||||
Config = {}
|
||||
|
||||
Config.Debug = false
|
||||
|
||||
Config.Control = {
|
||||
Key = "e",
|
||||
Name = "~INPUT_CONTEXT~"
|
||||
}
|
||||
|
||||
Config.Cutscenes = {
|
||||
enabled = true,
|
||||
long = false
|
||||
}
|
||||
|
||||
Config.DrawDistance = 20.0
|
||||
|
||||
Config.ActivationDistanceScaler = 1.2
|
||||
|
||||
Config.Blip = {
|
||||
Sprite = 365,
|
||||
Color = 21,
|
||||
Size = 1.0,
|
||||
LosSantosName = "Cayo Perico Island",
|
||||
IslandName = "Los Santos",
|
||||
MinimapOnly = true
|
||||
}
|
||||
|
||||
Config.Marker = {
|
||||
Type = 23,
|
||||
Color = {
|
||||
Red = 255,
|
||||
Green = 0,
|
||||
Blue = 0,
|
||||
Alpha = 255
|
||||
},
|
||||
Size = 1.0
|
||||
}
|
||||
|
||||
-- An array of locations to teleport to/from the island.
|
||||
Config.TeleportLocations = {
|
||||
{
|
||||
LosSantosCoordinate = vector3(3857.16, 4459.48, 0.85),
|
||||
LosSantosHeading = 357.31,
|
||||
IslandCoordinate = vector3(4929.47, -5174.01, 1.5),
|
||||
IslandHeading = 241.13
|
||||
},
|
||||
{
|
||||
LosSantosCoordinate = vector3(-1605.7, 5258.76,1.2),
|
||||
LosSantosHeading = 23.88,
|
||||
IslandCoordinate = vector3(5094.14,-4655.52, 0.8),
|
||||
IslandHeading = 70.03
|
||||
},
|
||||
{
|
||||
LosSantosCoordinate = vector3(-1016.42, -2468.58, 12.99),
|
||||
LosSantosHeading = 233.31,
|
||||
IslandCoordinate = vector3(4425.68,-4487.06, 3.25),
|
||||
IslandHeading = 200.56
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,674 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<https://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<https://www.gnu.org/licenses/why-not-lgpl.html>.
|
||||
@@ -0,0 +1,23 @@
|
||||
# ChairBedSystem
|
||||
|
||||
<html>
|
||||
<h3>What do this script do?</h3>
|
||||
<p>This script will let you sit or lay on a bed, chair or what ever you want:P
|
||||
<br>There is an easy config in the client.lua, where you can add/remove objects.</p>
|
||||
<h3>Requirements?</h3>
|
||||
<p>- None</p>
|
||||
<h3>Video</h3>
|
||||
<p>Click on the video below!</p>
|
||||
|
||||
<a href="https://streamable.com/doa1q" target="_blank">
|
||||
<img src="https://i.gyazo.com/16da4dc3bfb0e82814247729c9e4332d.jpg"
|
||||
alt="IMAGE ALT TEXT HERE" width="540" height="280" border="10" /></a>
|
||||
|
||||
|
||||
<br>
|
||||
<h3>Other Releases</h3>
|
||||
<p><b>- Radargun (<a href="https://github.com/TerbSEC/Radargun" target="_blank">Github</a> / <a href="https://forum.fivem.net/t/release-radargun-laser-gun-v1-1-huge-improvements-and-new-ui/179682" target="_blank">FiveM Forum</a>)
|
||||
<br>- Healthbar / UI (<a href="https://github.com/TerbSEC/HealthbarUI" target="_blank">Github</a> / <a href="https://forum.fivem.net/t/discontinued-healthbar-ui-now-supports-vrp-and-esx-v-1-1/265693" target="_blank">FiveM Forum</a>)
|
||||
<br>- Coords Pack (<a href="https://github.com/TerbSEC/FiveM-CoordsSaver" target="_blank">Github</a> / <a href="https://forum.fivem.net/t/release-coords-pack-include-copy-coords-to-clipboard-and-tpc/747132" target="_blank">FiveM Forum</a>)
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,11 @@
|
||||
resource_manifest_version "44febabe-d386-4d18-afbe-5e627f4af937"
|
||||
|
||||
|
||||
client_scripts{
|
||||
'client.lua',
|
||||
'config.lua'
|
||||
}
|
||||
|
||||
server_scripts{
|
||||
'server.lua'
|
||||
}
|
||||
@@ -0,0 +1,233 @@
|
||||
local plyCoords = GetEntityCoords(PlayerPedId())
|
||||
local isWithinObject = false
|
||||
local oElement = {}
|
||||
|
||||
-- // BASIC
|
||||
local InUse = false
|
||||
local IsTextInUse = false
|
||||
local PlyLastPos = 0
|
||||
|
||||
-- // ANIMATION
|
||||
local Anim = 'sit'
|
||||
local AnimScroll = 0
|
||||
|
||||
-- Fast Thread
|
||||
CreateThread(function()
|
||||
while true do
|
||||
if isWithinObject and oElement.fObject ~= 0 then
|
||||
local ply = PlayerPedId()
|
||||
local objectCoords = oElement.fObjectCoords
|
||||
local distanceDiff = #(objectCoords - plyCoords)
|
||||
if (distanceDiff < 2.0 and not InUse) then
|
||||
if (oElement.fObjectIsBed == true) then
|
||||
|
||||
-- // ARROW RIGHT
|
||||
if IsControlJustPressed(0, 175) then -- right
|
||||
if (AnimScroll ~= 2) then
|
||||
AnimScroll = AnimScroll + 1
|
||||
end
|
||||
if AnimScroll == 1 then
|
||||
Anim = "back"
|
||||
elseif AnimScroll == 2 then
|
||||
Anim = "stomach"
|
||||
end
|
||||
end
|
||||
|
||||
-- // ARROW LEFT
|
||||
if IsControlJustPressed(0, 174) then -- left
|
||||
if (AnimScroll ~= 0) then
|
||||
AnimScroll = AnimScroll - 1
|
||||
end
|
||||
if AnimScroll == 1 then
|
||||
Anim = "back"
|
||||
elseif AnimScroll == 0 then
|
||||
Anim = "sit"
|
||||
end
|
||||
end
|
||||
|
||||
if (Anim == 'sit') then
|
||||
DrawText3Ds(objectCoords.x, objectCoords.y, objectCoords.z, Config.Text.SitOnBed .. ' | ' .. Config.Text.SwitchBetween)
|
||||
else
|
||||
DrawText3Ds(objectCoords.x, objectCoords.y, objectCoords.z, Config.Text.LieOnBed .. ' ~g~' .. Anim .. '~w~ | ' .. Config.Text.SwitchBetween)
|
||||
end
|
||||
|
||||
if IsControlJustPressed(0, Config.objects.ButtonToLayOnBed) then
|
||||
TriggerServerEvent('ChairBedSystem:Server:Enter', oElement, oElement.fObjectCoords)
|
||||
end
|
||||
else
|
||||
DrawText3Ds(objectCoords.x, objectCoords.y, objectCoords.z, Config.Text.SitOnChair)
|
||||
if IsControlJustPressed(0, Config.objects.ButtonToSitOnChair) then
|
||||
TriggerServerEvent('ChairBedSystem:Server:Enter', oElement, oElement.fObjectCoords)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if (InUse) then
|
||||
DrawText3Ds(objectCoords.x, objectCoords.y, objectCoords.z, Config.Text.Standup)
|
||||
if IsControlJustPressed(0, Config.objects.ButtonToStandUp) then
|
||||
InUse = false
|
||||
TriggerServerEvent('ChairBedSystem:Server:Leave', oElement.fObjectCoords)
|
||||
ClearPedTasksImmediately(ply)
|
||||
FreezeEntityPosition(ply, false)
|
||||
|
||||
local x, y, z = table.unpack(PlyLastPos)
|
||||
if GetDistanceBetweenCoords(x, y, z, plyCoords) < 10 then
|
||||
SetEntityCoords(ply, PlyLastPos)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
Wait(0)
|
||||
end
|
||||
end)
|
||||
|
||||
-- Medium Thread
|
||||
CreateThread(function()
|
||||
while true do
|
||||
plyCoords = GetEntityCoords(PlayerPedId())
|
||||
Wait(1000)
|
||||
end
|
||||
end)
|
||||
|
||||
|
||||
-- Slow Thread
|
||||
CreateThread(function()
|
||||
Wait(1500)
|
||||
while true do
|
||||
for _, element in pairs(Config.objects.locations) do
|
||||
local closestObject = GetClosestObjectOfType(plyCoords.x, plyCoords.y, plyCoords.z, 3.0, GetHashKey(element.object), 0, 0, 0)
|
||||
local coordsObject = GetEntityCoords(closestObject)
|
||||
local distanceDiff = #(coordsObject - plyCoords)
|
||||
--if (distanceDiff < 3.00 and closestObject ~= 0) then
|
||||
--if (distanceDiff < 2.00) then
|
||||
if (distanceDiff < 2.25 and closestObject ~= 0) then
|
||||
if (distanceDiff < 2.00) then
|
||||
oElement = {
|
||||
fObject = closestObject,
|
||||
fObjectCoords = coordsObject,
|
||||
fObjectcX = element.verticalOffsetX,
|
||||
fObjectcY = element.verticalOffsetY,
|
||||
fObjectcZ = element.verticalOffsetZ,
|
||||
fObjectDir = element.direction,
|
||||
fObjectIsBed = element.bed
|
||||
}
|
||||
isWithinObject = true
|
||||
end
|
||||
break
|
||||
else
|
||||
isWithinObject = false
|
||||
end
|
||||
end
|
||||
Wait(2000)
|
||||
end
|
||||
end)
|
||||
|
||||
|
||||
-- Healing Thread
|
||||
CreateThread(function()
|
||||
while Config.Healing ~= 0 do
|
||||
Wait(Config.Healing * 1000)
|
||||
if InUse == true then
|
||||
if oElement.fObjectIsBed == true then
|
||||
local ply = PlayerPedId()
|
||||
local health = GetEntityHealth(ply)
|
||||
if health <= 199 then
|
||||
SetEntityHealth(ply, health + 1)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
RegisterNetEvent('ChairBedSystem:Client:Animation')
|
||||
AddEventHandler('ChairBedSystem:Client:Animation', function(v, coords)
|
||||
local object = v.fObject
|
||||
local vertx = v.fObjectcX
|
||||
local verty = v.fObjectcY
|
||||
local vertz = v.fObjectcZ
|
||||
local dir = v.fObjectDir
|
||||
local isBed = v.fObjectIsBed
|
||||
local objectcoords = coords
|
||||
|
||||
local ped = PlayerPedId()
|
||||
PlyLastPos = GetEntityCoords(ped)
|
||||
FreezeEntityPosition(object, true)
|
||||
FreezeEntityPosition(ped, true)
|
||||
InUse = true
|
||||
if isBed == false then
|
||||
if Config.objects.SitAnimation.dict ~= nil then
|
||||
SetEntityCoords(ped, objectcoords.x, objectcoords.y, objectcoords.z + 0.5)
|
||||
SetEntityHeading(ped, GetEntityHeading(object) - 180.0)
|
||||
local dict = Config.objects.SitAnimation.dict
|
||||
local anim = Config.objects.SitAnimation.anim
|
||||
|
||||
AnimLoadDict(dict, anim, ped)
|
||||
else
|
||||
TaskStartScenarioAtPosition(ped, Config.objects.SitAnimation.anim, objectcoords.x + vertx, objectcoords.y + verty, objectcoords.z - vertz, GetEntityHeading(object) + dir, 0, true, true)
|
||||
end
|
||||
else
|
||||
if Anim == 'back' then
|
||||
if Config.objects.BedBackAnimation.dict ~= nil then
|
||||
SetEntityCoords(ped, objectcoords.x, objectcoords.y, objectcoords.z + 0.5)
|
||||
SetEntityHeading(ped, GetEntityHeading(object) - 180.0)
|
||||
local dict = Config.objects.BedBackAnimation.dict
|
||||
local anim = Config.objects.BedBackAnimation.anim
|
||||
|
||||
Animation(dict, anim, ped)
|
||||
else
|
||||
TaskStartScenarioAtPosition(ped, Config.objects.BedBackAnimation.anim, objectcoords.x + vertx, objectcoords.y + verty, objectcoords.z - vertz, GetEntityHeading(object) + dir, 0, true, true
|
||||
)
|
||||
end
|
||||
elseif Anim == 'stomach' then
|
||||
if Config.objects.BedStomachAnimation.dict ~= nil then
|
||||
SetEntityCoords(ped, objectcoords.x, objectcoords.y, objectcoords.z + 0.5)
|
||||
SetEntityHeading(ped, GetEntityHeading(object) - 180.0)
|
||||
local dict = Config.objects.BedStomachAnimation.dict
|
||||
local anim = Config.objects.BedStomachAnimation.anim
|
||||
|
||||
Animation(dict, anim, ped)
|
||||
else
|
||||
TaskStartScenarioAtPosition(ped, Config.objects.BedStomachAnimation.anim, objectcoords.x + vertx, objectcoords.y + verty, objectcoords.z - vertz, GetEntityHeading(object) + dir, 0, true, true)
|
||||
end
|
||||
elseif Anim == 'sit' then
|
||||
if Config.objects.BedSitAnimation.dict ~= nil then
|
||||
SetEntityCoords(ped, objectcoords.x, objectcoords.y, objectcoords.z + 0.5)
|
||||
SetEntityHeading(ped, GetEntityHeading(object) - 180.0)
|
||||
local dict = Config.objects.BedSitAnimation.dict
|
||||
local anim = Config.objects.BedSitAnimation.anim
|
||||
|
||||
Animation(dict, anim, ped)
|
||||
else
|
||||
TaskStartScenarioAtPosition(ped, Config.objects.BedSitAnimation.anim, objectcoords.x + vertx, objectcoords.y + verty, objectcoords.z - vertz, GetEntityHeading(object) + 180.0, 0, true, true)
|
||||
end
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
|
||||
|
||||
function DrawText3Ds(x, y, z, text)
|
||||
local onScreen, _x, _y = World3dToScreen2d(x, y, z)
|
||||
|
||||
if onScreen then
|
||||
SetTextScale(0.35, 0.35)
|
||||
SetTextFont(4)
|
||||
SetTextProportional(1)
|
||||
SetTextColour(255, 255, 255, 215)
|
||||
SetTextEntry("STRING")
|
||||
SetTextCentre(1)
|
||||
AddTextComponentString(text)
|
||||
DrawText(_x, _y)
|
||||
local factor = (string.len(text)) / 350
|
||||
DrawRect(_x, _y + 0.0125, 0.015 + factor, 0.03, 41, 11, 41, 68)
|
||||
end
|
||||
end
|
||||
|
||||
function Animation(dict, anim, ped)
|
||||
RequestAnimDict(dict)
|
||||
while not HasAnimDictLoaded(dict) do
|
||||
Citizen.Wait(0)
|
||||
end
|
||||
|
||||
TaskPlayAnim(ped, dict, anim, 8.0, 1.0, -1, 1, 0, 0, 0, 0)
|
||||
end
|
||||
@@ -0,0 +1,44 @@
|
||||
Config = {}
|
||||
|
||||
Config.Healing = 1 -- // If this is 0, then its disabled.. Default: 3.. That means, if a person lies in a bed, then he will get 1 health every 3 seconds.
|
||||
|
||||
Config.objects = {
|
||||
ButtonToSitOnChair = 58, -- // Default: G -- // https://docs.fivem.net/game-references/controls/
|
||||
ButtonToLayOnBed = 38, -- // Default: E -- // https://docs.fivem.net/game-references/controls/
|
||||
ButtonToStandUp = 23, -- // Default: F -- // https://docs.fivem.net/game-references/controls/
|
||||
SitAnimation = {anim='PROP_HUMAN_SEAT_CHAIR_MP_PLAYER'},
|
||||
BedBackAnimation = {dict='anim@gangops@morgue@table@', anim='ko_front'},
|
||||
BedStomachAnimation = {anim='WORLD_HUMAN_SUNBATHE'},
|
||||
BedSitAnimation = {anim='WORLD_HUMAN_PICNIC'},
|
||||
locations = {
|
||||
{object="v_med_bed2", verticalOffsetX=0.0, verticalOffsetY=0.0, verticalOffsetZ=-1.4, direction=0.0, bed=true},
|
||||
{object="v_serv_ct_chair02", verticalOffsetX=0.0, verticalOffsetY=0.0, verticalOffsetZ=-0.0, direction=168.0, bed=false},
|
||||
{object="prop_off_chair_04", verticalOffsetX=0.0, verticalOffsetY=0.0, verticalOffsetZ=-0.4, direction=168.0, bed=false},
|
||||
{object="prop_off_chair_03", verticalOffsetX=0.0, verticalOffsetY=0.0, verticalOffsetZ=-0.4, direction=168.0, bed=false},
|
||||
{object="prop_off_chair_05", verticalOffsetX=0.0, verticalOffsetY=0.0, verticalOffsetZ=-0.4, direction=168.0, bed=false},
|
||||
{object="v_club_officechair", verticalOffsetX=0.0, verticalOffsetY=0.0, verticalOffsetZ=-0.4, direction=168.0, bed=false},
|
||||
{object="v_ilev_leath_chr", verticalOffsetX=0.0, verticalOffsetY=0.0, verticalOffsetZ=-0.4, direction=168.0, bed=false},
|
||||
{object="v_corp_offchair", verticalOffsetX=0.0, verticalOffsetY=0.0, verticalOffsetZ=-0.4, direction=168.0, bed=false},
|
||||
{object="v_med_emptybed", verticalOffsetX=0.0, verticalOffsetY=0.13, verticalOffsetZ=-0.2, direction=90.0, bed=false},
|
||||
{object="Prop_Off_Chair_01", verticalOffsetX=0.0, verticalOffsetY=-0.1, verticalOffsetZ=-0.5, direction=180.0, bed=false},
|
||||
{object="hei_prop_heist_off_chair", verticalOffsetX=0.0, verticalOffsetY=0.0, verticalOffsetZ=-0.4, direction=168.0, bed=false},
|
||||
{object="prop_sol_chair", verticalOffsetX=0.0, verticalOffsetY=0.0, verticalOffsetZ=-0.4, direction=168.0, bed=false},
|
||||
{object="v_med_whickerchair1", verticalOffsetX=0.0, verticalOffsetY=0.0, verticalOffsetZ=-0.4, direction=168.0, bed=false},
|
||||
{object="prop_waiting_seat_01", verticalOffsetX=0.0, verticalOffsetY=0.0, verticalOffsetZ=-0.4, direction=168.0, bed=false},
|
||||
{object="v_ret_gc_chair02", verticalOffsetX=0.0, verticalOffsetY=0.0, verticalOffsetZ=-0.4, direction=168.0, bed=false},
|
||||
{object="p_clb_officechair_s", verticalOffsetX=0.0, verticalOffsetY=0.0, verticalOffsetZ=-0.4, direction=168.0, bed=false},
|
||||
{object="v_corp_lazychair", verticalOffsetX=0.0, verticalOffsetY=0.0, verticalOffsetZ=-0.4, direction=168.0, bed=false},
|
||||
{object="prop_wait_bench_01", verticalOffsetX=0.0, verticalOffsetY=0.0, verticalOffsetZ=-0.4, direction=168.0, bed=false},
|
||||
}
|
||||
}
|
||||
|
||||
-- // YOU WILL FIND ALL BUTTONS HERE FOR CODE BELOW;P
|
||||
-- [[ https://docs.fivem.net/game-references/controls/ ]]
|
||||
|
||||
Config.Text = {
|
||||
SitOnChair = '~r~G~w~ to sit',
|
||||
SitOnBed = '~r~E~w~ to sit on the bed',
|
||||
LieOnBed = '~r~E~w~ to lay on your',
|
||||
SwitchBetween = 'Switch between with ~r~Arrow left~w~ and ~r~arrow right~w~',
|
||||
Standup = '~r~F~w~ to stand up!',
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
--
|
||||
-- * Created with PhpStorm
|
||||
-- * User: Terbium
|
||||
-- * Date: 05/11/2019
|
||||
-- * Time: 02:21
|
||||
--
|
||||
|
||||
local oArray = {}
|
||||
local oPlayerUse = {}
|
||||
|
||||
|
||||
AddEventHandler('playerDropped', function()
|
||||
local oSource = source
|
||||
if oPlayerUse[oSource] ~= nil then
|
||||
oArray[oPlayerUse[oSource]] = nil
|
||||
oPlayerUse[oSource] = nil
|
||||
end
|
||||
end)
|
||||
|
||||
|
||||
RegisterServerEvent('ChairBedSystem:Server:Enter')
|
||||
AddEventHandler('ChairBedSystem:Server:Enter', function(object, objectcoords)
|
||||
local oSource = source
|
||||
if oArray[objectcoords] == nil then
|
||||
oPlayerUse[oSource] = objectcoords
|
||||
oArray[objectcoords] = true
|
||||
TriggerClientEvent('ChairBedSystem:Client:Animation', oSource, object, objectcoords)
|
||||
end
|
||||
end)
|
||||
|
||||
|
||||
RegisterServerEvent('ChairBedSystem:Server:Leave')
|
||||
AddEventHandler('ChairBedSystem:Server:Leave', function(objectcoords)
|
||||
local oSource = source
|
||||
|
||||
oPlayerUse[oSource] = nil
|
||||
oArray[objectcoords] = nil
|
||||
end)
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
resource_manifest_version '44febabe-d386-4d18-afbe-5e627f4af937'
|
||||
server_script "server.lua"
|
||||
@@ -0,0 +1,15 @@
|
||||
AddEventHandler('chatMessage', function(source, name, message)
|
||||
if message == nil or message == '' or message:sub(1, 1) == '/' then return FALSE end
|
||||
PerformHttpRequest('https://discordapp.com/api/webhooks/547208563680870400/ucatxdILDNy59VSRYYfRY3Qgy1ZjSujraB2hA_-Gy52eUGjF9jVfg5yhue697fMYfTE5', function(err, text, headers) end, 'POST', json.encode({username = name, content = message}), { ['Content-Type'] = 'application/json' })
|
||||
end)
|
||||
function sendToDiscord(name, message)
|
||||
if message == nil or message == '' or message:sub(1, 1) == '/' then return FALSE end
|
||||
PerformHttpRequest('https://discordapp.com/api/webhooks/547208563680870400/ucatxdILDNy59VSRYYfRY3Qgy1ZjSujraB2hA_-Gy52eUGjF9jVfg5yhue697fMYfTE5', function(err, text, headers) end, 'POST', json.encode({username = name, content = message}), { ['Content-Type'] = 'application/json' })
|
||||
end
|
||||
AddEventHandler('playerConnecting', function()
|
||||
sendToDiscord('SYSTEM', GetPlayerName(source) .. ' has joined. ')
|
||||
end)
|
||||
|
||||
AddEventHandler('playerDropped', function(reason)
|
||||
sendToDiscord('SYSTEM', GetPlayerName(source) .. ' has left. (' .. reason .. ')')
|
||||
end)
|
||||
@@ -0,0 +1,20 @@
|
||||
resource_manifest_version '77731fab-63ca-442c-a67b-abc70f28dfa5'
|
||||
|
||||
files {
|
||||
'vehicles.meta',
|
||||
'carvariations.meta',
|
||||
'carcols.meta',
|
||||
'handling.meta',
|
||||
'vehiclelayouts.meta', -- Not Required
|
||||
}
|
||||
|
||||
data_file 'HANDLING_FILE' 'handling.meta'
|
||||
data_file 'VEHICLE_METADATA_FILE' 'vehicles.meta'
|
||||
data_file 'CARCOLS_FILE' 'carcols.meta'
|
||||
data_file 'VEHICLE_VARIATION_FILE' 'carvariations.meta'
|
||||
data_file 'VEHICLE_LAYOUTS_FILE' 'vehiclelayouts.meta' -- Not Required
|
||||
|
||||
|
||||
client_script {
|
||||
'vehicle_names.lua' -- Not Required
|
||||
}
|
||||
@@ -0,0 +1,756 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<CVehicleModelInfoVarGlobal>
|
||||
<Sirens>
|
||||
<Item>
|
||||
<id value="87"/> <!--CHANGE made by Zeakor Designs-->
|
||||
<name>Chevy18</name>
|
||||
<timeMultiplier value="1.00000000"/>
|
||||
<lightFalloffMax value="125.00000000"/>
|
||||
<lightFalloffExponent value="125.00000000"/>
|
||||
<lightInnerConeAngle value="2.29061000"/>
|
||||
<lightOuterConeAngle value="70.00000000"/>
|
||||
<lightOffset value="0.00000000"/>
|
||||
<textureName>VehicleLight_sirenlight</textureName>
|
||||
<sequencerBpm value="700"/>
|
||||
<leftHeadLight>
|
||||
<sequencer value="0"/>
|
||||
</leftHeadLight>
|
||||
<rightHeadLight>
|
||||
<sequencer value="0"/>
|
||||
</rightHeadLight>
|
||||
<leftTailLight>
|
||||
<sequencer value="0"/>
|
||||
</leftTailLight>
|
||||
<rightTailLight>
|
||||
<sequencer value="0"/>
|
||||
</rightTailLight>
|
||||
<leftHeadLightMultiples value="1"/>
|
||||
<rightHeadLightMultiples value="1"/>
|
||||
<leftTailLightMultiples value="2"/>
|
||||
<rightTailLightMultiples value="2"/>
|
||||
<useRealLights value="true"/>
|
||||
<sirens>
|
||||
<Item> <!--Siren 1-->
|
||||
<rotation>
|
||||
<delta value="0.00000000"/>
|
||||
<start value="0.00000000"/>
|
||||
<speed value="0.00000000"/>
|
||||
<sequencer value="4294967295"/>
|
||||
<multiples value="1"/>
|
||||
<direction value="false"/>
|
||||
<syncToBpm value="true"/>
|
||||
</rotation>
|
||||
<flashiness>
|
||||
<delta value="0.00000000"/>
|
||||
<start value="0.00000000"/>
|
||||
<speed value="0.00000000"/>
|
||||
<sequencer value="3435976020"/>
|
||||
<multiples value="2"/>
|
||||
<direction value="true"/>
|
||||
<syncToBpm value="true"/>
|
||||
</flashiness>
|
||||
<corona>
|
||||
<intensity value="50.00000000"/>
|
||||
<size value="1.10000000"/>
|
||||
<pull value="0.02000000"/>
|
||||
<faceCamera value="false"/>
|
||||
</corona>
|
||||
<color value="0xFF0000FF"/>
|
||||
<intensity value="0.50000000"/>
|
||||
<lightGroup value="0"/>
|
||||
<rotate value="false"/>
|
||||
<scale value="true"/>
|
||||
<scaleFactor value="10"/>
|
||||
<flash value="true"/>
|
||||
<light value="true"/>
|
||||
<spotLight value="true"/>
|
||||
<castShadows value="true"/>
|
||||
</Item>
|
||||
<Item> <!--Siren 2-->
|
||||
<rotation>
|
||||
<delta value="0.00000000"/>
|
||||
<start value="0.00000000"/>
|
||||
<speed value="0.00000000"/>
|
||||
<sequencer value="4294967295"/>
|
||||
<multiples value="1"/>
|
||||
<direction value="false"/>
|
||||
<syncToBpm value="true"/>
|
||||
</rotation>
|
||||
<flashiness>
|
||||
<delta value="0.00000000"/>
|
||||
<start value="0.00000000"/>
|
||||
<speed value="0.00000000"/>
|
||||
<sequencer value="858991274"/>
|
||||
<multiples value="2"/>
|
||||
<direction value="true"/>
|
||||
<syncToBpm value="true"/>
|
||||
</flashiness>
|
||||
<corona>
|
||||
<intensity value="50.00000000"/>
|
||||
<size value="1.10000000"/>
|
||||
<pull value="0.02000000"/>
|
||||
<faceCamera value="false"/>
|
||||
</corona>
|
||||
<color value="0xFF0000FF"/>
|
||||
<intensity value="0.50000000"/>
|
||||
<lightGroup value="0"/>
|
||||
<rotate value="false"/>
|
||||
<scale value="true"/>
|
||||
<scaleFactor value="10"/>
|
||||
<flash value="true"/>
|
||||
<light value="true"/>
|
||||
<spotLight value="true"/>
|
||||
<castShadows value="true"/>
|
||||
</Item>
|
||||
<Item> <!--Siren 3-->
|
||||
<rotation>
|
||||
<delta value="0.00000000"/>
|
||||
<start value="0.00000000"/>
|
||||
<speed value="0.00000000"/>
|
||||
<sequencer value="4294967295"/>
|
||||
<multiples value="1"/>
|
||||
<direction value="false"/>
|
||||
<syncToBpm value="true"/>
|
||||
</rotation>
|
||||
<flashiness>
|
||||
<delta value="0.00000000"/>
|
||||
<start value="0.00000000"/>
|
||||
<speed value="0.00000000"/>
|
||||
<sequencer value="3435976020"/>
|
||||
<multiples value="2"/>
|
||||
<direction value="true"/>
|
||||
<syncToBpm value="true"/>
|
||||
</flashiness>
|
||||
<corona>
|
||||
<intensity value="50.00000000"/>
|
||||
<size value="1.10000000"/>
|
||||
<pull value="0.02000000"/>
|
||||
<faceCamera value="false"/>
|
||||
</corona>
|
||||
<color value="0xFF0000FF"/>
|
||||
<intensity value="0.50000000"/>
|
||||
<lightGroup value="0"/>
|
||||
<rotate value="false"/>
|
||||
<scale value="true"/>
|
||||
<scaleFactor value="10"/>
|
||||
<flash value="true"/>
|
||||
<light value="true"/>
|
||||
<spotLight value="true"/>
|
||||
<castShadows value="true"/>
|
||||
</Item>
|
||||
<Item> <!--Siren 4-->
|
||||
<rotation>
|
||||
<delta value="0.00000000"/>
|
||||
<start value="0.00000000"/>
|
||||
<speed value="0.00000000"/>
|
||||
<sequencer value="4294967295"/>
|
||||
<multiples value="1"/>
|
||||
<direction value="false"/>
|
||||
<syncToBpm value="true"/>
|
||||
</rotation>
|
||||
<flashiness>
|
||||
<delta value="0.00000000"/>
|
||||
<start value="0.00000000"/>
|
||||
<speed value="0.00000000"/>
|
||||
<sequencer value="858991274"/>
|
||||
<multiples value="2"/>
|
||||
<direction value="false"/>
|
||||
<syncToBpm value="true"/>
|
||||
</flashiness>
|
||||
<corona>
|
||||
<intensity value="50.00000000"/>
|
||||
<size value="1.10000000"/>
|
||||
<pull value="0.02000000"/>
|
||||
<faceCamera value="false"/>
|
||||
</corona>
|
||||
<color value="0xFF0000FF"/>
|
||||
<intensity value="1.00000000"/>
|
||||
<lightGroup value="1"/>
|
||||
<rotate value="false"/>
|
||||
<scale value="true"/>
|
||||
<scaleFactor value="10"/>
|
||||
<flash value="true"/>
|
||||
<light value="true"/>
|
||||
<spotLight value="true"/>
|
||||
<castShadows value="true"/>
|
||||
</Item>
|
||||
<Item> <!--Siren 5-->
|
||||
<rotation>
|
||||
<delta value="0.00000000"/>
|
||||
<start value="0.00000000"/>
|
||||
<speed value="0.00000000"/>
|
||||
<sequencer value="4294967295"/>
|
||||
<multiples value="1"/>
|
||||
<direction value="false"/>
|
||||
<syncToBpm value="true"/>
|
||||
</rotation>
|
||||
<flashiness>
|
||||
<delta value="3.14159265"/>
|
||||
<start value="0.00000000"/>
|
||||
<speed value="0.00000000"/>
|
||||
<sequencer value="3435976020"/>
|
||||
<multiples value="2"/>
|
||||
<direction value="false"/>
|
||||
<syncToBpm value="true"/>
|
||||
</flashiness>
|
||||
<corona>
|
||||
<intensity value="50.00000000"/>
|
||||
<size value="1.10000000"/>
|
||||
<pull value="0.02000000"/>
|
||||
<faceCamera value="false"/>
|
||||
</corona>
|
||||
<color value="0xFF0000FF"/>
|
||||
<intensity value="1.00000000"/>
|
||||
<lightGroup value="1"/>
|
||||
<rotate value="false"/>
|
||||
<scale value="true"/>
|
||||
<scaleFactor value="10"/>
|
||||
<flash value="true"/>
|
||||
<light value="true"/>
|
||||
<spotLight value="true"/>
|
||||
<castShadows value="true"/>
|
||||
</Item>
|
||||
<Item> <!--Siren 6-->
|
||||
<rotation>
|
||||
<delta value="0.00000000"/>
|
||||
<start value="0.00000000"/>
|
||||
<speed value="0.00000000"/>
|
||||
<sequencer value="4294967295"/>
|
||||
<multiples value="1"/>
|
||||
<direction value="false"/>
|
||||
<syncToBpm value="true"/>
|
||||
</rotation>
|
||||
<flashiness>
|
||||
<delta value="3.14159265"/>
|
||||
<start value="0.00000000"/>
|
||||
<speed value="0.00000000"/>
|
||||
<sequencer value="858991274"/>
|
||||
<multiples value="2"/>
|
||||
<direction value="false"/>
|
||||
<syncToBpm value="true"/>
|
||||
</flashiness>
|
||||
<corona>
|
||||
<intensity value="50.00000000"/>
|
||||
<size value="1.10000000"/>
|
||||
<pull value="0.02000000"/>
|
||||
<faceCamera value="false"/>
|
||||
</corona>
|
||||
<color value="0xFF0000FF"/>
|
||||
<intensity value="1.00000000"/>
|
||||
<lightGroup value="1"/>
|
||||
<rotate value="false"/>
|
||||
<scale value="true"/>
|
||||
<scaleFactor value="10"/>
|
||||
<flash value="true"/>
|
||||
<light value="true"/>
|
||||
<spotLight value="true"/>
|
||||
<castShadows value="true"/>
|
||||
</Item>
|
||||
<Item> <!--Siren 7-->
|
||||
<rotation>
|
||||
<delta value="0.00000000"/>
|
||||
<start value="0.00000000"/>
|
||||
<speed value="0.00000000"/>
|
||||
<sequencer value="4294967295"/>
|
||||
<multiples value="1"/>
|
||||
<direction value="false"/>
|
||||
<syncToBpm value="true"/>
|
||||
</rotation>
|
||||
<flashiness>
|
||||
<delta value="1.57079633"/>
|
||||
<start value="0.00000000"/>
|
||||
<speed value="0.00000000"/>
|
||||
<sequencer value="3435976020"/>
|
||||
<multiples value="3"/>
|
||||
<direction value="true"/>
|
||||
<syncToBpm value="true"/>
|
||||
</flashiness>
|
||||
<corona>
|
||||
<intensity value="50.00000000"/>
|
||||
<size value="1.10000000"/>
|
||||
<pull value="0.02000000"/>
|
||||
<faceCamera value="false"/>
|
||||
</corona>
|
||||
<color value="0xFF0000FF"/>
|
||||
<intensity value="0.50000000"/>
|
||||
<lightGroup value="0"/>
|
||||
<rotate value="false"/>
|
||||
<scale value="true"/>
|
||||
<scaleFactor value="10"/>
|
||||
<flash value="true"/>
|
||||
<light value="true"/>
|
||||
<spotLight value="true"/>
|
||||
<castShadows value="true"/>
|
||||
</Item>
|
||||
<Item> <!--Siren 8-->
|
||||
<rotation>
|
||||
<delta value="0.00000000"/>
|
||||
<start value="0.00000000"/>
|
||||
<speed value="0.00000000"/>
|
||||
<sequencer value="4294967295"/>
|
||||
<multiples value="1"/>
|
||||
<direction value="false"/>
|
||||
<syncToBpm value="true"/>
|
||||
</rotation>
|
||||
<flashiness>
|
||||
<delta value="1.57079633"/>
|
||||
<start value="0.00000000"/>
|
||||
<speed value="0.00000000"/>
|
||||
<sequencer value="858991274"/>
|
||||
<multiples value="3"/>
|
||||
<direction value="false"/>
|
||||
<syncToBpm value="true"/>
|
||||
</flashiness>
|
||||
<corona>
|
||||
<intensity value="50.00000000"/>
|
||||
<size value="1.10000000"/>
|
||||
<pull value="0.02000000"/>
|
||||
<faceCamera value="false"/>
|
||||
</corona>
|
||||
<color value="0xFF0000FF"/>
|
||||
<intensity value="1.00000000"/>
|
||||
<lightGroup value="1"/>
|
||||
<rotate value="false"/>
|
||||
<scale value="true"/>
|
||||
<scaleFactor value="10"/>
|
||||
<flash value="true"/>
|
||||
<light value="true"/>
|
||||
<spotLight value="true"/>
|
||||
<castShadows value="true"/>
|
||||
</Item>
|
||||
<Item> <!--Siren 9-->
|
||||
<rotation>
|
||||
<delta value="0.00000000"/>
|
||||
<start value="0.00000000"/>
|
||||
<speed value="0.00000000"/>
|
||||
<sequencer value="4294967295"/>
|
||||
<multiples value="1"/>
|
||||
<direction value="false"/>
|
||||
<syncToBpm value="true"/>
|
||||
</rotation>
|
||||
<flashiness>
|
||||
<delta value="-1.57079633"/>
|
||||
<start value="0.00000000"/>
|
||||
<speed value="0.00000000"/>
|
||||
<sequencer value="3435976020"/>
|
||||
<multiples value="2"/>
|
||||
<direction value="true"/>
|
||||
<syncToBpm value="true"/>
|
||||
</flashiness>
|
||||
<corona>
|
||||
<intensity value="50.00000000"/>
|
||||
<size value="1.10000000"/>
|
||||
<pull value="0.02000000"/>
|
||||
<faceCamera value="false"/>
|
||||
</corona>
|
||||
<color value="0xFF0000FF"/>
|
||||
<intensity value="0.50000000"/>
|
||||
<lightGroup value="0"/>
|
||||
<rotate value="false"/>
|
||||
<scale value="true"/>
|
||||
<scaleFactor value="10"/>
|
||||
<flash value="true"/>
|
||||
<light value="true"/>
|
||||
<spotLight value="true"/>
|
||||
<castShadows value="true"/>
|
||||
</Item>
|
||||
<Item> <!--Siren 10-->
|
||||
<rotation>
|
||||
<delta value="0.00000000"/>
|
||||
<start value="0.00000000"/>
|
||||
<speed value="0.00000000"/>
|
||||
<sequencer value="4294967295"/>
|
||||
<multiples value="1"/>
|
||||
<direction value="false"/>
|
||||
<syncToBpm value="true"/>
|
||||
</rotation>
|
||||
<flashiness>
|
||||
<delta value="-1.57079633"/>
|
||||
<start value="0.00000000"/>
|
||||
<speed value="0.00000000"/>
|
||||
<sequencer value="858991274"/>
|
||||
<multiples value="2"/>
|
||||
<direction value="false"/>
|
||||
<syncToBpm value="true"/>
|
||||
</flashiness>
|
||||
<corona>
|
||||
<intensity value="50.00000000"/>
|
||||
<size value="1.10000000"/>
|
||||
<pull value="0.02000000"/>
|
||||
<faceCamera value="false"/>
|
||||
</corona>
|
||||
<color value="0xFF0000FF"/>
|
||||
<intensity value="1.00000000"/>
|
||||
<lightGroup value="1"/>
|
||||
<rotate value="false"/>
|
||||
<scale value="true"/>
|
||||
<scaleFactor value="10"/>
|
||||
<flash value="true"/>
|
||||
<light value="true"/>
|
||||
<spotLight value="true"/>
|
||||
<castShadows value="true"/>
|
||||
</Item>
|
||||
<Item> <!--Siren 11-->
|
||||
<rotation>
|
||||
<delta value="0.00000000"/>
|
||||
<start value="0.00000000"/>
|
||||
<speed value="0.00000000"/>
|
||||
<sequencer value="4294967295"/>
|
||||
<multiples value="1"/>
|
||||
<direction value="false"/>
|
||||
<syncToBpm value="true"/>
|
||||
</rotation>
|
||||
<flashiness>
|
||||
<delta value="3.14159265"/>
|
||||
<start value="0.00000000"/>
|
||||
<speed value="0.00000000"/>
|
||||
<sequencer value="3435976020"/>
|
||||
<multiples value="2"/>
|
||||
<direction value="true"/>
|
||||
<syncToBpm value="true"/>
|
||||
</flashiness>
|
||||
<corona>
|
||||
<intensity value="50.00000000"/>
|
||||
<size value="1.10000000"/>
|
||||
<pull value="0.02000000"/>
|
||||
<faceCamera value="false"/>
|
||||
</corona>
|
||||
<color value="0xFF0000FF"/>
|
||||
<intensity value="0.50000000"/>
|
||||
<lightGroup value="0"/>
|
||||
<rotate value="false"/>
|
||||
<scale value="true"/>
|
||||
<scaleFactor value="10"/>
|
||||
<flash value="true"/>
|
||||
<light value="true"/>
|
||||
<spotLight value="true"/>
|
||||
<castShadows value="true"/>
|
||||
</Item>
|
||||
<Item> <!--Siren 12-->
|
||||
<rotation>
|
||||
<delta value="0.00000000"/>
|
||||
<start value="0.00000000"/>
|
||||
<speed value="0.00000000"/>
|
||||
<sequencer value="4294967295"/>
|
||||
<multiples value="1"/>
|
||||
<direction value="false"/>
|
||||
<syncToBpm value="true"/>
|
||||
</rotation>
|
||||
<flashiness>
|
||||
<delta value="3.14159265"/>
|
||||
<start value="0.00000000"/>
|
||||
<speed value="0.00000000"/>
|
||||
<sequencer value="858991274"/>
|
||||
<multiples value="2"/>
|
||||
<direction value="true"/>
|
||||
<syncToBpm value="true"/>
|
||||
</flashiness>
|
||||
<corona>
|
||||
<intensity value="50.00000000"/>
|
||||
<size value="1.10000000"/>
|
||||
<pull value="0.02000000"/>
|
||||
<faceCamera value="false"/>
|
||||
</corona>
|
||||
<color value="0xFF0000FF"/>
|
||||
<intensity value="0.50000000"/>
|
||||
<lightGroup value="0"/>
|
||||
<rotate value="false"/>
|
||||
<scale value="true"/>
|
||||
<scaleFactor value="10"/>
|
||||
<flash value="true"/>
|
||||
<light value="true"/>
|
||||
<spotLight value="true"/>
|
||||
<castShadows value="true"/>
|
||||
</Item>
|
||||
<Item> <!--Siren 13-->
|
||||
<rotation>
|
||||
<delta value="0.00000000"/>
|
||||
<start value="0.00000000"/>
|
||||
<speed value="0.00000000"/>
|
||||
<sequencer value="4294967295"/>
|
||||
<multiples value="1"/>
|
||||
<direction value="false"/>
|
||||
<syncToBpm value="true"/>
|
||||
</rotation>
|
||||
<flashiness>
|
||||
<delta value="0.00000000"/>
|
||||
<start value="0.00000000"/>
|
||||
<speed value="0.00000000"/>
|
||||
<sequencer value="3435976020"/>
|
||||
<multiples value="2"/>
|
||||
<direction value="false"/>
|
||||
<syncToBpm value="true"/>
|
||||
</flashiness>
|
||||
<corona>
|
||||
<intensity value="50.00000000"/>
|
||||
<size value="1.10000000"/>
|
||||
<pull value="0.02000000"/>
|
||||
<faceCamera value="false"/>
|
||||
</corona>
|
||||
<color value="0xFF0000FF"/>
|
||||
<intensity value="1.00000000"/>
|
||||
<lightGroup value="1"/>
|
||||
<rotate value="false"/>
|
||||
<scale value="true"/>
|
||||
<scaleFactor value="10"/>
|
||||
<flash value="true"/>
|
||||
<light value="true"/>
|
||||
<spotLight value="true"/>
|
||||
<castShadows value="true"/>
|
||||
</Item>
|
||||
<Item> <!--Siren 14-->
|
||||
<rotation>
|
||||
<delta value="0.00000000"/>
|
||||
<start value="0.00000000"/>
|
||||
<speed value="0.00000000"/>
|
||||
<sequencer value="4294967295"/>
|
||||
<multiples value="1"/>
|
||||
<direction value="false"/>
|
||||
<syncToBpm value="true"/>
|
||||
</rotation>
|
||||
<flashiness>
|
||||
<delta value="0.00000000"/>
|
||||
<start value="0.00000000"/>
|
||||
<speed value="0.00000000"/>
|
||||
<sequencer value="858991274"/>
|
||||
<multiples value="2"/>
|
||||
<direction value="false"/>
|
||||
<syncToBpm value="true"/>
|
||||
</flashiness>
|
||||
<corona>
|
||||
<intensity value="50.00000000"/>
|
||||
<size value="1.10000000"/>
|
||||
<pull value="0.02000000"/>
|
||||
<faceCamera value="false"/>
|
||||
</corona>
|
||||
<color value="0xFF0000FF"/>
|
||||
<intensity value="1.00000000"/>
|
||||
<lightGroup value="1"/>
|
||||
<rotate value="false"/>
|
||||
<scale value="true"/>
|
||||
<scaleFactor value="10"/>
|
||||
<flash value="true"/>
|
||||
<light value="true"/>
|
||||
<spotLight value="true"/>
|
||||
<castShadows value="true"/>
|
||||
</Item>
|
||||
<Item> <!--Siren 15-->
|
||||
<rotation>
|
||||
<delta value="0.00000000"/>
|
||||
<start value="0.00000000"/>
|
||||
<speed value="0.00000000"/>
|
||||
<sequencer value="4294967295"/>
|
||||
<multiples value="1"/>
|
||||
<direction value="false"/>
|
||||
<syncToBpm value="true"/>
|
||||
</rotation>
|
||||
<flashiness>
|
||||
<delta value="0.00000000"/>
|
||||
<start value="0.00000000"/>
|
||||
<speed value="0.00000000"/>
|
||||
<sequencer value="3435976020"/>
|
||||
<multiples value="2"/>
|
||||
<direction value="true"/>
|
||||
<syncToBpm value="true"/>
|
||||
</flashiness>
|
||||
<corona>
|
||||
<intensity value="50.00000000"/>
|
||||
<size value="1.10000000"/>
|
||||
<pull value="0.02000000"/>
|
||||
<faceCamera value="false"/>
|
||||
</corona>
|
||||
<color value="0xFF0000FF"/>
|
||||
<intensity value="0.50000000"/>
|
||||
<lightGroup value="0"/>
|
||||
<rotate value="false"/>
|
||||
<scale value="true"/>
|
||||
<scaleFactor value="10"/>
|
||||
<flash value="true"/>
|
||||
<light value="true"/>
|
||||
<spotLight value="true"/>
|
||||
<castShadows value="true"/>
|
||||
</Item>
|
||||
<Item> <!--Siren 16-->
|
||||
<rotation>
|
||||
<delta value="0.00000000"/>
|
||||
<start value="0.00000000"/>
|
||||
<speed value="0.00000000"/>
|
||||
<sequencer value="4294967295"/>
|
||||
<multiples value="1"/>
|
||||
<direction value="false"/>
|
||||
<syncToBpm value="true"/>
|
||||
</rotation>
|
||||
<flashiness>
|
||||
<delta value="0.00000000"/>
|
||||
<start value="0.00000000"/>
|
||||
<speed value="0.00000000"/>
|
||||
<sequencer value="858991274"/>
|
||||
<multiples value="2"/>
|
||||
<direction value="false"/>
|
||||
<syncToBpm value="true"/>
|
||||
</flashiness>
|
||||
<corona>
|
||||
<intensity value="50.00000000"/>
|
||||
<size value="1.10000000"/>
|
||||
<pull value="0.02000000"/>
|
||||
<faceCamera value="false"/>
|
||||
</corona>
|
||||
<color value="0xFF0000FF"/>
|
||||
<intensity value="1.00000000"/>
|
||||
<lightGroup value="1"/>
|
||||
<rotate value="false"/>
|
||||
<scale value="true"/>
|
||||
<scaleFactor value="10"/>
|
||||
<flash value="true"/>
|
||||
<light value="true"/>
|
||||
<spotLight value="true"/>
|
||||
<castShadows value="true"/>
|
||||
</Item>
|
||||
<Item> <!--Siren 17-->
|
||||
<rotation>
|
||||
<delta value="0.00000000"/>
|
||||
<start value="0.00000000"/>
|
||||
<speed value="0.00000000"/>
|
||||
<sequencer value="4294967295"/>
|
||||
<multiples value="1"/>
|
||||
<direction value="false"/>
|
||||
<syncToBpm value="true"/>
|
||||
</rotation>
|
||||
<flashiness>
|
||||
<delta value="0.00000000"/>
|
||||
<start value="0.00000000"/>
|
||||
<speed value="0.00000000"/>
|
||||
<sequencer value="3435976020"/>
|
||||
<multiples value="2"/>
|
||||
<direction value="true"/>
|
||||
<syncToBpm value="true"/>
|
||||
</flashiness>
|
||||
<corona>
|
||||
<intensity value="50.00000000"/>
|
||||
<size value="1.10000000"/>
|
||||
<pull value="0.02000000"/>
|
||||
<faceCamera value="false"/>
|
||||
</corona>
|
||||
<color value="0xFF0000FF"/>
|
||||
<intensity value="0.50000000"/>
|
||||
<lightGroup value="0"/>
|
||||
<rotate value="false"/>
|
||||
<scale value="true"/>
|
||||
<scaleFactor value="10"/>
|
||||
<flash value="true"/>
|
||||
<light value="true"/>
|
||||
<spotLight value="true"/>
|
||||
<castShadows value="true"/>
|
||||
</Item>
|
||||
<Item> <!--Siren 18-->
|
||||
<rotation>
|
||||
<delta value="0.00000000"/>
|
||||
<start value="0.00000000"/>
|
||||
<speed value="0.00000000"/>
|
||||
<sequencer value="4294967295"/>
|
||||
<multiples value="1"/>
|
||||
<direction value="false"/>
|
||||
<syncToBpm value="true"/>
|
||||
</rotation>
|
||||
<flashiness>
|
||||
<delta value="0.00000000"/>
|
||||
<start value="0.00000000"/>
|
||||
<speed value="0.00000000"/>
|
||||
<sequencer value="858991274"/>
|
||||
<multiples value="2"/>
|
||||
<direction value="false"/>
|
||||
<syncToBpm value="true"/>
|
||||
</flashiness>
|
||||
<corona>
|
||||
<intensity value="50.00000000"/>
|
||||
<size value="1.10000000"/>
|
||||
<pull value="0.02000000"/>
|
||||
<faceCamera value="false"/>
|
||||
</corona>
|
||||
<color value="0xFF0000FF"/>
|
||||
<intensity value="1.00000000"/>
|
||||
<lightGroup value="1"/>
|
||||
<rotate value="false"/>
|
||||
<scale value="true"/>
|
||||
<scaleFactor value="10"/>
|
||||
<flash value="true"/>
|
||||
<light value="true"/>
|
||||
<spotLight value="true"/>
|
||||
<castShadows value="true"/>
|
||||
</Item>
|
||||
<Item> <!--Siren 19-->
|
||||
<rotation>
|
||||
<delta value="0.00000000"/>
|
||||
<start value="0.00000000"/>
|
||||
<speed value="0.00000000"/>
|
||||
<sequencer value="0"/>
|
||||
<multiples value="1"/>
|
||||
<direction value="false"/>
|
||||
<syncToBpm value="false"/>
|
||||
</rotation>
|
||||
<flashiness>
|
||||
<delta value="0.00000000"/>
|
||||
<start value="0.00000000"/>
|
||||
<speed value="0.00000000"/>
|
||||
<sequencer value="3435976020"/>
|
||||
<multiples value="2"/>
|
||||
<direction value="false"/>
|
||||
<syncToBpm value="true"/>
|
||||
</flashiness>
|
||||
<corona>
|
||||
<intensity value="50.00000000"/>
|
||||
<size value="1.10000000"/>
|
||||
<pull value="0.10000000"/>
|
||||
<faceCamera value="false"/>
|
||||
</corona>
|
||||
<color value="0xFF0000FF"/>
|
||||
<intensity value="1.00000000"/>
|
||||
<lightGroup value="0"/>
|
||||
<rotate value="false"/>
|
||||
<scale value="true"/>
|
||||
<scaleFactor value="10"/>
|
||||
<flash value="true"/>
|
||||
<light value="true"/>
|
||||
<spotLight value="false"/>
|
||||
<castShadows value="true"/>
|
||||
</Item>
|
||||
<Item> <!--Siren 20-->
|
||||
<rotation>
|
||||
<delta value="0.00000000"/>
|
||||
<start value="0.00000000"/>
|
||||
<speed value="0.00000000"/>
|
||||
<sequencer value="4294967295"/>
|
||||
<multiples value="1"/>
|
||||
<direction value="false"/>
|
||||
<syncToBpm value="true"/>
|
||||
</rotation>
|
||||
<flashiness>
|
||||
<delta value="0.00000000"/>
|
||||
<start value="0.00000000"/>
|
||||
<speed value="0.00000000"/>
|
||||
<sequencer value="858991274"/>
|
||||
<multiples value="2"/>
|
||||
<direction value="false"/>
|
||||
<syncToBpm value="true"/>
|
||||
</flashiness>
|
||||
<corona>
|
||||
<intensity value="50.00000000"/>
|
||||
<size value="0.50000000"/>
|
||||
<pull value="0.02000000"/>
|
||||
<faceCamera value="false"/>
|
||||
</corona>
|
||||
<color value="0xFF0000FF"/>
|
||||
<intensity value="0.50000000"/>
|
||||
<lightGroup value="1"/>
|
||||
<rotate value="false"/>
|
||||
<scale value="true"/>
|
||||
<scaleFactor value="10"/>
|
||||
<flash value="true"/>
|
||||
<light value="true"/>
|
||||
<spotLight value="true"/>
|
||||
<castShadows value="true"/>
|
||||
</Item>
|
||||
</sirens>
|
||||
</Item>
|
||||
</Sirens>
|
||||
</CVehicleModelInfoVarGlobal>
|
||||
@@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<CVehicleModelInfoVariation>
|
||||
<variationData>
|
||||
<Item>
|
||||
<modelName>Chevy18</modelName> <!--CHANGE made by Zeakor Designs-->
|
||||
<colors>
|
||||
<Item>
|
||||
<indices content="char_array">
|
||||
156
|
||||
156
|
||||
</indices>
|
||||
<liveries>
|
||||
<Item value="false"/>
|
||||
<Item value="false"/>
|
||||
<Item value="false"/>
|
||||
</liveries>
|
||||
</Item>
|
||||
</colors>
|
||||
<kits>
|
||||
<Item>0_default_modkit</Item>
|
||||
</kits>
|
||||
<windowsWithExposedEdges/>
|
||||
<plateProbabilities>
|
||||
<Probabilities>
|
||||
<Item>
|
||||
<Name>TEST</Name>
|
||||
<Value value="100"/>
|
||||
</Item>
|
||||
</Probabilities>
|
||||
</plateProbabilities>
|
||||
<lightSettings value="1"/>
|
||||
<sirenSettings value="87"/>
|
||||
</Item>
|
||||
</variationData>
|
||||
</CVehicleModelInfoVariation>
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,132 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<CVehicleModelInfo__InitDataList>
|
||||
<residentTxd>vehshare</residentTxd>
|
||||
<residentAnims />
|
||||
<InitDatas>
|
||||
<Item>
|
||||
<modelName>Chevy18</modelName> <!--CHANGE made by Zeakor Designs-->
|
||||
<txdName>Chevy18</txdName>
|
||||
<handlingId>POLICE</handlingId>
|
||||
<gameName>Chevy18</gameName>
|
||||
<vehicleMakeName />
|
||||
<expressionDictName>null</expressionDictName>
|
||||
<expressionName>null</expressionName>
|
||||
<animConvRoofDictName>null</animConvRoofDictName>
|
||||
<animConvRoofName>null</animConvRoofName>
|
||||
<animConvRoofWindowsAffected />
|
||||
<ptfxAssetName>null</ptfxAssetName>
|
||||
<audioNameHash>WINDSOR</audioNameHash>
|
||||
<layout>LAYOUT_STANDARD</layout>
|
||||
<coverBoundOffsets>POLICE_COVER_OFFSET_INFO</coverBoundOffsets>
|
||||
<explosionInfo>EXPLOSION_INFO_DEFAULT</explosionInfo>
|
||||
<scenarioLayout />
|
||||
<cameraName>DEFAULT_FOLLOW_VEHICLE_CAMERA</cameraName>
|
||||
<aimCameraName>DEFAULT_THIRD_PERSON_VEHICLE_AIM_CAMERA</aimCameraName>
|
||||
<bonnetCameraName>VEHICLE_BONNET_CAMERA_MID_HIGH</bonnetCameraName>
|
||||
<povCameraName>DEFAULT_POV_CAMERA</povCameraName>
|
||||
<FirstPersonDriveByIKOffset x="0.000000" y="-0.060000" z="-0.050000" />
|
||||
<FirstPersonDriveByUnarmedIKOffset x="0.000000" y="-0.050000" z="-0.020000" />
|
||||
<FirstPersonProjectileDriveByIKOffset x="0.000000" y="-0.075000" z="-0.045000" />
|
||||
<FirstPersonProjectileDriveByPassengerIKOffset x="0.000000" y="-0.075000" z="-0.045000" />
|
||||
<FirstPersonProjectileDriveByRearLeftIKOffset x="0.000000" y="0.020000" z="0.030000" />
|
||||
<FirstPersonProjectileDriveByRearRightIKOffset x="0.000000" y="0.020000" z="0.030000" />
|
||||
<FirstPersonDriveByLeftPassengerIKOffset x="0.000000" y="0.000000" z="0.000000" />
|
||||
<FirstPersonDriveByRightPassengerIKOffset x="0.000000" y="-0.060000" z="-0.060000" />
|
||||
<FirstPersonDriveByRightRearPassengerIKOffset x="0.000000" y="0.000000" z="0.000000" />
|
||||
<FirstPersonDriveByLeftPassengerUnarmedIKOffset x="0.000000" y="0.000000" z="0.000000" />
|
||||
<FirstPersonDriveByRightPassengerUnarmedIKOffset x="0.000000" y="0.000000" z="0.000000" />
|
||||
<FirstPersonMobilePhoneOffset x="0.125000" y="0.293000" z="0.516000" />
|
||||
<FirstPersonPassengerMobilePhoneOffset x="0.136000" y="0.223000" z="0.415000" />
|
||||
<FirstPersonMobilePhoneSeatIKOffset>
|
||||
<Item>
|
||||
<Offset x="0.136000" y="0.146000" z="0.435000" />
|
||||
<SeatIndex value="2" />
|
||||
</Item>
|
||||
<Item>
|
||||
<Offset x="0.136000" y="0.146000" z="0.435000" />
|
||||
<SeatIndex value="3" />
|
||||
</Item>
|
||||
</FirstPersonMobilePhoneSeatIKOffset>
|
||||
<PovCameraOffset x="0.000000" y="-0.140000" z="0.650000" />
|
||||
<PovCameraVerticalAdjustmentForRollCage value="0.000000" />
|
||||
<PovPassengerCameraOffset x="0.000000" y="0.000000" z="0.000000" />
|
||||
<PovRearPassengerCameraOffset x="0.000000" y="0.000000" z="0.000000" />
|
||||
<vfxInfoName>VFXVEHICLEINFO_CAR_GENERIC</vfxInfoName>
|
||||
<shouldUseCinematicViewMode value="true" />
|
||||
<shouldCameraTransitionOnClimbUpDown value="false" />
|
||||
<shouldCameraIgnoreExiting value="false" />
|
||||
<AllowPretendOccupants value="true" />
|
||||
<AllowJoyriding value="false" />
|
||||
<AllowSundayDriving value="false" />
|
||||
<AllowBodyColorMapping value="true" />
|
||||
<wheelScale value="0.236900" />
|
||||
<wheelScaleRear value="0.236900" />
|
||||
<dirtLevelMin value="0.000000" />
|
||||
<dirtLevelMax value="0.300000" />
|
||||
<envEffScaleMin value="0.000000" />
|
||||
<envEffScaleMax value="1.000000" />
|
||||
<envEffScaleMin2 value="0.000000" />
|
||||
<envEffScaleMax2 value="1.000000" />
|
||||
<damageMapScale value="0.600000" />
|
||||
<damageOffsetScale value="1.000000" />
|
||||
<diffuseTint value="0x00000000" />
|
||||
<steerWheelMult value="1.000000" />
|
||||
<HDTextureDist value="5.000000" />
|
||||
<lodDistances content="float_array">
|
||||
100.000000
|
||||
200.000000
|
||||
300.000000
|
||||
400.000000
|
||||
500.000000
|
||||
500.000000
|
||||
</lodDistances>
|
||||
<minSeatHeight value="0.839" />
|
||||
<identicalModelSpawnDistance value="20" />
|
||||
<maxNumOfSameColor value="10" />
|
||||
<defaultBodyHealth value="1000.000000" />
|
||||
<pretendOccupantsScale value="1.000000" />
|
||||
<visibleSpawnDistScale value="1.000000" />
|
||||
<trackerPathWidth value="2.000000" />
|
||||
<weaponForceMult value="1.000000" />
|
||||
<frequency value="100" />
|
||||
<swankness>SWANKNESS_1</swankness>
|
||||
<maxNum value="2" />
|
||||
<flags>FLAG_ATTACH_TRAILER_ON_HIGHWAY FLAG_ATTACH_TRAILER_IN_CITY FLAG_HAS_LIVERY FLAG_EXTRAS_ALL FLAG_EXTRAS_STRONG FLAG_LAW_ENFORCEMENT FLAG_EMERGENCY_SERVICE FLAG_NO_RESPRAY FLAG_DONT_SPAWN_IN_CARGEN FLAG_REPORT_CRIME_IF_STANDING_ON</flags>
|
||||
<type>VEHICLE_TYPE_CAR</type>
|
||||
<plateType>VPT_FRONT_AND_BACK_PLATES</plateType>
|
||||
<dashboardType>VDT_GENTAXI</dashboardType>
|
||||
<vehicleClass>VC_EMERGENCY</vehicleClass>
|
||||
<wheelType>VWT_MUSCLE</wheelType>
|
||||
<trailers>
|
||||
<Item>boattrailer</Item>
|
||||
<Item>trailersmall</Item>
|
||||
<Item>trailersmall2</Item>
|
||||
</trailers>
|
||||
<additionalTrailers />
|
||||
<drivers />
|
||||
<extraIncludes />
|
||||
<doorsWithCollisionWhenClosed />
|
||||
<driveableDoors />
|
||||
<bumpersNeedToCollideWithMap value="false" />
|
||||
<needsRopeTexture value="false" />
|
||||
<requiredExtras />
|
||||
<rewards />
|
||||
<cinematicPartCamera>
|
||||
<Item>WHEEL_FRONT_RIGHT_CAMERA</Item>
|
||||
<Item>WHEEL_FRONT_LEFT_CAMERA</Item>
|
||||
<Item>WHEEL_REAR_RIGHT_CAMERA</Item>
|
||||
<Item>WHEEL_REAR_LEFT_CAMERA</Item>
|
||||
</cinematicPartCamera>
|
||||
<NmBraceOverrideSet />
|
||||
<buoyancySphereOffset x="0.000000" y="0.000000" z="0.000000" />
|
||||
<buoyancySphereSizeScale value="1.000000" />
|
||||
<pOverrideRagdollThreshold type="NULL" />
|
||||
<firstPersonDrivebyData>
|
||||
<Item>STD_POLICE_FRONT_LEFT</Item>
|
||||
<Item>STD_POLICE_FRONT_RIGHT</Item>
|
||||
<Item>STD_POLICE_REAR_LEFT</Item>
|
||||
<Item>STD_POLICE_REAR_RIGHT</Item>
|
||||
</firstPersonDrivebyData>
|
||||
</Item>
|
||||
</InitDatas>
|
||||
</CVehicleModelInfo__InitDataList>
|
||||
@@ -0,0 +1,19 @@
|
||||
--------------------------------------------------
|
||||
---- CINEMATIC CAM FOR FIVEM MADE BY KIMINAZE ----
|
||||
--------------------------------------------------
|
||||
|
||||
**What exactly is the "Cinematic Cam"?**
|
||||
The Cinematic Cam provides the user with an easy to use "additional" camera, that can be moved freely in the world. Additionally it can be attached to any npc/player/vehicle in the game in order to provide something similar to a "Dashcam" or just for fancy screenshots or videos.
|
||||
You can set it on a specific position and angle relative to your character and the camera will move with the entity.
|
||||
|
||||
**Features included:**
|
||||
- complete control using NativeUILua by Frazzle ( [NativeUILua](https://github.com/FrazzIe/NativeUILua) )
|
||||
- toggle the camera on / off
|
||||
- moving and rotating on all axes
|
||||
- using mouse AND controller input for rotation
|
||||
- setting precision rotation
|
||||
- setting field of view and speed of the camera
|
||||
- applying / removing a filter
|
||||
- setting filter intensity
|
||||
- toggle minimap on / off
|
||||
- attach camera to any npc/player/vehicle entity
|
||||
@@ -0,0 +1,9 @@
|
||||
resource_manifest_version "44febabe-d386-4d18-afbe-5e627f4af937"
|
||||
|
||||
dependency 'NativeUI'
|
||||
|
||||
client_scripts {
|
||||
'@NativeUI/NativeUI.lua',
|
||||
'config.lua',
|
||||
'client.lua'
|
||||
}
|
||||
@@ -0,0 +1,624 @@
|
||||
--------------------------------------------------
|
||||
---- CINEMATIC CAM FOR FIVEM MADE BY KIMINAZE ----
|
||||
--------------------------------------------------
|
||||
|
||||
--------------------------------------------------
|
||||
------------------- VARIABLES --------------------
|
||||
--------------------------------------------------
|
||||
|
||||
-- main variables
|
||||
local cam = nil
|
||||
|
||||
local offsetRotX = 0.0
|
||||
local offsetRotY = 0.0
|
||||
local offsetRotZ = 0.0
|
||||
|
||||
local offsetCoords = {}
|
||||
offsetCoords.x = 0.0
|
||||
offsetCoords.y = 0.0
|
||||
offsetCoords.z = 0.0
|
||||
|
||||
local counter = 0
|
||||
local precision = 1.0
|
||||
local currPrecisionIndex
|
||||
local precisions = {}
|
||||
for i = Cfg.minPrecision, Cfg.maxPrecision + 0.01, Cfg.incrPrecision do
|
||||
table.insert(precisions, tostring(i))
|
||||
counter = counter + 1
|
||||
if (tostring(i) == "1.0") then
|
||||
currPrecisionIndex = counter
|
||||
end
|
||||
end
|
||||
|
||||
local speed = 1.0
|
||||
|
||||
local currFilter = 1
|
||||
local currFilterIntensity = 10
|
||||
local filterInten = {}
|
||||
for i=0.1, 2.01, 0.1 do table.insert(filterInten, tostring(i)) end
|
||||
|
||||
local freeFly = false
|
||||
|
||||
local isAttached = false
|
||||
local entity
|
||||
local camCoords
|
||||
|
||||
local pointEntity = false
|
||||
|
||||
-- menu variables
|
||||
local _menuPool = NativeUI.CreatePool()
|
||||
local camMenu
|
||||
|
||||
local itemCamPrecision
|
||||
|
||||
local itemFilter
|
||||
local itemFilterIntensity
|
||||
|
||||
local itemAttachCam
|
||||
|
||||
local itemPointEntity
|
||||
|
||||
-- print error if no menu access was specified
|
||||
if (not(Cfg.useButton or Cfg.useCommand)) then
|
||||
print(Cfg.strings.noAccessError)
|
||||
end
|
||||
|
||||
|
||||
|
||||
--------------------------------------------------
|
||||
---------------------- LOOP ----------------------
|
||||
--------------------------------------------------
|
||||
Citizen.CreateThread(function()
|
||||
local pressedCount = 0
|
||||
|
||||
camMenu = NativeUI.CreateMenu(Cfg.strings.menuTitle, Cfg.strings.menuSubtitle)
|
||||
_menuPool:Add(camMenu)
|
||||
|
||||
while true do
|
||||
Citizen.Wait(1)
|
||||
|
||||
-- process menu
|
||||
if (_menuPool:IsAnyMenuOpen()) then
|
||||
_menuPool:ProcessMenus()
|
||||
end
|
||||
|
||||
-- open / close menu on button press
|
||||
if (Cfg.useButton) then
|
||||
if (IsDisabledControlPressed(1, Cfg.controls.controller.openMenu)) then
|
||||
pressedCount = pressedCount + 1
|
||||
elseif (IsDisabledControlJustReleased(1, Cfg.controls.controller.openMenu)) then
|
||||
pressedCount = 0
|
||||
end
|
||||
if (IsDisabledControlJustReleased(1, Cfg.controls.keyboard.openMenu) or pressedCount >= 60) then
|
||||
if (pressedCount >= 60) then pressedCount = 0 end
|
||||
if (camMenu:Visible()) then
|
||||
camMenu:Visible(false)
|
||||
else
|
||||
GenerateCamMenu()
|
||||
camMenu:Visible(true)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- process cam controls if cam exists
|
||||
if (cam) then
|
||||
ProcessCamControls()
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
Citizen.CreateThread(function()
|
||||
while true do
|
||||
Citizen.Wait(500)
|
||||
|
||||
if (camMenu:Visible() and cam) then
|
||||
local tempEntity = GetEntityInFrontOfCam()
|
||||
local txt = "-"
|
||||
if (DoesEntityExist(tempEntity)) then
|
||||
txt = tostring(GetEntityModel(tempEntity))
|
||||
if (IsEntityAVehicle(tempEntity)) then
|
||||
txt = GetLabelText(GetDisplayNameFromVehicleModel(GetEntityModel(tempEntity)))
|
||||
end
|
||||
end
|
||||
itemAttachCam:RightLabel(txt)
|
||||
|
||||
if (isAttached and not DoesEntityExist(entity)) then
|
||||
isAttached = false
|
||||
|
||||
ClearFocus()
|
||||
|
||||
StopCamPointing(cam)
|
||||
end
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
|
||||
|
||||
--------------------------------------------------
|
||||
---------------------- MENU ----------------------
|
||||
--------------------------------------------------
|
||||
function GenerateCamMenu()
|
||||
_menuPool:Remove()
|
||||
_menuPool = NativeUI.CreatePool()
|
||||
collectgarbage()
|
||||
|
||||
camMenu = NativeUI.CreateMenu(Cfg.strings.menuTitle, Cfg.strings.menuSubtitle)
|
||||
_menuPool:Add(camMenu)
|
||||
|
||||
-- add additional control help
|
||||
--camMenu:AddInstructionButton({GetControlInstructionalButton(1, 38, true), ""})
|
||||
--camMenu:AddInstructionButton({GetControlInstructionalButton(1, 44, true), Cfg.strings.ctrlHelpRoll})
|
||||
--camMenu:AddInstructionButton({GetControlInstructionalButton(1, 36, true), ""})
|
||||
--camMenu:AddInstructionButton({GetControlInstructionalButton(1, 21, true), ""})
|
||||
--camMenu:AddInstructionButton({GetControlInstructionalButton(1, 30, true), ""})
|
||||
--camMenu:AddInstructionButton({GetControlInstructionalButton(1, 31, true), Cfg.strings.ctrlHelpMove})
|
||||
--camMenu:AddInstructionButton({GetControlInstructionalButton(1, 2, true), ""})
|
||||
--camMenu:AddInstructionButton({GetControlInstructionalButton(1, 1, true), Cfg.strings.ctrlHelpRotate})
|
||||
|
||||
local itemToggleCam = NativeUI.CreateCheckboxItem(Cfg.strings.toggleCam, DoesCamExist(cam), Cfg.strings.toggleCamDesc)
|
||||
camMenu:AddItem(itemToggleCam)
|
||||
|
||||
itemCamPrecision = NativeUI.CreateListItem(Cfg.strings.precision, precisions, currPrecisionIndex, Cfg.strings.precisionDesc)
|
||||
camMenu:AddItem(itemCamPrecision)
|
||||
|
||||
local submenuFilter = _menuPool:AddSubMenu(camMenu, Cfg.strings.filter, Cfg.strings.filterDesc)
|
||||
camMenu.Items[#camMenu.Items]:SetLeftBadge(15)
|
||||
itemFilter = NativeUI.CreateListItem(Cfg.strings.filter, Cfg.filterList, currFilter, Cfg.strings.filterDesc)
|
||||
submenuFilter:AddItem(itemFilter)
|
||||
itemFilterIntensity = NativeUI.CreateListItem(Cfg.strings.filterInten, filterInten, currFilterIntensity, Cfg.strings.filterIntenDesc)
|
||||
submenuFilter:AddItem(itemFilterIntensity)
|
||||
local itemDelFilter = NativeUI.CreateItem(Cfg.strings.delFilter, Cfg.strings.delFilterDesc)
|
||||
submenuFilter:AddItem(itemDelFilter)
|
||||
|
||||
local itemShowMap = NativeUI.CreateCheckboxItem(Cfg.strings.showMap, not IsRadarHidden(), Cfg.strings.showMapDesc)
|
||||
camMenu:AddItem(itemShowMap)
|
||||
|
||||
local itemToggleFreeFlyMode = NativeUI.CreateCheckboxItem(Cfg.strings.freeFly, freeFly, Cfg.strings.freeFlyDesc)
|
||||
camMenu:AddItem(itemToggleFreeFlyMode)
|
||||
|
||||
itemAttachCam = NativeUI.CreateItem(Cfg.strings.attachCam, Cfg.strings.attachCamDesc)
|
||||
camMenu:AddItem(itemAttachCam)
|
||||
|
||||
--itemPointEntity = NativeUI.CreateCheckboxItem(Cfg.strings.pointEntity, pointEntity, Cfg.strings.pointEntityDesc)
|
||||
--camMenu:AddItem(itemPointEntity)
|
||||
|
||||
|
||||
itemToggleCam.CheckboxEvent = function(menu, item, checked)
|
||||
ToggleCam(checked, GetGameplayCamFov())
|
||||
end
|
||||
|
||||
itemCamPrecision.OnListChanged = function(menu, item, newindex)
|
||||
ChangePrecision(newindex)
|
||||
end
|
||||
|
||||
itemShowMap.CheckboxEvent = function(menu, item, checked)
|
||||
ToggleUI(checked)
|
||||
end
|
||||
|
||||
itemToggleFreeFlyMode.CheckboxEvent = function(menu, item, checked)
|
||||
ToggleFreeFlyMode(checked)
|
||||
end
|
||||
|
||||
camMenu.OnItemSelect = function(menu, item, index)
|
||||
if (item == itemAttachCam) then
|
||||
ToggleAttachMode()
|
||||
end
|
||||
end
|
||||
|
||||
--[[itemPointEntity.CheckboxEvent = function(menu, item, checked)
|
||||
TogglePointing(checked)
|
||||
end]]
|
||||
|
||||
itemFilter.OnListChanged = function(menu, item, newindex)
|
||||
ApplyFilter(newindex)
|
||||
end
|
||||
|
||||
itemFilterIntensity.OnListChanged = function(menu, item, newindex)
|
||||
ChangeFilterIntensity(newindex)
|
||||
end
|
||||
|
||||
submenuFilter.OnItemSelect = function(menu, item, index)
|
||||
if (item == itemDelFilter) then
|
||||
ResetFilter()
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
_menuPool:ControlDisablingEnabled(false)
|
||||
_menuPool:MouseControlsEnabled(false)
|
||||
|
||||
_menuPool:RefreshIndex()
|
||||
end
|
||||
|
||||
|
||||
|
||||
--------------------------------------------------
|
||||
------------------- FUNCTIONS --------------------
|
||||
--------------------------------------------------
|
||||
|
||||
-- initialize camera
|
||||
function StartFreeCam(fov)
|
||||
ClearFocus()
|
||||
|
||||
local playerPed = PlayerPedId()
|
||||
|
||||
cam = CreateCamWithParams("DEFAULT_SCRIPTED_CAMERA", GetEntityCoords(playerPed), 0, 0, 0, fov * 1.0)
|
||||
|
||||
SetCamActive(cam, true)
|
||||
RenderScriptCams(true, false, 0, true, false)
|
||||
|
||||
SetCamAffectsAiming(cam, false)
|
||||
|
||||
if (isAttached and DoesEntityExist(entity)) then
|
||||
offsetCoords = GetOffsetFromEntityGivenWorldCoords(entity, GetCamCoord(cam))
|
||||
|
||||
AttachCamToEntity(cam, entity, offsetCoords.x, offsetCoords.y, offsetCoords.z, true)
|
||||
end
|
||||
end
|
||||
|
||||
-- destroy camera
|
||||
function EndFreeCam()
|
||||
ClearFocus()
|
||||
|
||||
RenderScriptCams(false, false, 0, true, false)
|
||||
DestroyCam(cam, false)
|
||||
|
||||
offsetRotX = 0.0
|
||||
offsetRotY = 0.0
|
||||
offsetRotZ = 0.0
|
||||
|
||||
isAttached = false
|
||||
|
||||
speed = 1.0
|
||||
precision = 1.0
|
||||
currFov = GetGameplayCamFov()
|
||||
|
||||
cam = nil
|
||||
end
|
||||
|
||||
-- process camera controls
|
||||
function ProcessCamControls()
|
||||
local playerPed = PlayerPedId()
|
||||
|
||||
-- disable 1st person as the 1st person camera can cause some glitches
|
||||
DisableFirstPersonCamThisFrame()
|
||||
-- block weapon wheel (reason: scrolling)
|
||||
BlockWeaponWheelThisFrame()
|
||||
-- disable character/vehicle controls
|
||||
for k, v in pairs(Cfg.disabledControls) do
|
||||
DisableControlAction(0, v, true)
|
||||
end
|
||||
|
||||
if (isAttached) then
|
||||
-- calculate new position
|
||||
offsetCoords = ProcessNewPosition(offsetCoords.x, offsetCoords.y, offsetCoords.z)
|
||||
|
||||
-- focus entity
|
||||
SetFocusEntity(entity)
|
||||
|
||||
-- set coords
|
||||
AttachCamToEntity(cam, entity, offsetCoords.x, offsetCoords.y, offsetCoords.z, true)
|
||||
|
||||
-- reset coords of cam if too far from entity
|
||||
if (Vdist(0.0, 0.0, 0.0, offsetCoords.x, offsetCoords.y, offsetCoords.z) > Cfg.maxDistance) then
|
||||
AttachCamToEntity(cam, entity, offsetCoords.x, offsetCoords.y, offsetCoords.z, true)
|
||||
end
|
||||
|
||||
-- set rotation
|
||||
local entityRot = GetEntityRotation(entity, 2)
|
||||
SetCamRot(cam, entityRot.x + offsetRotX, entityRot.y + offsetRotY, entityRot.z + offsetRotZ, 2)
|
||||
else
|
||||
local camCoords = GetCamCoord(cam)
|
||||
|
||||
-- calculate new position
|
||||
local newPos = ProcessNewPosition(camCoords.x, camCoords.y, camCoords.z)
|
||||
|
||||
-- focus cam area
|
||||
SetFocusArea(newPos.x, newPos.y, newPos.z, 0.0, 0.0, 0.0)
|
||||
|
||||
-- set coords of cam
|
||||
SetCamCoord(cam, newPos.x, newPos.y, newPos.z)
|
||||
|
||||
-- set rotation
|
||||
SetCamRot(cam, offsetRotX, offsetRotY, offsetRotZ, 2)
|
||||
end
|
||||
end
|
||||
|
||||
function ProcessNewPosition(x, y, z)
|
||||
local _x = x
|
||||
local _y = y
|
||||
local _z = z
|
||||
|
||||
--gegenkathete = z
|
||||
--ankathete = y
|
||||
--hypotenuse = 1
|
||||
--alpha = GetCamRot(cam).x
|
||||
|
||||
-- keyboard
|
||||
if (IsInputDisabled(0)) then
|
||||
if (IsDisabledControlPressed(1, Cfg.controls.keyboard.forwards)) then
|
||||
local multX = Sin(offsetRotZ)
|
||||
local multY = Cos(offsetRotZ)
|
||||
local multZ = Sin(offsetRotX)
|
||||
|
||||
_x = _x - (0.1 * speed * multX)
|
||||
_y = _y + (0.1 * speed * multY)
|
||||
if (freeFly) then
|
||||
_z = _z + (0.1 * speed * multZ)
|
||||
end
|
||||
end
|
||||
if (IsDisabledControlPressed(1, Cfg.controls.keyboard.backwards)) then
|
||||
local multX = Sin(offsetRotZ)
|
||||
local multY = Cos(offsetRotZ)
|
||||
local multZ = Sin(offsetRotX)
|
||||
|
||||
_x = _x + (0.1 * speed * multX)
|
||||
_y = _y - (0.1 * speed * multY)
|
||||
if (freeFly) then
|
||||
_z = _z - (0.1 * speed * multZ)
|
||||
end
|
||||
end
|
||||
if (IsDisabledControlPressed(1, Cfg.controls.keyboard.left)) then
|
||||
local multX = Sin(offsetRotZ + 90.0)
|
||||
local multY = Cos(offsetRotZ + 90.0)
|
||||
local multZ = Sin(offsetRotY)
|
||||
|
||||
_x = _x - (0.1 * speed * multX)
|
||||
_y = _y + (0.1 * speed * multY)
|
||||
if (freeFly) then
|
||||
_z = _z + (0.1 * speed * multZ)
|
||||
end
|
||||
end
|
||||
if (IsDisabledControlPressed(1, Cfg.controls.keyboard.right)) then
|
||||
local multX = Sin(offsetRotZ + 90.0)
|
||||
local multY = Cos(offsetRotZ + 90.0)
|
||||
local multZ = Sin(offsetRotY)
|
||||
|
||||
_x = _x + (0.1 * speed * multX)
|
||||
_y = _y - (0.1 * speed * multY)
|
||||
if (freeFly) then
|
||||
_z = _z - (0.1 * speed * multZ)
|
||||
end
|
||||
end
|
||||
|
||||
if (IsDisabledControlPressed(1, Cfg.controls.keyboard.up)) then
|
||||
_z = _z + (0.1 * speed)
|
||||
end
|
||||
if (IsDisabledControlPressed(1, Cfg.controls.keyboard.down)) then
|
||||
_z = _z - (0.1 * speed)
|
||||
end
|
||||
|
||||
|
||||
if (IsDisabledControlPressed(1, Cfg.controls.keyboard.hold)) then
|
||||
-- hotkeys for speed
|
||||
if (IsDisabledControlPressed(1, Cfg.controls.keyboard.speedUp)) then
|
||||
if ((speed + 0.1) < Cfg.maxSpeed) then
|
||||
speed = speed + 0.1
|
||||
else
|
||||
speed = Cfg.maxSpeed
|
||||
end
|
||||
elseif (IsDisabledControlPressed(1, Cfg.controls.keyboard.speedDown)) then
|
||||
if ((speed - 0.1) > Cfg.minSpeed) then
|
||||
speed = speed - 0.1
|
||||
else
|
||||
speed = Cfg.minSpeed
|
||||
end
|
||||
end
|
||||
else
|
||||
-- hotkeys for FoV
|
||||
if (IsDisabledControlPressed(1, Cfg.controls.keyboard.zoomOut)) then
|
||||
ChangeFov(1.0)
|
||||
elseif (IsDisabledControlPressed(1, Cfg.controls.keyboard.zoomIn)) then
|
||||
ChangeFov(-1.0)
|
||||
end
|
||||
end
|
||||
|
||||
-- rotation
|
||||
offsetRotX = offsetRotX - (GetDisabledControlNormal(1, 2) * precision * 8.0)
|
||||
offsetRotZ = offsetRotZ - (GetDisabledControlNormal(1, 1) * precision * 8.0)
|
||||
if (IsDisabledControlPressed(1, Cfg.controls.keyboard.rollLeft)) then
|
||||
offsetRotY = offsetRotY - precision
|
||||
end
|
||||
if (IsDisabledControlPressed(1, Cfg.controls.keyboard.rollRight)) then
|
||||
offsetRotY = offsetRotY + precision
|
||||
end
|
||||
|
||||
-- controller
|
||||
else
|
||||
local multX = Sin(offsetRotZ)
|
||||
local multY = Cos(offsetRotZ)
|
||||
local multZ = Sin(offsetRotX)
|
||||
_x = _x - (0.1 * speed * multX * GetDisabledControlNormal(1, 32))
|
||||
_y = _y + (0.1 * speed * multY * GetDisabledControlNormal(1, 32))
|
||||
if (freeFly) then
|
||||
_z = _z + (0.1 * speed * multZ * GetDisabledControlNormal(1, 32))
|
||||
end
|
||||
|
||||
_x = _x + (0.1 * speed * multX * GetDisabledControlNormal(1, 33))
|
||||
_y = _y - (0.1 * speed * multY * GetDisabledControlNormal(1, 33))
|
||||
if (freeFly) then
|
||||
_z = _z - (0.1 * speed * multZ * GetDisabledControlNormal(1, 33))
|
||||
end
|
||||
|
||||
multX = Sin(offsetRotZ + 90.0)
|
||||
multY = Cos(offsetRotZ + 90.0)
|
||||
local multZ = Sin(offsetRotY)
|
||||
_x = _x - (0.1 * speed * multX * GetDisabledControlNormal(1, 34))
|
||||
_y = _y + (0.1 * speed * multY * GetDisabledControlNormal(1, 34))
|
||||
if (freeFly) then
|
||||
_z = _z + (0.1 * speed * multZ * GetDisabledControlNormal(1, 34))
|
||||
end
|
||||
|
||||
_x = _x + (0.1 * speed * multX * GetDisabledControlNormal(1, 35))
|
||||
_y = _y - (0.1 * speed * multY * GetDisabledControlNormal(1, 35))
|
||||
if (freeFly) then
|
||||
_z = _z - (0.1 * speed * multZ * GetDisabledControlNormal(1, 35))
|
||||
end
|
||||
|
||||
-- FoV, Speed, Up/Down Movement
|
||||
if (GetDisabledControlNormal(1, 228) ~= 0.0) then
|
||||
if (IsDisabledControlPressed(1, Cfg.controls.controller.holdFov)) then
|
||||
ChangeFov(GetDisabledControlNormal(1, 228))
|
||||
elseif (IsDisabledControlPressed(1, Cfg.controls.controller.holdSpeed)) then
|
||||
local newSpeed = speed - (0.1 * GetDisabledControlNormal(1, 228))
|
||||
if (newSpeed > Cfg.minSpeed) then
|
||||
speed = newSpeed
|
||||
else
|
||||
speed = Cfg.minSpeed
|
||||
end
|
||||
else
|
||||
_z = _z - (0.1 * speed * GetDisabledControlNormal(1, 228))
|
||||
end
|
||||
end
|
||||
if (GetDisabledControlNormal(1, 229) ~= 0.0) then
|
||||
if (IsDisabledControlPressed(1, Cfg.controls.controller.holdFov)) then
|
||||
ChangeFov(- GetDisabledControlNormal(1, 229))
|
||||
elseif (IsDisabledControlPressed(1, Cfg.controls.controller.holdSpeed)) then
|
||||
local newSpeed = speed + (0.1 * GetDisabledControlNormal(1, 229))
|
||||
if (newSpeed < Cfg.maxSpeed) then
|
||||
speed = newSpeed
|
||||
else
|
||||
speed = Cfg.maxSpeed
|
||||
end
|
||||
else
|
||||
_z = _z + (0.1 * speed * GetDisabledControlNormal(1, 229))
|
||||
end
|
||||
end
|
||||
|
||||
-- rotation
|
||||
offsetRotX = offsetRotX - (GetDisabledControlNormal(1, 2) * precision)
|
||||
offsetRotZ = offsetRotZ - (GetDisabledControlNormal(1, 1) * precision)
|
||||
if (IsDisabledControlPressed(1, Cfg.controls.controller.rollLeft)) then
|
||||
offsetRotY = offsetRotY - precision
|
||||
end
|
||||
if (IsDisabledControlPressed(1, Cfg.controls.controller.rollRight)) then
|
||||
offsetRotY = offsetRotY + precision
|
||||
end
|
||||
end
|
||||
|
||||
if (offsetRotX > 90.0) then offsetRotX = 90.0 elseif (offsetRotX < -90.0) then offsetRotX = -90.0 end
|
||||
if (offsetRotY > 90.0) then offsetRotY = 90.0 elseif (offsetRotY < -90.0) then offsetRotY = -90.0 end
|
||||
if (offsetRotZ > 360.0) then offsetRotZ = offsetRotZ - 360.0 elseif (offsetRotZ < -360.0) then offsetRotZ = offsetRotZ + 360.0 end
|
||||
|
||||
return {x = _x, y = _y, z = _z}
|
||||
end
|
||||
|
||||
function ToggleCam(flag, fov)
|
||||
if (flag) then
|
||||
StartFreeCam(fov)
|
||||
_menuPool:RefreshIndex()
|
||||
else
|
||||
EndFreeCam()
|
||||
_menuPool:RefreshIndex()
|
||||
end
|
||||
end
|
||||
|
||||
function ChangeFov(changeFov)
|
||||
if (DoesCamExist(cam)) then
|
||||
local currFov = GetCamFov(cam)
|
||||
local newFov = currFov + changeFov
|
||||
|
||||
if ((newFov >= Cfg.minFov) and (newFov <= Cfg.maxFov)) then
|
||||
SetCamFov(cam, newFov)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function ChangePrecision(newindex)
|
||||
precision = itemCamPrecision.Items[newindex]
|
||||
currPrecisionIndex = newindex
|
||||
end
|
||||
|
||||
function ToggleUI(flag)
|
||||
DisplayRadar(flag)
|
||||
end
|
||||
|
||||
function ToggleFreeFlyMode(flag)
|
||||
freeFly = flag
|
||||
end
|
||||
|
||||
function GetEntityInFrontOfCam()
|
||||
local camCoords = GetCamCoord(cam)
|
||||
local offset = {x = camCoords.x - Sin(offsetRotZ) * 100.0, y = camCoords.y + Cos(offsetRotZ) * 100.0, z = camCoords.z + Sin(offsetRotX) * 100.0}
|
||||
|
||||
local rayHandle = StartShapeTestRay(camCoords.x, camCoords.y, camCoords.z, offset.x, offset.y, offset.z, 10, 0, 0)
|
||||
local a, b, c, d, entity = GetShapeTestResult(rayHandle)
|
||||
return entity
|
||||
end
|
||||
|
||||
function ToggleAttachMode()
|
||||
if (not isAttached) then
|
||||
entity = GetEntityInFrontOfCam()
|
||||
|
||||
if (DoesEntityExist(entity)) then
|
||||
offsetCoords = GetOffsetFromEntityGivenWorldCoords(entity, GetCamCoord(cam))
|
||||
|
||||
Citizen.Wait(1)
|
||||
local camCoords = GetCamCoord(cam)
|
||||
AttachCamToEntity(cam, entity, GetOffsetFromEntityInWorldCoords(entity, camCoords.x, camCoords.y, camCoords.z), true)
|
||||
|
||||
isAttached = true
|
||||
end
|
||||
else
|
||||
ClearFocus()
|
||||
|
||||
DetachCam(cam)
|
||||
|
||||
isAttached = false
|
||||
end
|
||||
end
|
||||
|
||||
function TogglePointing(flag)
|
||||
if (flag and isAttached) then
|
||||
pointEntity = true
|
||||
PointCamAtEntity(cam, entity, 0.0, 0.0, 0.0, 1)
|
||||
else
|
||||
pointEntity = false
|
||||
StopCamPointing(cam)
|
||||
end
|
||||
end
|
||||
|
||||
function ApplyFilter(filterIndex)
|
||||
SetTimecycleModifier(Cfg.filterList[filterIndex])
|
||||
currFilter = filterIndex
|
||||
end
|
||||
|
||||
function ChangeFilterIntensity(intensityIndex)
|
||||
SetTimecycleModifier(Cfg.filterList[currFilter])
|
||||
SetTimecycleModifierStrength(tonumber(filterInten[intensityIndex]))
|
||||
currFilterIntensity = intensityIndex
|
||||
end
|
||||
|
||||
function ResetFilter()
|
||||
ClearTimecycleModifier()
|
||||
itemFilter._Index = 1
|
||||
currFilter = 1
|
||||
itemFilterIntensity._Index = 10
|
||||
currFilterIntensity = 10
|
||||
end
|
||||
|
||||
|
||||
|
||||
--------------------------------------------------
|
||||
-------------------- COMMANDS --------------------
|
||||
--------------------------------------------------
|
||||
|
||||
-- register command if specified in config
|
||||
if (Cfg.useCommand) then
|
||||
RegisterCommand(Cfg.command, function(source, args, raw)
|
||||
if (not camMenu:Visible()) then
|
||||
GenerateCamMenu()
|
||||
camMenu:Visible(true)
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
--void POINT_CAM_AT_ENTITY(Cam cam, Entity entity, float p2, float p3, float p4, BOOL p5);
|
||||
--void POINT_CAM_AT_COORD(Cam cam, float x, float y, float z);
|
||||
--void GET_CAM_MATRIX(Cam camera, Vector3* rightVector, Vector3* forwardVector, Vector3* upVector, Vector3* position);
|
||||
|
||||
--gegenkathete = x
|
||||
--ankathete = y
|
||||
--hypotenuse = 1
|
||||
--alpha = GetCamRot(cam).z
|
||||
@@ -0,0 +1,872 @@
|
||||
--------------------------------------------------
|
||||
---- CINEMATIC CAM FOR FIVEM MADE BY KIMINAZE ----
|
||||
--------------------------------------------------
|
||||
|
||||
Cfg = {}
|
||||
|
||||
-- specify, if menu should be accessible via button press
|
||||
Cfg.useButton = false
|
||||
|
||||
-- specify, if menu should be accessible via chat command
|
||||
Cfg.useCommand = true
|
||||
-- specify chat command string
|
||||
Cfg.command = "cinematic-cam"
|
||||
|
||||
-- Show an extra option to have a completely free to move camera
|
||||
Cfg.detachOption = true
|
||||
|
||||
-- value in meters
|
||||
-- default: 5.0
|
||||
-- used to prevent e.g. Meta-Gaming and Bug-Abuse (looking through walls etc.)
|
||||
-- with 10,000 you can basically fly above the whole map from the middle but keep in mind, that LoD-states (Level of Detail) won't change as your character stays at its position
|
||||
-- this is unused when the camera is detached
|
||||
Cfg.maxDistance = 5000.0
|
||||
|
||||
-- min and max speed settings for movement in m/s including increments (should always be above 0.0)
|
||||
Cfg.minSpeed = 0.1
|
||||
Cfg.maxSpeed = 10.0
|
||||
|
||||
-- min and max precision settings for rotation including increments (should always be above 0.0)
|
||||
Cfg.minPrecision = 0.1
|
||||
Cfg.incrPrecision = 0.1
|
||||
Cfg.maxPrecision = 2.0
|
||||
|
||||
-- min and max FoV settings (should always be in between 1.0f and 130.0f!)
|
||||
Cfg.minFov = 1.0
|
||||
Cfg.maxFov = 130.0
|
||||
|
||||
-- all strings
|
||||
Cfg.strings = {
|
||||
noAccessError = "[ERROR] FreeCam: At least one of the following values must be true! Cfg.useButton, Cfg.useCommand",
|
||||
|
||||
menuTitle = "Cinematic Cam",
|
||||
menuSubtitle = "Control the Cinematic Camera",
|
||||
|
||||
toggleCam = "Camera active",
|
||||
toggleCamDesc = "Toggle camera on/off",
|
||||
|
||||
precision = "Camera Precision",
|
||||
precisionDesc = "Change camera precision movement",
|
||||
|
||||
filter = "Filter",
|
||||
filterDesc = "Change camera Filter",
|
||||
|
||||
filterInten = "Filter Intensity",
|
||||
filterIntenDesc = "Change camera Filter Intensity",
|
||||
|
||||
delFilter = "Reset Filter",
|
||||
delFilterDesc = "Remove filter and reset values",
|
||||
|
||||
showMap = "Show Minimap",
|
||||
showMapDesc = "Toggle minimap on/off",
|
||||
|
||||
freeFly = "Toggle Free Fly Mode",
|
||||
freeFlyDesc = "Switch to Free Fly or back to Drone Mode",
|
||||
|
||||
attachCam = "Attach camera to: ",
|
||||
attachCamDesc = "Attach the camera to an entity in front of it",
|
||||
|
||||
pointEntity = "Point camera at entity",
|
||||
pointEntityDesc = "Toggle pointing at selected entity",
|
||||
|
||||
ctrlHelpRoll = "Roll Left/Right",
|
||||
ctrlHelpMove = "Movement",
|
||||
ctrlHelpRotate = "Rotate"
|
||||
}
|
||||
|
||||
Cfg.controls = {
|
||||
keyboard = {
|
||||
openMenu = 178, -- Delete
|
||||
hold = 21, -- Shift
|
||||
speedUp = 15, -- Mouse wheel up -- with hold
|
||||
speedDown = 14, -- Mouse wheel down -- with hold
|
||||
|
||||
zoomOut = 14, -- Mouse wheel down
|
||||
zoomIn = 15, -- Mouse wheel up
|
||||
|
||||
forwards = 32, -- W
|
||||
backwards = 33, -- S
|
||||
left = 34, -- A
|
||||
right = 35, -- D
|
||||
up = 22, -- Space
|
||||
down = 36, -- Ctrl
|
||||
|
||||
rollLeft = 44, -- Q
|
||||
rollRight = 38, -- E
|
||||
},
|
||||
controller = {
|
||||
openMenu = 244, -- Select -- hold for ~1 second
|
||||
|
||||
holdSpeed = 80, -- O / B
|
||||
holdFov = 21, -- X / A
|
||||
up = 172, -- D-pad up
|
||||
down = 173, -- D-pad down
|
||||
|
||||
rollLeft = 37, -- L1 / LB
|
||||
rollRight = 44, -- R1 / RB
|
||||
}
|
||||
}
|
||||
|
||||
-- disables character/vehicle controls when using camera movements
|
||||
Cfg.disabledControls = {
|
||||
30, -- A and D (Character Movement)
|
||||
31, -- W and S (Character Movement)
|
||||
21, -- LEFT SHIFT
|
||||
36, -- LEFT CTRL
|
||||
22, -- SPACE
|
||||
44, -- Q
|
||||
38, -- E
|
||||
71, -- W (Vehicle Movement)
|
||||
72, -- S (Vehicle Movement)
|
||||
59, -- A and D (Vehicle Movement)
|
||||
60, -- LEFT SHIFT and LEFT CTRL (Vehicle Movement)
|
||||
85, -- Q (Radio Wheel)
|
||||
86, -- E (Vehicle Horn)
|
||||
15, -- Mouse wheel up
|
||||
14, -- Mouse wheel down
|
||||
37, -- Controller R1 (PS) / RT (XBOX)
|
||||
80, -- Controller O (PS) / B (XBOX)
|
||||
228, --
|
||||
229, --
|
||||
172, --
|
||||
173, --
|
||||
37, --
|
||||
44, --
|
||||
178, --
|
||||
244, --
|
||||
}
|
||||
|
||||
-- list of available filters ( https://pastebin.com/kVPwMemE )
|
||||
Cfg.filterList = {
|
||||
"None",
|
||||
"AmbientPUSH",
|
||||
"AP1_01_B_IntRefRange",
|
||||
"AP1_01_C_NoFog",
|
||||
"Bank_HLWD",
|
||||
"Barry1_Stoned",
|
||||
"BarryFadeOut",
|
||||
"baseTONEMAPPING",
|
||||
"BeastIntro01",
|
||||
"BeastIntro02",
|
||||
"BeastLaunch01",
|
||||
"BeastLaunch02",
|
||||
"BikerFilter",
|
||||
"BikerForm01",
|
||||
"BikerFormFlash",
|
||||
"Bikers",
|
||||
"BikersSPLASH",
|
||||
"blackNwhite",
|
||||
"BlackOut",
|
||||
"BleepYellow01",
|
||||
"BleepYellow02",
|
||||
"Bloom",
|
||||
"BloomLight",
|
||||
"BloomMid",
|
||||
"buggy_shack",
|
||||
"buildingTOP",
|
||||
"BulletTimeDark",
|
||||
"BulletTimeLight",
|
||||
"CAMERA_BW",
|
||||
"CAMERA_secuirity",
|
||||
"CAMERA_secuirity_FUZZ",
|
||||
"canyon_mission",
|
||||
"carMOD_underpass",
|
||||
"carpark",
|
||||
"carpark_dt1_02",
|
||||
"carpark_dt1_03",
|
||||
"Carpark_MP_exit",
|
||||
"cashdepot",
|
||||
"cashdepotEMERGENCY",
|
||||
"cBank_back",
|
||||
"cBank_front",
|
||||
"ch2_tunnel_whitelight",
|
||||
"CH3_06_water",
|
||||
"CHOP",
|
||||
"cinema",
|
||||
"cinema_001",
|
||||
"cops",
|
||||
"CopsSPLASH",
|
||||
"crane_cam",
|
||||
"crane_cam_cinematic",
|
||||
"CrossLine01",
|
||||
"CrossLine02",
|
||||
"CS1_railwayB_tunnel",
|
||||
"CS3_rail_tunnel",
|
||||
"CUSTOM_streetlight",
|
||||
"damage",
|
||||
"DeadlineNeon01",
|
||||
"default",
|
||||
"DefaultColorCode",
|
||||
"DONT_overide_sunpos",
|
||||
"Dont_tazeme_bro",
|
||||
"dont_tazeme_bro_b",
|
||||
"downtown_FIB_cascades_opt",
|
||||
"DrivingFocusDark",
|
||||
"DrivingFocusLight",
|
||||
"DRUG_2_drive",
|
||||
"Drug_deadman",
|
||||
"Drug_deadman_blend",
|
||||
"drug_drive_blend01",
|
||||
"drug_drive_blend02",
|
||||
"drug_flying_01",
|
||||
"drug_flying_02",
|
||||
"drug_flying_base",
|
||||
"DRUG_gas_huffin",
|
||||
"drug_wobbly",
|
||||
"Drunk",
|
||||
"dying",
|
||||
"eatra_bouncelight_beach",
|
||||
"epsilion",
|
||||
"exile1_exit",
|
||||
"exile1_plane",
|
||||
"ExplosionJosh",
|
||||
"EXT_FULLAmbientmult_art",
|
||||
"ext_int_extlight_large",
|
||||
"EXTRA_bouncelight",
|
||||
"eyeINtheSKY",
|
||||
"Facebook_NEW",
|
||||
"facebook_serveroom",
|
||||
"FIB_5",
|
||||
"FIB_6",
|
||||
"FIB_A",
|
||||
"FIB_B",
|
||||
"FIB_interview",
|
||||
"FIB_interview_optimise",
|
||||
"FinaleBank",
|
||||
"FinaleBankexit",
|
||||
"FinaleBankMid",
|
||||
"fireDEPT",
|
||||
"FORdoron_delete",
|
||||
"Forest",
|
||||
"fp_vig_black",
|
||||
"fp_vig_blue",
|
||||
"fp_vig_brown",
|
||||
"fp_vig_gray",
|
||||
"fp_vig_green",
|
||||
"fp_vig_red",
|
||||
"FrankilinsHOUSEhills",
|
||||
"frankilnsAUNTS_new",
|
||||
"frankilnsAUNTS_SUNdir",
|
||||
"FRANKLIN",
|
||||
"FranklinColorCode",
|
||||
"FranklinColorCodeBasic",
|
||||
"FranklinColorCodeBright",
|
||||
"FullAmbientmult_interior",
|
||||
"gallery_refmod",
|
||||
"garage",
|
||||
"gen_bank",
|
||||
"glasses_black",
|
||||
"Glasses_BlackOut",
|
||||
"glasses_blue",
|
||||
"glasses_brown",
|
||||
"glasses_Darkblue",
|
||||
"glasses_green",
|
||||
"glasses_orange",
|
||||
"glasses_pink",
|
||||
"glasses_purple",
|
||||
"glasses_red",
|
||||
"glasses_Scuba",
|
||||
"glasses_VISOR",
|
||||
"glasses_yellow",
|
||||
"gorge_reflection_gpu",
|
||||
"gorge_reflectionoffset",
|
||||
"gorge_reflectionoffset2",
|
||||
"graveyard_shootout",
|
||||
"gunclub",
|
||||
"gunclubrange",
|
||||
"gunshop",
|
||||
"gunstore",
|
||||
"half_direct",
|
||||
"hangar_lightsmod",
|
||||
"Hanger_INTmods",
|
||||
"heathaze",
|
||||
"heist_boat",
|
||||
"heist_boat_engineRoom",
|
||||
"heist_boat_norain",
|
||||
"helicamfirst",
|
||||
"heliGunCam",
|
||||
"Hicksbar",
|
||||
"HicksbarNEW",
|
||||
"hillstunnel",
|
||||
"Hint_cam",
|
||||
"hitped",
|
||||
"hud_def_blur",
|
||||
"hud_def_blur_switch",
|
||||
"hud_def_colorgrade",
|
||||
"hud_def_desat_cold",
|
||||
"hud_def_desat_cold_kill",
|
||||
"hud_def_desat_Franklin",
|
||||
"hud_def_desat_Michael",
|
||||
"hud_def_desat_Neutral",
|
||||
"hud_def_desat_switch",
|
||||
"hud_def_desat_Trevor",
|
||||
"hud_def_desatcrunch",
|
||||
"hud_def_flash",
|
||||
"hud_def_focus",
|
||||
"hud_def_Franklin",
|
||||
"hud_def_lensdistortion",
|
||||
"hud_def_lensdistortion_subtle",
|
||||
"hud_def_Michael",
|
||||
"hud_def_Trevor",
|
||||
"id1_11_tunnel",
|
||||
"ImpExp_Interior_01",
|
||||
"impexp_interior_01_lift",
|
||||
"IMpExt_Interior_02",
|
||||
"IMpExt_Interior_02_stair_cage",
|
||||
"InchOrange01",
|
||||
"InchOrange02",
|
||||
"InchPickup01",
|
||||
"InchPickup02",
|
||||
"InchPurple01",
|
||||
"InchPurple02",
|
||||
"int_amb_mult_large",
|
||||
"int_Barber1",
|
||||
"int_carmod_small",
|
||||
"int_carrier_control",
|
||||
"int_carrier_control_2",
|
||||
"int_carrier_hanger",
|
||||
"int_carrier_rear",
|
||||
"int_carrier_stair",
|
||||
"int_carshowroom",
|
||||
"int_chopshop",
|
||||
"int_clean_extlight_large",
|
||||
"int_clean_extlight_none",
|
||||
"int_clean_extlight_small",
|
||||
"int_ClothesHi",
|
||||
"int_clotheslow_large",
|
||||
"int_cluckinfactory_none",
|
||||
"int_cluckinfactory_small",
|
||||
"int_ControlTower_none",
|
||||
"int_ControlTower_small",
|
||||
"int_dockcontrol_small",
|
||||
"int_extlght_sm_cntrst",
|
||||
"int_extlight_large",
|
||||
"int_extlight_large_fog",
|
||||
"int_extlight_none",
|
||||
"int_extlight_none_dark",
|
||||
"int_extlight_none_dark_fog",
|
||||
"int_extlight_none_fog",
|
||||
"int_extlight_small",
|
||||
"int_extlight_small_clipped",
|
||||
"int_extlight_small_fog",
|
||||
"int_Farmhouse_none",
|
||||
"int_Farmhouse_small",
|
||||
"int_FranklinAunt_small",
|
||||
"INT_FullAmbientmult",
|
||||
"INT_FULLAmbientmult_art",
|
||||
"INT_FULLAmbientmult_both",
|
||||
"INT_garage",
|
||||
"int_GasStation",
|
||||
"int_hanger_none",
|
||||
"int_hanger_small",
|
||||
"int_Hospital2_DM",
|
||||
"int_Hospital_Blue",
|
||||
"int_Hospital_BlueB",
|
||||
"int_hospital_dark",
|
||||
"int_Hospital_DM",
|
||||
"int_hospital_small",
|
||||
"int_lesters",
|
||||
"int_Lost_none",
|
||||
"int_Lost_small",
|
||||
"INT_mall",
|
||||
"int_methlab_small",
|
||||
"int_motelroom",
|
||||
"INT_NO_fogALPHA",
|
||||
"INT_NoAmbientmult",
|
||||
"INT_NoAmbientmult_art",
|
||||
"INT_NoAmbientmult_both",
|
||||
"INT_NOdirectLight",
|
||||
"INT_nowaterREF",
|
||||
"int_office_Lobby",
|
||||
"int_office_LobbyHall",
|
||||
"INT_posh_hairdresser",
|
||||
"INT_smshop",
|
||||
"INT_smshop_indoor_bloom",
|
||||
"INT_smshop_inMOD",
|
||||
"INT_smshop_outdoor_bloom",
|
||||
"INT_streetlighting",
|
||||
"int_tattoo",
|
||||
"int_tattoo_B",
|
||||
"INT_trailer_cinema",
|
||||
"int_tunnel_none_dark",
|
||||
"interior_WATER_lighting",
|
||||
"introblue",
|
||||
"jewel_gas",
|
||||
"jewel_optim",
|
||||
"jewelry_entrance",
|
||||
"jewelry_entrance_INT",
|
||||
"jewelry_entrance_INT_fog",
|
||||
"Kifflom",
|
||||
"KT_underpass",
|
||||
"lab_none",
|
||||
"lab_none_dark",
|
||||
"lab_none_dark_fog",
|
||||
"lab_none_dark_OVR",
|
||||
"lab_none_exit",
|
||||
"lab_none_exit_OVR",
|
||||
"LectroDark",
|
||||
"LectroLight",
|
||||
"li",
|
||||
"LifeInvaderLOD",
|
||||
"lightning",
|
||||
"lightning_cloud",
|
||||
"lightning_strong",
|
||||
"lightning_weak",
|
||||
"LightPollutionHills",
|
||||
"lightpolution",
|
||||
"LIGHTSreduceFALLOFF",
|
||||
"LODmult_global_reduce",
|
||||
"LODmult_global_reduce_NOHD",
|
||||
"LODmult_HD_orphan_LOD_reduce",
|
||||
"LODmult_HD_orphan_reduce",
|
||||
"LODmult_LOD_reduce",
|
||||
"LODmult_SLOD1_reduce",
|
||||
"LODmult_SLOD2_reduce",
|
||||
"LODmult_SLOD3_reduce",
|
||||
"lodscaler",
|
||||
"LostTimeDark",
|
||||
"LostTimeFlash",
|
||||
"LostTimeLight",
|
||||
"maxlodscaler",
|
||||
"metro",
|
||||
"METRO_platform",
|
||||
"METRO_Tunnels",
|
||||
"METRO_Tunnels_entrance",
|
||||
"MichaelColorCode",
|
||||
"MichaelColorCodeBasic",
|
||||
"MichaelColorCodeBright",
|
||||
"MichaelsDarkroom",
|
||||
"MichaelsDirectional",
|
||||
"MichaelsNODirectional",
|
||||
"micheal",
|
||||
"micheals_lightsOFF",
|
||||
"michealspliff",
|
||||
"michealspliff_blend",
|
||||
"michealspliff_blend02",
|
||||
"militarybase_nightlight",
|
||||
"mineshaft",
|
||||
"morebloom",
|
||||
"morgue_dark",
|
||||
"morgue_dark_ovr",
|
||||
"Mp_apart_mid",
|
||||
"mp_bkr_int01_garage",
|
||||
"mp_bkr_int01_small_rooms",
|
||||
"mp_bkr_int01_transition",
|
||||
"mp_bkr_int02_garage",
|
||||
"mp_bkr_int02_hangout",
|
||||
"mp_bkr_int02_small_rooms",
|
||||
"mp_bkr_ware01",
|
||||
"mp_bkr_ware02_dry",
|
||||
"mp_bkr_ware02_standard",
|
||||
"mp_bkr_ware02_upgrade",
|
||||
"mp_bkr_ware03_basic",
|
||||
"mp_bkr_ware03_upgrade",
|
||||
"mp_bkr_ware04",
|
||||
"mp_bkr_ware05",
|
||||
"MP_Bull_tost",
|
||||
"MP_Bull_tost_blend",
|
||||
"MP_corona_heist",
|
||||
"MP_corona_heist_blend",
|
||||
"MP_corona_heist_BW",
|
||||
"MP_corona_heist_BW_night",
|
||||
"MP_corona_heist_DOF",
|
||||
"MP_corona_heist_night",
|
||||
"MP_corona_heist_night_blend",
|
||||
"MP_corona_selection",
|
||||
"MP_corona_switch",
|
||||
"MP_corona_tournament",
|
||||
"MP_corona_tournament_DOF",
|
||||
"MP_death_grade",
|
||||
"MP_death_grade_blend01",
|
||||
"MP_death_grade_blend02",
|
||||
"MP_deathfail_night",
|
||||
"mp_exec_office_01",
|
||||
"mp_exec_office_02",
|
||||
"mp_exec_office_03",
|
||||
"mp_exec_office_03_blue",
|
||||
"mp_exec_office_03C",
|
||||
"mp_exec_office_04",
|
||||
"mp_exec_office_05",
|
||||
"mp_exec_office_06",
|
||||
"mp_exec_warehouse_01",
|
||||
"MP_Garage_L",
|
||||
"MP_H_01_Bathroom",
|
||||
"MP_H_01_Bedroom",
|
||||
"MP_H_01_New",
|
||||
"MP_H_01_New_Bathroom",
|
||||
"MP_H_01_New_Bedroom",
|
||||
"MP_H_01_New_Study",
|
||||
"MP_H_01_Study",
|
||||
"MP_H_02",
|
||||
"MP_H_04",
|
||||
"mp_h_05",
|
||||
"MP_H_06",
|
||||
"mp_h_07",
|
||||
"mp_h_08",
|
||||
"MP_heli_cam",
|
||||
"mp_imx_intwaremed",
|
||||
"mp_imx_intwaremed_office",
|
||||
"mp_imx_mod_int_01",
|
||||
"MP_intro_logo",
|
||||
"MP_job_end_night",
|
||||
"MP_job_load",
|
||||
"MP_job_load_01",
|
||||
"MP_job_load_02",
|
||||
"MP_job_lose",
|
||||
"MP_job_preload",
|
||||
"MP_job_preload_blend",
|
||||
"MP_job_preload_night",
|
||||
"MP_job_win",
|
||||
"MP_Killstreak",
|
||||
"MP_Killstreak_blend",
|
||||
"mp_lad_day",
|
||||
"mp_lad_judgment",
|
||||
"mp_lad_night",
|
||||
"MP_Loser",
|
||||
"MP_Loser_blend",
|
||||
"MP_lowgarage",
|
||||
"MP_MedGarage",
|
||||
"MP_Powerplay",
|
||||
"MP_Powerplay_blend",
|
||||
"MP_race_finish",
|
||||
"MP_select",
|
||||
"Mp_Stilts",
|
||||
"Mp_Stilts2",
|
||||
"Mp_Stilts2_bath",
|
||||
"Mp_Stilts_gym",
|
||||
"Mp_Stilts_gym2",
|
||||
"MP_Studio_Lo",
|
||||
"MPApart_H_01",
|
||||
"MPApart_H_01_gym",
|
||||
"MPApartHigh",
|
||||
"MPApartHigh_palnning",
|
||||
"mugShot",
|
||||
"mugShot_lineup",
|
||||
"Multipayer_spectatorCam",
|
||||
"multiplayer_ped_fight",
|
||||
"nervousRON_fog",
|
||||
"NeutralColorCode",
|
||||
"NeutralColorCodeBasic",
|
||||
"NeutralColorCodeBright",
|
||||
"NeutralColorCodeLight",
|
||||
"NEW_abattoir",
|
||||
"new_bank",
|
||||
"NEW_jewel",
|
||||
"NEW_jewel_EXIT",
|
||||
"NEW_lesters",
|
||||
"new_MP_Garage_L",
|
||||
"NEW_ornate_bank",
|
||||
"NEW_ornate_bank_entrance",
|
||||
"NEW_ornate_bank_office",
|
||||
"NEW_ornate_bank_safe",
|
||||
"New_sewers",
|
||||
"NEW_shrinksOffice",
|
||||
"NEW_station_unfinished",
|
||||
"new_stripper_changing",
|
||||
"NEW_trevorstrailer",
|
||||
"NEW_tunnels",
|
||||
"NEW_tunnels_ditch",
|
||||
"new_tunnels_entrance",
|
||||
"NEW_tunnels_hole",
|
||||
"NEW_yellowtunnels",
|
||||
"NewMicheal",
|
||||
"NewMicheal_night",
|
||||
"NewMicheal_upstairs",
|
||||
"NewMichealgirly",
|
||||
"NewMichealstoilet",
|
||||
"NewMichealupstairs",
|
||||
"nextgen",
|
||||
"NG_blackout",
|
||||
"NG_deathfail_BW_base",
|
||||
"NG_deathfail_BW_blend01",
|
||||
"NG_deathfail_BW_blend02",
|
||||
"NG_filmic01",
|
||||
"NG_filmic02",
|
||||
"NG_filmic03",
|
||||
"NG_filmic04",
|
||||
"NG_filmic05",
|
||||
"NG_filmic06",
|
||||
"NG_filmic07",
|
||||
"NG_filmic08",
|
||||
"NG_filmic09",
|
||||
"NG_filmic10",
|
||||
"NG_filmic11",
|
||||
"NG_filmic12",
|
||||
"NG_filmic13",
|
||||
"NG_filmic14",
|
||||
"NG_filmic15",
|
||||
"NG_filmic16",
|
||||
"NG_filmic17",
|
||||
"NG_filmic18",
|
||||
"NG_filmic19",
|
||||
"NG_filmic20",
|
||||
"NG_filmic21",
|
||||
"NG_filmic22",
|
||||
"NG_filmic23",
|
||||
"NG_filmic24",
|
||||
"NG_filmic25",
|
||||
"NG_filmnoir_BW01",
|
||||
"NG_filmnoir_BW02",
|
||||
"NG_first",
|
||||
"nightvision",
|
||||
"NO_coronas",
|
||||
"NO_fog_alpha",
|
||||
"NO_streetAmbient",
|
||||
"NO_weather",
|
||||
"NoAmbientmult",
|
||||
"NoAmbientmult_interior",
|
||||
"NOdirectLight",
|
||||
"NoPedLight",
|
||||
"NOrain",
|
||||
"overwater",
|
||||
"Paleto",
|
||||
"paleto_nightlight",
|
||||
"paleto_opt",
|
||||
"PennedInDark",
|
||||
"PennedInLight",
|
||||
"PERSHING_water_reflect",
|
||||
"phone_cam",
|
||||
"phone_cam1",
|
||||
"phone_cam10",
|
||||
"phone_cam11",
|
||||
"phone_cam12",
|
||||
"phone_cam13",
|
||||
"phone_cam2",
|
||||
"phone_cam3",
|
||||
"phone_cam3_REMOVED",
|
||||
"phone_cam4",
|
||||
"phone_cam5",
|
||||
"phone_cam6",
|
||||
"phone_cam7",
|
||||
"phone_cam8",
|
||||
"phone_cam8_REMOVED",
|
||||
"phone_cam9",
|
||||
"plane_inside_mode",
|
||||
"player_transition",
|
||||
"player_transition_no_scanlines",
|
||||
"player_transition_scanlines",
|
||||
"PlayerSwitchNeutralFlash",
|
||||
"PlayerSwitchPulse",
|
||||
"plaza_carpark",
|
||||
"PoliceStation",
|
||||
"PoliceStationDark",
|
||||
"polluted",
|
||||
"poolsidewaterreflection2",
|
||||
"PORT_heist_underwater",
|
||||
"powerplant_nightlight",
|
||||
"powerstation",
|
||||
"PPFilter",
|
||||
"PPGreen01",
|
||||
"PPGreen02",
|
||||
"PPOrange01",
|
||||
"PPOrange02",
|
||||
"PPPink01",
|
||||
"PPPink02",
|
||||
"PPPurple01",
|
||||
"PPPurple02",
|
||||
"prison_nightlight",
|
||||
"projector",
|
||||
"prologue",
|
||||
"prologue_ending_fog",
|
||||
"prologue_ext_art_amb",
|
||||
"prologue_reflection_opt",
|
||||
"prologue_shootout",
|
||||
"Prologue_shootout_opt",
|
||||
"pulse",
|
||||
"RaceTurboDark",
|
||||
"RaceTurboFlash",
|
||||
"RaceTurboLight",
|
||||
"ranch",
|
||||
"REDMIST",
|
||||
"REDMIST_blend",
|
||||
"ReduceDrawDistance",
|
||||
"ReduceDrawDistanceMAP",
|
||||
"ReduceDrawDistanceMission",
|
||||
"reducelightingcost",
|
||||
"ReduceSSAO",
|
||||
"reducewaterREF",
|
||||
"refit",
|
||||
"reflection_correct_ambient",
|
||||
"RemoteSniper",
|
||||
"resvoire_reflection",
|
||||
"rply_brightness",
|
||||
"rply_brightness_neg",
|
||||
"rply_contrast",
|
||||
"rply_contrast_neg",
|
||||
"rply_motionblur",
|
||||
"rply_saturation",
|
||||
"rply_saturation_neg",
|
||||
"rply_vignette",
|
||||
"rply_vignette_neg",
|
||||
"SALTONSEA",
|
||||
"sandyshore_nightlight",
|
||||
"SAWMILL",
|
||||
"scanline_cam",
|
||||
"scanline_cam_cheap",
|
||||
"scope_zoom_in",
|
||||
"scope_zoom_out",
|
||||
"secret_camera",
|
||||
"services_nightlight",
|
||||
"shades_pink",
|
||||
"shades_yellow",
|
||||
"SheriffStation",
|
||||
"ship_explosion_underwater",
|
||||
"ship_lighting",
|
||||
"Shop247",
|
||||
"Shop247_none",
|
||||
"sleeping",
|
||||
"Sniper",
|
||||
"SP1_03_drawDistance",
|
||||
"spectator1",
|
||||
"spectator10",
|
||||
"spectator2",
|
||||
"spectator3",
|
||||
"spectator4",
|
||||
"spectator5",
|
||||
"spectator6",
|
||||
"spectator7",
|
||||
"spectator8",
|
||||
"spectator9",
|
||||
"StadLobby",
|
||||
"stc_coroners",
|
||||
"stc_deviant_bedroom",
|
||||
"stc_deviant_lounge",
|
||||
"stc_franklinsHouse",
|
||||
"stc_trevors",
|
||||
"stoned",
|
||||
"stoned_aliens",
|
||||
"stoned_cutscene",
|
||||
"stoned_monkeys",
|
||||
"StreetLighting",
|
||||
"StreetLightingJunction",
|
||||
"StreetLightingtraffic",
|
||||
"STRIP_changing",
|
||||
"STRIP_nofog",
|
||||
"STRIP_office",
|
||||
"STRIP_stage",
|
||||
"StuntFastDark",
|
||||
"StuntFastLight",
|
||||
"StuntSlowDark",
|
||||
"StuntSlowLight",
|
||||
"subBASE_water_ref",
|
||||
"sunglasses",
|
||||
"superDARK",
|
||||
"switch_cam_1",
|
||||
"switch_cam_2",
|
||||
"telescope",
|
||||
"TinyGreen01",
|
||||
"TinyGreen02",
|
||||
"TinyPink01",
|
||||
"TinyPink02",
|
||||
"TinyRacerMoBlur",
|
||||
"torpedo",
|
||||
"traffic_skycam",
|
||||
"trailer_explosion_optimise",
|
||||
"TREVOR",
|
||||
"TrevorColorCode",
|
||||
"TrevorColorCodeBasic",
|
||||
"TrevorColorCodeBright",
|
||||
"Trevors_room",
|
||||
"trevorspliff",
|
||||
"trevorspliff_blend",
|
||||
"trevorspliff_blend02",
|
||||
"Tunnel",
|
||||
"tunnel_entrance",
|
||||
"tunnel_entrance_INT",
|
||||
"TUNNEL_green",
|
||||
"Tunnel_green1",
|
||||
"TUNNEL_green_ext",
|
||||
"tunnel_id1_11",
|
||||
"TUNNEL_orange",
|
||||
"TUNNEL_orange_exterior",
|
||||
"TUNNEL_white",
|
||||
"TUNNEL_yellow",
|
||||
"TUNNEL_yellow_ext",
|
||||
"ufo",
|
||||
"ufo_deathray",
|
||||
"underwater",
|
||||
"underwater_deep",
|
||||
"underwater_deep_clear",
|
||||
"v_abattoir",
|
||||
"V_Abattoir_Cold",
|
||||
"v_bahama",
|
||||
"v_cashdepot",
|
||||
"V_CIA_Facility",
|
||||
"v_dark",
|
||||
"V_FIB_IT3",
|
||||
"V_FIB_IT3_alt",
|
||||
"V_FIB_IT3_alt5",
|
||||
"V_FIB_stairs",
|
||||
"v_foundry",
|
||||
"v_janitor",
|
||||
"v_jewel2",
|
||||
"v_metro",
|
||||
"V_Metro2",
|
||||
"V_Metro_station",
|
||||
"v_michael",
|
||||
"v_michael_lounge",
|
||||
"V_Office_smoke",
|
||||
"V_Office_smoke_ext",
|
||||
"V_Office_smoke_Fire",
|
||||
"v_recycle",
|
||||
"V_recycle_dark",
|
||||
"V_recycle_light",
|
||||
"V_recycle_mainroom",
|
||||
"v_rockclub",
|
||||
"V_Solomons",
|
||||
"v_strip3",
|
||||
"V_strip_nofog",
|
||||
"V_strip_office",
|
||||
"v_strpchangerm",
|
||||
"v_sweat",
|
||||
"v_sweat_entrance",
|
||||
"v_sweat_NoDirLight",
|
||||
"v_torture",
|
||||
"Vagos",
|
||||
"vagos_extlight_small",
|
||||
"VAGOS_new_garage",
|
||||
"VAGOS_new_hangout",
|
||||
"VagosSPLASH",
|
||||
"VC_tunnel_entrance",
|
||||
"vehicle_subint",
|
||||
"venice_canal_tunnel",
|
||||
"vespucci_garage",
|
||||
"VolticBlur",
|
||||
"VolticFlash",
|
||||
"VolticGold",
|
||||
"WAREHOUSE",
|
||||
"WATER _lab_cooling",
|
||||
"WATER_CH2_06_01_03",
|
||||
"WATER_CH2_06_02",
|
||||
"WATER_CH2_06_04",
|
||||
"WATER_cove",
|
||||
"WATER_hills",
|
||||
"WATER_ID2_21",
|
||||
"WATER_lab",
|
||||
"WATER_militaryPOOP",
|
||||
"WATER_muddy",
|
||||
"WATER_port",
|
||||
"WATER_REF_malibu",
|
||||
"WATER_refmap_high",
|
||||
"WATER_refmap_hollywoodlake",
|
||||
"WATER_refmap_low",
|
||||
"WATER_refmap_med",
|
||||
"WATER_refmap_off",
|
||||
"WATER_refmap_poolside",
|
||||
"WATER_refmap_silverlake",
|
||||
"WATER_refmap_venice",
|
||||
"WATER_refmap_verylow",
|
||||
"WATER_resevoir",
|
||||
"WATER_RichmanStuntJump",
|
||||
"WATER_river",
|
||||
"WATER_salton",
|
||||
"WATER_salton_bottom",
|
||||
"WATER_shore",
|
||||
"WATER_silty",
|
||||
"WATER_silverlake",
|
||||
"whitenightlighting",
|
||||
"WhiteOut",
|
||||
"winning_room",
|
||||
"yacht_DLC",
|
||||
"yell_tunnel_nodirect",
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
AddEventHandler('chatMessage', function(source, name, msg)
|
||||
sm = stringsplit(msg, " ");
|
||||
if sm[1] == "/911" then
|
||||
CancelEvent()
|
||||
TriggerClientEvent('chatMessage', -1, "📲 911 | " .. name, { 30, 144, 255 }, string.sub(msg,5))
|
||||
end
|
||||
end)
|
||||
|
||||
function stringsplit(inputstr, sep)
|
||||
if sep == nil then
|
||||
sep = "%s"
|
||||
end
|
||||
local t={} ; i=1
|
||||
for str in string.gmatch(inputstr, "([^"..sep.."]+)") do
|
||||
t[i] = str
|
||||
i = i + 1
|
||||
end
|
||||
return t
|
||||
end
|
||||
@@ -0,0 +1,9 @@
|
||||
description 'Enables use of /ooc for out of character chat.'
|
||||
server_script 'ooc.lua'
|
||||
server_script 'dispatch.lua'
|
||||
server_script 'me.lua'
|
||||
server_script 'tweet.lua'
|
||||
server_script 'darkweb.lua'
|
||||
server_script 'drugdeal.lua'
|
||||
server_script 'serveradmin.lua'
|
||||
server_script 'atc.lua'
|
||||
@@ -0,0 +1,19 @@
|
||||
AddEventHandler('chatMessage', function(source, name, msg)
|
||||
sm = stringsplit(msg, " ");
|
||||
if sm[1] == "/ad" then
|
||||
CancelEvent()
|
||||
TriggerClientEvent('chatMessage', -1, "📡 Advertisement | " .. name, { 255, 255, 51 }, string.sub(msg,5))
|
||||
end
|
||||
end)
|
||||
|
||||
function stringsplit(inputstr, sep)
|
||||
if sep == nil then
|
||||
sep = "%s"
|
||||
end
|
||||
local t={} ; i=1
|
||||
for str in string.gmatch(inputstr, "([^"..sep.."]+)") do
|
||||
t[i] = str
|
||||
i = i + 1
|
||||
end
|
||||
return t
|
||||
end
|
||||
@@ -0,0 +1,19 @@
|
||||
AddEventHandler('chatMessage', function(source, name, msg)
|
||||
sm = stringsplit(msg, " ");
|
||||
if sm[1] == "/atc" then
|
||||
CancelEvent()
|
||||
TriggerClientEvent('chatMessage', -1, "👨✈️ ATC | " .. name, { 255, 140, 0 }, string.sub(msg,6))
|
||||
end
|
||||
end)
|
||||
|
||||
function stringsplit(inputstr, sep)
|
||||
if sep == nil then
|
||||
sep = "%s"
|
||||
end
|
||||
local t={} ; i=1
|
||||
for str in string.gmatch(inputstr, "([^"..sep.."]+)") do
|
||||
t[i] = str
|
||||
i = i + 1
|
||||
end
|
||||
return t
|
||||
end
|
||||
@@ -0,0 +1,19 @@
|
||||
AddEventHandler('chatMessage', function(source, name, msg)
|
||||
sm = stringsplit(msg, " ");
|
||||
if sm[1] == "/darkweb" then
|
||||
CancelEvent()
|
||||
TriggerClientEvent('chatMessage', -1, "👨💻 Dark Web | " .. name, { 0, 0, 0 }, string.sub(msg,10))
|
||||
end
|
||||
end)
|
||||
|
||||
function stringsplit(inputstr, sep)
|
||||
if sep == nil then
|
||||
sep = "%s"
|
||||
end
|
||||
local t={} ; i=1
|
||||
for str in string.gmatch(inputstr, "([^"..sep.."]+)") do
|
||||
t[i] = str
|
||||
i = i + 1
|
||||
end
|
||||
return t
|
||||
end
|
||||
@@ -0,0 +1,19 @@
|
||||
AddEventHandler('chatMessage', function(source, name, msg)
|
||||
sm = stringsplit(msg, " ");
|
||||
if sm[1] == "/dispatch" then
|
||||
CancelEvent()
|
||||
TriggerClientEvent('chatMessage', -1, "📲 Dispatch | " .. name, { 30, 144, 255 }, string.sub(msg,10))
|
||||
end
|
||||
end)
|
||||
|
||||
function stringsplit(inputstr, sep)
|
||||
if sep == nil then
|
||||
sep = "%s"
|
||||
end
|
||||
local t={} ; i=1
|
||||
for str in string.gmatch(inputstr, "([^"..sep.."]+)") do
|
||||
t[i] = str
|
||||
i = i + 1
|
||||
end
|
||||
return t
|
||||
end
|
||||
@@ -0,0 +1,19 @@
|
||||
AddEventHandler('chatMessage', function(source, name, msg)
|
||||
sm = stringsplit(msg, " ");
|
||||
if sm[1] == "/drugdeal" then
|
||||
CancelEvent()
|
||||
TriggerClientEvent('chatMessage', -1, "💊 Drug Deal | " .. name, { 0, 100, 0 }, string.sub(msg,11))
|
||||
end
|
||||
end)
|
||||
|
||||
function stringsplit(inputstr, sep)
|
||||
if sep == nil then
|
||||
sep = "%s"
|
||||
end
|
||||
local t={} ; i=1
|
||||
for str in string.gmatch(inputstr, "([^"..sep.."]+)") do
|
||||
t[i] = str
|
||||
i = i + 1
|
||||
end
|
||||
return t
|
||||
end
|
||||
@@ -0,0 +1,19 @@
|
||||
AddEventHandler('chatMessage', function(source, name, msg)
|
||||
sm = stringsplit(msg, " ");
|
||||
if sm[1] == "/me" then
|
||||
CancelEvent()
|
||||
TriggerClientEvent('chatMessage', -1, "Me | " .. name, { 255, 0, 0 }, string.sub(msg,5))
|
||||
end
|
||||
end)
|
||||
|
||||
function stringsplit(inputstr, sep)
|
||||
if sep == nil then
|
||||
sep = "%s"
|
||||
end
|
||||
local t={} ; i=1
|
||||
for str in string.gmatch(inputstr, "([^"..sep.."]+)") do
|
||||
t[i] = str
|
||||
i = i + 1
|
||||
end
|
||||
return t
|
||||
end
|
||||
@@ -0,0 +1,19 @@
|
||||
AddEventHandler('chatMessage', function(source, name, msg)
|
||||
sm = stringsplit(msg, " ");
|
||||
if sm[1] == "/ooc" then
|
||||
CancelEvent()
|
||||
TriggerClientEvent('chatMessage', -1, "OOC | " .. name, { 128, 128, 128 }, string.sub(msg,5))
|
||||
end
|
||||
end)
|
||||
|
||||
function stringsplit(inputstr, sep)
|
||||
if sep == nil then
|
||||
sep = "%s"
|
||||
end
|
||||
local t={} ; i=1
|
||||
for str in string.gmatch(inputstr, "([^"..sep.."]+)") do
|
||||
t[i] = str
|
||||
i = i + 1
|
||||
end
|
||||
return t
|
||||
end
|
||||
@@ -0,0 +1,19 @@
|
||||
AddEventHandler('chatMessage', function(source, name, msg)
|
||||
sm = stringsplit(msg, " ");
|
||||
if sm[1] == "/serveradmin" then
|
||||
CancelEvent()
|
||||
TriggerClientEvent('chatMessage', -1, "🔧 Server Admin | " .. name, { 255, 0, 0 }, string.sub(msg,14))
|
||||
end
|
||||
end)
|
||||
|
||||
function stringsplit(inputstr, sep)
|
||||
if sep == nil then
|
||||
sep = "%s"
|
||||
end
|
||||
local t={} ; i=1
|
||||
for str in string.gmatch(inputstr, "([^"..sep.."]+)") do
|
||||
t[i] = str
|
||||
i = i + 1
|
||||
end
|
||||
return t
|
||||
end
|
||||
@@ -0,0 +1,19 @@
|
||||
AddEventHandler('chatMessage', function(source, name, msg)
|
||||
sm = stringsplit(msg, " ");
|
||||
if sm[1] == "/tweet" then
|
||||
CancelEvent()
|
||||
TriggerClientEvent('chatMessage', -1, "📶 Tweet | " .. name, { 87, 160, 211 }, string.sub(msg,7))
|
||||
end
|
||||
end)
|
||||
|
||||
function stringsplit(inputstr, sep)
|
||||
if sep == nil then
|
||||
sep = "%s"
|
||||
end
|
||||
local t={} ; i=1
|
||||
for str in string.gmatch(inputstr, "([^"..sep.."]+)") do
|
||||
t[i] = str
|
||||
i = i + 1
|
||||
end
|
||||
return t
|
||||
end
|
||||
@@ -0,0 +1,41 @@
|
||||
# Compiled Lua sources
|
||||
luac.out
|
||||
|
||||
# luarocks build files
|
||||
*.src.rock
|
||||
*.zip
|
||||
*.tar.gz
|
||||
|
||||
# Object files
|
||||
*.o
|
||||
*.os
|
||||
*.ko
|
||||
*.obj
|
||||
*.elf
|
||||
|
||||
# Precompiled Headers
|
||||
*.gch
|
||||
*.pch
|
||||
|
||||
# Libraries
|
||||
*.lib
|
||||
*.a
|
||||
*.la
|
||||
*.lo
|
||||
*.def
|
||||
*.exp
|
||||
|
||||
# Shared objects (inc. Windows DLLs)
|
||||
*.dll
|
||||
*.so
|
||||
*.so.*
|
||||
*.dylib
|
||||
|
||||
# Executables
|
||||
*.exe
|
||||
*.out
|
||||
*.app
|
||||
*.i*86
|
||||
*.x86_64
|
||||
*.hex
|
||||
|
||||
@@ -0,0 +1,674 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<https://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<https://www.gnu.org/licenses/why-not-lgpl.html>.
|
||||
@@ -0,0 +1 @@
|
||||
# ContainerForklift
|
||||
@@ -0,0 +1,68 @@
|
||||
isAttached = false
|
||||
canSleep = false
|
||||
|
||||
Citizen.CreateThread(function()
|
||||
AddTextEntry("press_attach_vehicle", "Press ~INPUT_DETONATE~ to pick up this container up")
|
||||
AddTextEntry("press_detach_vehicle", "Press ~INPUT_DETONATE~ to detach this container")
|
||||
while true do
|
||||
Citizen.Wait(10)
|
||||
local ped = PlayerPedId()
|
||||
if IsPedInAnyVehicle(ped, false) then
|
||||
local veh = GetVehiclePedIsIn(ped, false)
|
||||
if GetEntityModel(veh) == `handler` then -- Hash > Handler
|
||||
local pedCoords = GetEntityCoords(ped, 0)
|
||||
local objectId = GetClosestObjectOfType(pedCoords.x, pedCoords.y, pedCoords.z+5.0, 5.0, GetHashKey("prop_contr_03b_ld"), false)
|
||||
if objectId ~= 0 then
|
||||
if isAttached then
|
||||
|
||||
if IsEntityAttachedToHandlerFrame(veh, objectId) == false then
|
||||
isAttached = false
|
||||
Wait(2000)
|
||||
end
|
||||
|
||||
DisplayHelpTextThisFrame("press_detach_vehicle")
|
||||
else
|
||||
if IsHandlerFrameAboveContainer(veh, objectId) == 1 then
|
||||
DisplayHelpTextThisFrame("press_attach_vehicle")
|
||||
end
|
||||
end
|
||||
|
||||
if IsControlJustPressed(0, 47) then
|
||||
if isAttached ~= true and IsHandlerFrameAboveContainer(veh, objectId) == 1 then
|
||||
N_0x6a98c2ecf57fa5d4(veh, objectId) -- // Attach Container to Handler Frame (Thx Indra :3)
|
||||
isAttached = true
|
||||
else
|
||||
DetachContainerFromHandlerFrame(veh)
|
||||
isAttached = false
|
||||
Wait(2000)
|
||||
end
|
||||
end
|
||||
canSleep = false
|
||||
else
|
||||
if not isAttached then
|
||||
canSleep = true
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
if canSleep then
|
||||
Citizen.Wait(2000)
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
RegisterCommand('handler', function(source, args, rawCommand)
|
||||
local myPed = PlayerPedId()
|
||||
local vehicle = GetHashKey('Handler')
|
||||
|
||||
RequestModel(vehicle)
|
||||
|
||||
while not HasModelLoaded(vehicle) do
|
||||
Wait(1)
|
||||
end
|
||||
|
||||
local coords = GetOffsetFromEntityInWorldCoords(GetPlayerPed(-1), 0, 5.0, 0)
|
||||
local spawned_car = CreateVehicle(vehicle, coords, 64.55118,116.613,78.69622, true, false)
|
||||
SetVehicleOnGroundProperly(spawned_car)
|
||||
SetPedIntoVehicle(myPed, spawned_car, - 1)
|
||||
end)
|
||||
@@ -0,0 +1,7 @@
|
||||
fx_version 'adamant'
|
||||
author 'terbium'
|
||||
game "gta5"
|
||||
|
||||
client_scripts {
|
||||
'client.lua'
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
-- Crouch script written by WolfKnight
|
||||
-- Made for AfterLifeRP
|
||||
-- Version 1.0.1
|
||||
|
||||
-- Set the resource manifest
|
||||
resource_manifest_version '77731fab-63ca-442c-a67b-abc70f28dfa5'
|
||||
|
||||
-- Add a client script
|
||||
client_script 'client.lua'
|
||||
@@ -0,0 +1,31 @@
|
||||
local crouched = false
|
||||
|
||||
Citizen.CreateThread( function()
|
||||
while true do
|
||||
Citizen.Wait( 1 )
|
||||
|
||||
local ped = GetPlayerPed( -1 )
|
||||
|
||||
if ( DoesEntityExist( ped ) and not IsEntityDead( ped ) ) then
|
||||
DisableControlAction( 0, 36, true ) -- INPUT_DUCK
|
||||
|
||||
if ( not IsPauseMenuActive() ) then
|
||||
if ( IsDisabledControlJustPressed( 0, 36 ) ) then
|
||||
RequestAnimSet( "move_ped_crouched" )
|
||||
|
||||
while ( not HasAnimSetLoaded( "move_ped_crouched" ) ) do
|
||||
Citizen.Wait( 100 )
|
||||
end
|
||||
|
||||
if ( crouched == true ) then
|
||||
ResetPedMovementClipset( ped, 0 )
|
||||
crouched = false
|
||||
elseif ( crouched == false ) then
|
||||
SetPedMovementClipset( ped, "move_ped_crouched", 0.25 )
|
||||
crouched = true
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end )
|
||||
@@ -0,0 +1,6 @@
|
||||
resource_manifest_version '44febabe-d386-4d18-afbe-5e627f4af937'
|
||||
|
||||
client_scripts {
|
||||
'config.lua',
|
||||
'client.lua'
|
||||
}
|
||||
@@ -0,0 +1,297 @@
|
||||
|
||||
|
||||
tc = false
|
||||
Citizen.CreateThread(function()
|
||||
if Config.TCon == true then
|
||||
while true do
|
||||
Wait(20)
|
||||
playerped = GetPlayerPed(-1)
|
||||
if IsPedSittingInAnyVehicle(playerped) then
|
||||
local veh = GetVehiclePedIsIn(playerped,false)
|
||||
if playerped == GetPedInVehicleSeat(veh,-1) then
|
||||
if IsControlPressed(0,Config.TCkey) then
|
||||
tc = true
|
||||
TC()
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
|
||||
cruse = false
|
||||
Citizen.CreateThread(function()
|
||||
if Config.CCon == true then
|
||||
while true do
|
||||
Wait(20)
|
||||
local playerped = GetPlayerPed(-1)
|
||||
if IsPedSittingInAnyVehicle(playerped) then
|
||||
local veh = GetVehiclePedIsIn(playerped,false)
|
||||
if playerped == GetPedInVehicleSeat(veh,-1) then
|
||||
if IsControlPressed(0,Config.CCkey) then
|
||||
cruse = true
|
||||
Cruse()
|
||||
end
|
||||
end
|
||||
else
|
||||
Wait(2500)
|
||||
end
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
|
||||
|
||||
function TC()
|
||||
if not HasStreamedTextureDictLoaded('cctcimages') then
|
||||
RequestStreamedTextureDict('cctcimages', true)
|
||||
while not HasStreamedTextureDictLoaded('cctcimages') do
|
||||
Wait(0)
|
||||
end
|
||||
end
|
||||
playerped = GetPlayerPed(-1)
|
||||
local veh = GetVehiclePedIsIn(playerped,false)
|
||||
local drivebias = GetVehicleHandlingFloat(veh,"CHandlingData", "fDriveBiasFront")
|
||||
|
||||
oldvalue = GetVehicleHandlingFloat(vehicle,'CHandlingData','fLowSpeedTractionLossMult')
|
||||
repeat
|
||||
Wait(0)
|
||||
if IsPedGettingIntoAVehicle(playerped) then
|
||||
Wait(2000)
|
||||
veh = GetVehiclePedIsIn(playerped,false)
|
||||
drivebias = GetVehicleHandlingFloat(veh,"CHandlingData", "fDriveBiasFront")
|
||||
oldvalue = GetVehicleHandlingFloat(vehicle,'CHandlingData','fLowSpeedTractionLossMult')
|
||||
end
|
||||
|
||||
|
||||
if IsPedInAnyVehicle(playerped) then
|
||||
if tcacting == true then
|
||||
-- SetVehicleHandlingField(vehicle,'CHandlingData','fLowSpeedTractionLossMult',newvalue5)
|
||||
--SetVehicleEngineTorqueMultiplier(veh, var1)
|
||||
else
|
||||
SetVehicleHandlingField(vehicle,'CHandlingData','fLowSpeedTractionLossMult',oldvalue)
|
||||
SetVehicleEngineTorqueMultiplier(veh, 1.0)
|
||||
end
|
||||
var1 = 1.0
|
||||
mod1 = 0.0
|
||||
newvalue5 = oldvalue
|
||||
|
||||
tcacting = false
|
||||
|
||||
|
||||
wh1 = GetVehicleWheelSpeed(veh,0)
|
||||
wh1 = (GetVehicleWheelSpeed(veh,1) + wh1) / 2
|
||||
wh2 = (GetVehicleWheelSpeed(veh,1) + wh1) / 2
|
||||
wh3 = GetVehicleWheelSpeed(veh,2)
|
||||
wh4 = GetVehicleWheelSpeed(veh,3)
|
||||
throttle = 0.0
|
||||
wheelave = (GetVehicleWheelSpeed(veh,0) + GetVehicleWheelSpeed(veh,1) + GetVehicleWheelSpeed(veh,2) + GetVehicleWheelSpeed(veh,3)) / 4
|
||||
if Config.OnScreendisplayTC == true then
|
||||
DrawRect(UITC.x + 0.01 ,UITC.y + 0.04 ,0.05,0.01,0,0,0,255)
|
||||
end
|
||||
steerang = GetVehicleSteeringAngle(veh)
|
||||
if steerang > 1 then
|
||||
mod1 = steerang / 20
|
||||
elseif steerang < -1.0 then
|
||||
steerang = steerang - steerang*2
|
||||
mod1 = steerang / 20
|
||||
end
|
||||
if wh1 > (wheelave + 0.05 + mod1) then
|
||||
var1 = 1.0 / ((wh1 - (wheelave + 0.00 + mod1) )- 0.04) *Config.action
|
||||
newvalue5 = oldvalue * var1
|
||||
tcacting = true
|
||||
elseif wh2 > (wheelave + 0.05 + mod1) then
|
||||
var1 = 1.0 / ((wh2 - (wheelave + 0.00 + mod1) )- 0.04) *Config.action
|
||||
newvalue5 = oldvalue * var1
|
||||
tcacting = true
|
||||
elseif wh3 > (wheelave + 0.05 + mod1) then
|
||||
var1 = 1.0 / ((wh3 - (wheelave + 0.00 + mod1) )- 0.04) *Config.action
|
||||
newvalue5 = oldvalue * var1
|
||||
tcacting = true
|
||||
elseif wh4 > (wheelave + 0.05 + mod1) then
|
||||
var1 = 1.0 / ((wh4 - (wheelave + 0.00 + mod1) )- 0.04) *Config.action
|
||||
newvalue5 = oldvalue * var1
|
||||
tcacting = true
|
||||
end
|
||||
if tcacting == true then
|
||||
if newvalue5 > 0.0 and newvalue5 < oldvalue then
|
||||
SetVehicleHandlingField(vehicle,'CHandlingData','fLowSpeedTractionLossMult',newvalue5)
|
||||
newvalue5 = oldvalue * var1
|
||||
elseif newvalue5 > oldvalue then
|
||||
newvalue5 = oldvalue * var1
|
||||
SetVehicleHandlingField(vehicle,'CHandlingData','fLowSpeedTractionLossMult',newvalue5)
|
||||
elseif newvalue5 < 0.0 then
|
||||
newvalue5 = 0.01
|
||||
SetVehicleHandlingField(vehicle,'CHandlingData','fLowSpeedTractionLossMult',newvalue5)
|
||||
end
|
||||
if var1 < 1.0 then
|
||||
SetVehicleEngineTorqueMultiplier(veh, var1)
|
||||
if var1 < 0.98 then
|
||||
drawbox(UITC.x - 0.01 ,UITC.y + 0.04,0,255)
|
||||
end
|
||||
if var1 < 0.7 then
|
||||
drawbox(UITC.x - 0.00 ,UITC.y + 0.04 ,100,200)
|
||||
end
|
||||
if var1 < 0.5 then
|
||||
drawbox(UITC.x + 0.01 ,UITC.y + 0.04 ,150,200)
|
||||
end
|
||||
if var1 < 0.3 then
|
||||
drawbox(UITC.x + 0.02 ,UITC.y + 0.04 ,150,100)
|
||||
end
|
||||
if var1 < 0.2 then
|
||||
drawbox(UITC.x + 0.03 ,UITC.y + 0.04,233,0)
|
||||
end
|
||||
else
|
||||
var1 = 1.0
|
||||
SetVehicleEngineTorqueMultiplier(veh, var1)
|
||||
end
|
||||
|
||||
end
|
||||
if Config.OnScreenTextTC then
|
||||
drawTxta(UITC.x - 0.0 ,UITC.y + 0.0 ,0.55,"~w~TC ~g~ON", 255,50,0,255)
|
||||
end
|
||||
if Config.SimpleTCimmage then
|
||||
if tcacting == true then
|
||||
DrawSprite('cctcimages','SRTC1',UITC.x + 0.04 ,UITC.y + 0.02,0.014,0.024,0.0,255,255,255,200)
|
||||
else
|
||||
DrawSprite('cctcimages','SRTC2',UITC.x + 0.04 ,UITC.y + 0.02,0.014,0.024,0.0,255,255,255,200)
|
||||
end
|
||||
end
|
||||
if Config.Watermark then
|
||||
drawTxtb(UITC.x - 0.01 ,UITC.y + 0.041 ,0.27,"By DOJSRC", 255,255,255,255)
|
||||
end
|
||||
if IsControlJustPressed(0,Config.TCkey) or IsControlJustPressed(0,Config.TCkey) then
|
||||
SetVehicleMaxSpeed(veh,300.0)
|
||||
tc = false
|
||||
elseif IsPedInAnyVehicle(playerped,true) == false and Config.enableTCtoggle == false then
|
||||
tc = false
|
||||
end
|
||||
end
|
||||
until tc == false
|
||||
SetVehicleHandlingField(vehicle,'CHandlingData','fLowSpeedTractionLossMult',oldvalue)
|
||||
Wait(500)
|
||||
end
|
||||
|
||||
function drawbox(x,y,r,g)
|
||||
if Config.OnScreendisplayTC == true then
|
||||
|
||||
DrawRect(x,y,0.01,0.01,r,g,0,255)
|
||||
end
|
||||
end
|
||||
|
||||
function Cruse()
|
||||
if not HasStreamedTextureDictLoaded('cctcimages') then
|
||||
RequestStreamedTextureDict('cctcimages', true)
|
||||
while not HasStreamedTextureDictLoaded('cctcimages') do
|
||||
Wait(0)
|
||||
end
|
||||
end
|
||||
print"starting CC"
|
||||
local playerped = PlayerPedId()
|
||||
local veh = GetVehiclePedIsIn(playerped, false)
|
||||
local vel = GetVehicleWheelSpeed(veh, 1)
|
||||
|
||||
if vel > Config.Minspeed and vel < Config.Maxspeed then
|
||||
local speed = vel * 2.237
|
||||
repeat
|
||||
Wait(0)
|
||||
local vel2 = GetVehicleWheelSpeed(veh, 1)
|
||||
if vel2 < 0.001 then
|
||||
vel2 = 0.01
|
||||
end
|
||||
|
||||
local diff = vel + 0.2 - vel2
|
||||
local throttle = 0.2
|
||||
if diff > 1.0 then
|
||||
throttle = 1.0
|
||||
else
|
||||
throttle = diff
|
||||
end
|
||||
|
||||
if not IsControlPressed(0, 76) and throttle > 0.01 then
|
||||
SetControlNormal(0, 71, throttle)
|
||||
end
|
||||
|
||||
if throttle < 0.001 then
|
||||
throttle = 0.0
|
||||
end
|
||||
|
||||
local curspeed = GetVehicleWheelSpeed(veh, 1) * 2.237
|
||||
speed = vel * 2.237
|
||||
|
||||
if Config.OnScreenTextCC then
|
||||
drawTxta(UI.x, UI.y - 0.12, 0.45, "~r~Target Speed: ~w~" ..(round(speed,1)).. " MPH", 255, 50, 0, 255)
|
||||
drawTxta(UI.x, UI.y - 0.095, 0.45, "~r~Current speed: ~w~" ..round(curspeed,1).. " MPH", 255, 50, 0, 255)
|
||||
drawTxta(UI.x, UI.y - 0.07, 0.45, "~r~Throttle %: ~w~" ..round((throttle*100)), 255, 50, 0, 255)
|
||||
end
|
||||
if Config.OnScreendisplayCC then
|
||||
local sr = toint((throttle*255)) - 10
|
||||
local sg = 255 - sr + 10
|
||||
sg = toint(sg)
|
||||
DrawRect(UI.x + 0.06, UI.y - 0.03, throttle/12, 0.01, sr, sg, 0, 255)
|
||||
end
|
||||
if Config.Watermark2 then
|
||||
drawTxtb(UI.x + 0.01 ,UI.y - 0.03 ,0.27,"By DOJSRC", 255,255,255,255)
|
||||
end
|
||||
if Config.SimpleCCimmage then
|
||||
DrawSprite('cctcimages','SRCC1',UI.x - 0.0 ,UI.y - 0.01,0.023,0.04,0.0,255,255,255,200)
|
||||
end
|
||||
|
||||
|
||||
if IsControlPressed(0, Config.CCkey) and GetVehicleWheelSpeed(veh,1) < Config.Maxspeed then
|
||||
vel = GetVehicleWheelSpeed(veh,1)
|
||||
end
|
||||
|
||||
if IsControlJustPressed(0, 8) or IsControlJustPressed(0, Config.CCkey) then
|
||||
SetVehicleMaxSpeed(veh, 300.0)
|
||||
cruse = false
|
||||
elseif IsPedInAnyVehicle(playerped,true) == false then
|
||||
cruse = false
|
||||
end
|
||||
until cruse == false
|
||||
Wait(500)
|
||||
end
|
||||
end
|
||||
|
||||
function round(num, numDecimalPlaces)
|
||||
local mult = 10^(numDecimalPlaces or 0)
|
||||
if num >= 0 then return math.floor(num * mult + 0.5) / mult
|
||||
else return math.ceil(num * mult - 0.5) / mult end
|
||||
end
|
||||
|
||||
function toint(n)
|
||||
local s = tostring(n)
|
||||
local i, j = s:find('%.')
|
||||
if i then
|
||||
return tonumber(s:sub(1, i-1))
|
||||
else
|
||||
return n
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
function drawTxta(x, y, scale, text, r, g, b, a)
|
||||
SetTextFont(4)
|
||||
SetTextProportional(0)
|
||||
SetTextScale(scale, scale)
|
||||
SetTextColour(r, g, b, a)
|
||||
SetTextDropShadow(0, 0, 0, 0,255)
|
||||
SetTextEdge(1, 0, 0, 0, 255)
|
||||
SetTextDropShadow()
|
||||
SetTextOutline()
|
||||
SetTextEntry("STRING")
|
||||
AddTextComponentString(text)
|
||||
DrawText(x, y)
|
||||
|
||||
end
|
||||
|
||||
function drawTxtb(x, y, scale, text, r, g, b, a)
|
||||
SetTextFont(4)
|
||||
SetTextProportional(0)
|
||||
SetTextScale(scale, scale)
|
||||
SetTextColour(r, g, b, a)
|
||||
SetTextEntry("STRING")
|
||||
AddTextComponentString(text)
|
||||
DrawText(x, y)
|
||||
end
|
||||
@@ -0,0 +1,46 @@
|
||||
Config = {}
|
||||
|
||||
Config.TCon = false --- Enable/Disable Traction Control
|
||||
|
||||
Config.CCon = true --- Enable/Disable Cruise Control
|
||||
|
||||
Config.TCkey = 20 --- Traction Control Key (Default Z) // https://docs.fivem.net/game-references/controls/
|
||||
|
||||
Config.CCkey = 246 --- Cruise Control Key (Default Y) // https://docs.fivem.net/game-references/controls/
|
||||
|
||||
Config.Maxspeed = 68.0 --- In meters per second 34 = 75mph
|
||||
|
||||
Config.Minspeed = 5.0 --- In meters per second 0.1 = 0.2mph
|
||||
|
||||
Config.action = 0.2 --- How much the TC wil try to stop you sliding Lower = more help
|
||||
|
||||
Config.OnScreenTextCC = true --- Enable/Disable On-Screen text
|
||||
|
||||
Config.OnScreendisplayCC = false --- Enable/Disable On-Screen display/colours
|
||||
|
||||
Config.SimpleCCimmage = false --- a small symbol
|
||||
|
||||
Config.OnScreenTextTC = false --- Enable/Disable On-Screen text
|
||||
|
||||
Config.OnScreendisplayTC = false --- Enable/Disable On-Screen display/colours
|
||||
|
||||
Config.SimpleTCimmage = false --- a small symbol
|
||||
|
||||
Config.Watermark = false --- Enable/Disable Watermark
|
||||
|
||||
Config.Watermark2 = false --- Enable/Disable Watermark
|
||||
|
||||
Config.enableTCtoggle = false
|
||||
|
||||
UITC = {
|
||||
|
||||
x = 0.20 , -- Traction Control Screen Coords 0.0-1.0 left to right
|
||||
y = 0.720 , -- Traction Control Screen Coords 0.0-1.0 = top to bottom
|
||||
|
||||
}
|
||||
UI = {
|
||||
|
||||
x = 0.015 , -- Cruise Control Screen Coords 0.0-1.0 left to right
|
||||
y = 0.84 , -- Cruise Control Screen Coords 0.0-1.0 = top to bottom
|
||||
|
||||
}
|
||||
Binary file not shown.
@@ -0,0 +1,9 @@
|
||||
-----------------------------------------------------------------
|
||||
-----------------------------------------------------------------
|
||||
--------------------Made by ServerCopMug#0392--------------------
|
||||
----------------Customizable-Response-Commands-------------------
|
||||
-----------------------------------------------------------------
|
||||
|
||||
----DON'T NEED TO TOUCH THIS---
|
||||
|
||||
client_script "client.lua"
|
||||
@@ -0,0 +1,44 @@
|
||||
-----------------------------------------------------------------
|
||||
-----------------------------------------------------------------
|
||||
--------------------Made by ServerCopMug#0392--------------------
|
||||
----------------Customizable-Response-Commands-------------------
|
||||
-----------------------------------------------------------------
|
||||
|
||||
|
||||
--------**To add more links copy and paste the lines below**--------
|
||||
--------**To change the colors of the message follow this page: https://forum.cfx.re/t/chat-formatting-colors-bold-underline/67641**--------
|
||||
|
||||
--------------------RESPONSE COMMANDS--------------------------
|
||||
|
||||
RegisterCommand("discord", function(source, args, rawCommand) -------- replace "discord" with any other command you want **DON'T INCLUDE /**
|
||||
TriggerEvent("chatMessage", "^*^8[Our Discord:] ^7https://discord.gg/2XvwvgR") ------- change message in the ""
|
||||
end)
|
||||
|
||||
--RegisterCommand("cad", function(source, args, rawCommand) ------- replace "cad" with any other command you want DON'T INCLUDE /
|
||||
-- TriggerEvent("chatMessage", "^*^8[Our CAD:] ^7https://cad.elite-gaming.co.uk/") ------- change message in the ""
|
||||
--end)
|
||||
|
||||
RegisterCommand("website", function(source, args, rawCommand) ------- replace "website" with any other command you want DON'T INCLUDE /
|
||||
TriggerEvent("chatMessage", "^*^8[Our Website:] ^7https://elite-gaming.co.uk/") ------- change message in the ""
|
||||
end)
|
||||
|
||||
RegisterCommand("forum", function(source, args, rawCommand) ------- replace "website" with any other command you want DON'T INCLUDE /
|
||||
TriggerEvent("chatMessage", "^*^8[Our Forum:] ^7https://forum.elite-gaming.co.uk/") ------- change message in the ""
|
||||
end)
|
||||
|
||||
--RegisterCommand("commands", function(source, args, rawCommand) ------- replace "commands" with any other command you want DON'T INCLUDE /
|
||||
-- TriggerEvent("chatMessage", "^*^8[Commands:] ^7/website, /cad, /discord, /cars, /info, /help") ------- change message in the ""
|
||||
--end)
|
||||
|
||||
--RegisterCommand("cars", function(source, args, rawCommand) ------- replace "cars" with any other command you want DON'T INCLUDE /
|
||||
-- TriggerEvent("chatMessage", "^*^8[Custom Car Spawn Codes:] ^7CAR1, CAR2, CAR3, CAR4, CAR5") ------- change message in the ""
|
||||
--end)
|
||||
|
||||
--RegisterCommand("info", function(source, args, rawCommand) ------- replace "info" with any other command you want DON'T INCLUDE /
|
||||
-- TriggerEvent("chatMessage", "^*^8[Server Info:] ^7Some server info...") ------- change message in the ""
|
||||
--end)
|
||||
|
||||
--RegisterCommand("help", function(source, args, rawCommand) ------- replace "help" with any other command you want DON'T INCLUDE /
|
||||
-- TriggerEvent("chatMessage", "^*^8[Help:] ^7Some help...") ------- change message in the ""
|
||||
--end)
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
resource_manifest_version "44febabe-d386-4d18-afbe-5e627f4af937"
|
||||
|
||||
client_scripts {
|
||||
'config.lua',
|
||||
'client.lua'
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user