added lang and sorts
This commit is contained in:
1 parent
fefd53857e
commit
d3e99d6440
17 files changed
+279
-191
No files matched your search
+12
-15
@@ -13,7 +13,7 @@ local Ped = "g_m_y_famdnf_01"
|
||||
local labkitlocation = Config.buyheroinlabkit
|
||||
local heroinkitdealer = CreatePed(0, Ped, labkitlocation.x, labkitlocation.y, labkitlocation.z-1, labkitlocation.w, false, false)
|
||||
Freeze(heroinkitdealer, true, labkitlocation.w)
|
||||
AddSingleModel(heroinkitdealer, { label = "Buy Heroin Lab Kit", icon = "fas fa-eye", event = "md-drugs:client:buyheroinlabkit", distance = 2.0}, nil )
|
||||
AddSingleModel(heroinkitdealer, { label = lang.targets.heroin.kit, icon = "fas fa-eye", event = "md-drugs:client:buyheroinlabkit", distance = 2.0}, nil )
|
||||
end)
|
||||
|
||||
---- plant spawns dont edit
|
||||
@@ -23,7 +23,7 @@ RegisterNetEvent('heroin:respawnCane', function(loc)
|
||||
if not PoppyPlants[loc] then
|
||||
PoppyPlants[loc] = CreateObject(hash, v.location, false, true, true)
|
||||
Freeze(PoppyPlants[loc], true, v.heading)
|
||||
AddSingleModel(PoppyPlants[loc], {icon = "fas fa-hand", label = "pick Poppies", action = function() pickher(loc) end}, loc )
|
||||
AddSingleModel(PoppyPlants[loc], {icon = "fas fa-hand", label = Lang.targets.heroin.pick, action = function() pickher(loc) end}, loc )
|
||||
end
|
||||
end)
|
||||
|
||||
@@ -43,7 +43,7 @@ RegisterNetEvent("heroin:init", function()
|
||||
if not v.taken then
|
||||
PoppyPlants[k] = CreateObject(hash, v.location.x, v.location.y, v.location.z, false, true, true)
|
||||
Freeze(PoppyPlants[k], true, v.heading)
|
||||
AddSingleModel(PoppyPlants[k], {icon = "fas fa-hand", label = "pick Poppies", action = function() pickher(k) end}, k )
|
||||
AddSingleModel(PoppyPlants[k], {icon = "fas fa-hand", label = Lang.targets.heroin.pick, action = function() pickher(k) end}, k )
|
||||
end
|
||||
end
|
||||
end)
|
||||
@@ -105,8 +105,8 @@ else
|
||||
SetEntityHeading(heroinlabkit, head)
|
||||
PlaceObjectOnGroundProperly(heroinlabkit)
|
||||
local options = {
|
||||
{ event = "md-drugs:client:heatliquidheroin", icon = "fas fa-box-circle-check", label = "Cook Heroin", data = heroinlabkit},
|
||||
{ event = "md-drugs:client:getheroinkitback", icon = "fas fa-box-circle-check", label = "Pick Up", data = heroinlabkit, canInteract = function() if herointable then return true end end},
|
||||
{ event = "md-drugs:client:heatliquidheroin", icon = "fas fa-box-circle-check", label = Lang.targets.heroin.cook, data = heroinlabkit},
|
||||
{ event = "md-drugs:client:getheroinkitback", icon = "fas fa-box-circle-check", label = Lang.targets.heroin.up, data = heroinlabkit, canInteract = function() if herointable then return true end end},
|
||||
}
|
||||
AddMultiModel(heroinlabkit, options, heroinlabkit)
|
||||
end
|
||||
@@ -117,7 +117,7 @@ RegisterNetEvent("md-drugs:client:heatliquidheroin", function(data)
|
||||
local loc = GetEntityCoords(data.data)
|
||||
local head = GetEntityHeading(data.data)
|
||||
if not ItemCheck('emptyvial') then return end
|
||||
if not minigame(2, 8) then
|
||||
if not minigame() then
|
||||
TriggerServerEvent("md-drugs:server:failheatingheroin")
|
||||
DeleteObject(data.data)
|
||||
local dirtylabkitheroin = CreateObject("v_ret_ml_tablea", loc.x, loc.y, loc.z-1, true, false)
|
||||
@@ -127,10 +127,7 @@ RegisterNetEvent("md-drugs:client:heatliquidheroin", function(data)
|
||||
heroinkit = StartParticleFxLoopedOnEntity("exp_air_molotov", dirtylabkitheroin, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.5, false, false, false)
|
||||
SetParticleFxLoopedAlpha(heroinkit, 3.0)
|
||||
SetPedToRagdoll(PlayerPedId(), 1300, 1300, 0, 0, 0, 0)
|
||||
local options = {
|
||||
{ event = "md-drugs:client:cleanheroinlabkit", icon = "fas fa-box-circle-check", label = "Clean It", data = dirtylabkitheroin}
|
||||
}
|
||||
AddMultiModel(dirtylabkitheroin, options, nil )
|
||||
AddMultiModel(dirtylabkitheroin, {event = "md-drugs:client:cleanheroinlabkit",icon = "fas fa-box-circle-check",label = Lang.target.heroin.clean, data = dirtylabkitheroin}, nil )
|
||||
return end
|
||||
if not progressbar(Lang.Heroin.success, 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:heatliquidheroin")
|
||||
@@ -151,8 +148,8 @@ local head = GetEntityHeading(data)
|
||||
SetEntityHeading(heroinlabkit, head)
|
||||
PlaceObjectOnGroundProperly(heroinlabkit)
|
||||
local options = {
|
||||
{ event = "md-drugs:client:heatliquidheroin", icon = "fas fa-box-circle-check", label = "Cook Heroin", data = heroinlabkit},
|
||||
{ event = "md-drugs:client:getheroinkitback", icon = "fas fa-box-circle-check", label = "Pick Up", data = heroinlabkit, canInteract = function() if herointable then return true end end},
|
||||
{ event = "md-drugs:client:heatliquidheroin", icon = "fas fa-box-circle-check", label = Lang.targets.heroin.cook, data = heroinlabkit},
|
||||
{ event = "md-drugs:client:getheroinkitback", icon = "fas fa-box-circle-check", label = Lang.targets.heroin.up, data = heroinlabkit, canInteract = function() if herointable then return true end end},
|
||||
}
|
||||
AddMultiModel(heroinlabkit, options, heroinlabkit)
|
||||
end)
|
||||
@@ -167,9 +164,9 @@ RegisterNetEvent("md-drugs:client:getheroinkitback", function(data)
|
||||
end)
|
||||
|
||||
|
||||
RegisterNetEvent("md-drugs:client:fillneedle", function(data)
|
||||
if not minigame(2, 8) then TriggerServerEvent("md-drugs:server:failheroin", data.data) return end
|
||||
if not progressbar(Lang.Heroin.needles, 4000, 'uncuff') then return end
|
||||
RegisterNetEvent("md-drugs:client:fillneedle", function(data)
|
||||
if not minigame() then TriggerServerEvent("md-drugs:server:failheroin", data.data) return end
|
||||
if not progressbar(Lang.Heroin.needles, 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:fillneedle", data.data)
|
||||
end)
|
||||
|
||||
|
||||
Reference in new issue
Block a user