Tekrar Söylüyorum Türkçeleştirmesi Bana Ait
İndirenlerden Sadece Bir Teşekkürü Esirgemesin...
Eklenmesi Gereken Yer : esx_inventoryhudtrunk/client.lua
Eklenmesi Gereken Kod:
İndirenlerden Sadece Bir Teşekkürü Esirgemesin...
Eklenmesi Gereken Yer : esx_inventoryhudtrunk/client.lua
Eklenmesi Gereken Kod:
Kod:
----- START LRP-PALANCA ----
function loadanimdict(dictname)
if not HasAnimDictLoaded(dictname) then
RequestAnimDict(dictname)
while not HasAnimDictLoaded(dictname) do
Citizen.Wait(1)
end
end
end
--animacion
RegisterNetEvent("abrirmaletero:animacion")
AddEventHandler("abrirmaletero:animacion",function()
animrobovaultcarro()
end)
function animrobovaultcarro()
local anima = 'mini@drinking'
local lib2 = "shots_player_c"
local loopanimvault = true
loadanimdict(anima)
prop_name = prop_name or 'prop_ing_crowbar'
local playerPed = PlayerPedId()
local x,y,z = table.unpack(GetEntityCoords(playerPed))
local prop = CreateObject(GetHashKey(prop_name), x, y, z + 0.2, true, true, true)
local boneIndex = GetPedBoneIndex(playerPed,28422)
AttachEntityToEntity(prop, playerPed, boneIndex, 0.10, 0.015, 0.001, 10.0, 175.0, 0.0, 1, 1, 0, 0, 2, 1)
FreezeEntityPosition(playerPed, true)
TaskPlayAnim(GetPlayerPed(-1),anima , lib2, 1.0, -1, -1, 10, 0, 0, 0, 0)
Citizen.CreateThread(function()
while loopanimvault do
Citizen.Wait(0)
if not IsEntityPlayingAnim(GetPlayerPed(-1),anima,lib2, 3) then
TaskPlayAnim(GetPlayerPed(-1),anima , lib2, 1.0, -1, -1, 10, 0, 0, 0, 0)
end
end
end)
Citizen.Wait(10000)
loopanimvault = false
DeleteObject(prop)
FreezeEntityPosition(playerPed, false)
ClearPedTasksImmediately(playerPed)
end
-- contador que sale en el medio del cuerpo
RegisterNetEvent("abrirmaletero:contadorporcentaje")
AddEventHandler("abrirmaletero:contadorporcentaje",function()
contadorpalanca()
end)
function contadorpalanca()
Citizen.CreateThread(function()
local abriendomaletero = true
local comienzodetiempo = GetGameTimer()
local tiempo = 10000
while abriendomaletero do
Citizen.Wait(0)
local ped = PlayerPedId()
local percentaje = (GetGameTimer() -comienzodetiempo) / tiempo * 100
local x,y,z = table.unpack(GetEntityCoords(ped))
DrawText3Ds({ x = x, y = y, z = z }, " Abriendo Cerradura " .. math.ceil(percentaje) .. "%", 0.5)
if percentaje >= 100 then
abriendomaletero = false
abrirmaleteroporitem()
ClearPedTasksImmediately(ped)
end
end
end)
end
DrawText3Ds = function(coords, text, scale)
local x,y,z = coords.x, coords.y, coords.z
local onScreen, _x, _y = World3dToScreen2d(x, y, z)
local pX, pY, pZ = table.unpack(GetGameplayCamCoords())
SetTextScale(scale, scale)
SetTextFont(4)
SetTextProportional(1)
SetTextEntry("STRING")
SetTextCentre(1)
SetTextColour(255, 255, 255, 215)
AddTextComponentString(text)
DrawText(_x, _y)
local factor = (string.len(text)) / 380
DrawRect(_x, _y + 0.0180, 0.060 + factor, 0.045, 41, 11, 41, 100)
end
--abrir maletero
RegisterNetEvent("abrirmaletero:abrirconpalanca")
AddEventHandler("abrirmaletero:abrirconpalanca",function()
abrirmaleteroporitem()
end)
function abrirmaleteroporitem()
local playerPed = GetPlayerPed(-1)
local coords = GetEntityCoords(playerPed)
local vehicle = VehicleInFront()
globalplate = GetVehicleNumberPlateText(vehicle)
if not IsPedInAnyVehicle(playerPed) then
myVeh = false
local thisVeh = VehicleInFront()
PlayerData = ESX.GetPlayerData()
for i = 1, #vehiclePlate do
local vPlate = all_trim(vehiclePlate[i].plate)
local vFront = all_trim(GetVehicleNumberPlateText(thisVeh))
--print('vPlate: ',vPlate)
--print('vFront: ',vFront)
--if vehiclePlate[i].plate == GetVehicleNumberPlateText(vehFront) then
if vPlate == vFront then
myVeh = true
elseif lastChecked < GetGameTimer() - 60000 then
TriggerServerEvent("esx_trunk_inventory:getOwnedVehicule")
lastChecked = GetGameTimer()
Wait(2000)
for i = 1, #vehiclePlate do
local vPlate = all_trim(vehiclePlate[i].plate)
local vFront = all_trim(GetVehicleNumberPlateText(thisVeh))
if vPlate == vFront then
myVeh = true
end
end
end
end
if globalplate ~= nil or globalplate ~= "" or globalplate ~= " " then
CloseToVehicle = true
local vehFront = VehicleInFront()
local x, y, z = table.unpack(GetEntityCoords(GetPlayerPed(-1), true))
local closecar = GetClosestVehicle(x, y, z, 4.0, 0, 71)
if vehFront > 0 and closecar ~= nil and GetPedInVehicleSeat(closecar, -1) ~= GetPlayerPed(-1) then
lastVehicle = vehFront
local model = GetDisplayNameFromVehicleModel(GetEntityModel(closecar))
local locked = GetVehicleDoorLockStatus(closecar)
local class = GetVehicleClass(vehFront)
ESX.UI.Menu.CloseAll()
if ESX.UI.Menu.IsOpen("default", GetCurrentResourceName(), "inventory") then
SetVehicleDoorShut(vehFront, 5, false)
else
if locked == 1 or class == 15 or class == 16 or class == 14 then
SetVehicleDoorOpen(vehFront, 5, false, false)
ESX.UI.Menu.CloseAll()
if globalplate ~= nil or globalplate ~= "" or globalplate ~= " " then
CloseToVehicle = true
TriggerServerEvent('InteractSound_SV:PlayWithinDistance', 8.0, 'abrircerradura', 0.1)
Citizen.Wait(2800)
OpenCoffreInventoryMenu(GetVehicleNumberPlateText(vehFront), Config.VehicleLimit[class], myVeh)
end
else
exports.pNotify:SendNotification(
{
text = _U("trunk_closed"),
type = "error",
timeout = 3000,
layout = "bottomCenter",
queue = "trunk"
}
)
end
end
else
exports.pNotify:SendNotification(
{
text = _U("no_veh_nearby"),
type = "error",
timeout = 3000,
layout = "bottomCenter",
queue = "trunk"
}
)
end
lastOpen = true
GUI.Time = GetGameTimer()
end
else
-- Not their vehicle
exports.pNotify:SendNotification(
{
text = _U("nacho_veh"),
type = "error",
timeout = 3000,
layout = "bottomCenter",
queue = "trunk"
}
)
end
end
----- STOP LRP-PALANCA ----
Linkleri,görmek için
Giriş yap veya üye ol.
Linkleri,görmek için
Giriş yap veya üye ol.
Linkleri,görmek için
Giriş yap veya üye ol.
Linkleri,görmek için
Giriş yap veya üye ol.
Linkleri,görmek için
Giriş yap veya üye ol.