- update XTC

- fix saving location of pill presses in xtc
- Adjust XTC item crafting
- updated images
This commit is contained in:
Mustache Dom committed 2025-09-11 21:41:40 -06:00
1 parent 76f228c1ac
commit 532ef823e2
47 files changed
+30 -29

No files matched your search

+1 -1
View File
@@ -60,7 +60,7 @@ ps.registerCallback('md-drugs:client:setpress', function(xtcData)
}, },
} }
ps.entityTarget(press, options) ps.entityTarget(press, options)
return true return coords
end) end)
for k, v in pairs(locations.mdp2p) do for k, v in pairs(locations.mdp2p) do
+1 -1
View File
@@ -3,7 +3,7 @@ author "mustache_dom"
description "drugs by mustache dom" description "drugs by mustache dom"
fx_version "cerulean" fx_version "cerulean"
game "gta5" game "gta5"
version '4.0.0' version '4.0.1'
client_scripts { client_scripts {
'client/functions.lua', 'client/functions.lua',
'client/plantSpawns.lua', 'client/plantSpawns.lua',
Binary file not shown.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.8 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.3 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.6 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.0 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.8 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.1 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 102 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 104 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 105 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.0 KiB

After

Width:  |  Height:  |  Size: 8.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.8 KiB

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.9 KiB

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 137 KiB

After

Width:  |  Height:  |  Size: 5.9 KiB

+17 -26
View File
@@ -17,7 +17,7 @@ local RecipeList = {
blue_xtc2 = {amount = 1, take = {raw_xtc = 1, crackrock = 1},}, blue_xtc2 = {amount = 1, take = {raw_xtc = 1, crackrock = 1},},
}, },
triplestack = { triplestack = {
white_xtc3 = {amount = 1, take = {raw_xtc = 1},}, white_xtc3 = {amount = 1, take = {raw_xtc = 1},},
red_xtc3 = {amount = 1, take = {raw_xtc = 1, loosecoke = 1},}, red_xtc3 = {amount = 1, take = {raw_xtc = 1, loosecoke = 1},},
orange_xtc3 = {amount = 1, take = {raw_xtc = 1, heroinvial = 1},}, orange_xtc3 = {amount = 1, take = {raw_xtc = 1, heroinvial = 1},},
blue_xtc3 = {amount = 1, take = {raw_xtc = 1, crackrock = 1},}, blue_xtc3 = {amount = 1, take = {raw_xtc = 1, crackrock = 1},},
@@ -58,25 +58,6 @@ ps.registerCallback('md-drugs:server:GetXtcLocs', function(source)
return xtcLocations return xtcLocations
end) end)
local function craft(source, tbl, item)
local src = source
local need, have = 0,0
for k, v in pairs(tbl.take) do
if ps.hasItem(src, k, v) then
have = have + v
end
need = need + v
end
if need == have then
for k, v in pairs (tbl.take) do
ps.removeItem(src, k, v)
end
ps.addItem(src, item , tbl.amount)
return true
end
return false
end
local activePresses = {} local activePresses = {}
RegisterServerEvent('md-drugs:server:stealisosafrole', function(num) RegisterServerEvent('md-drugs:server:stealisosafrole', function(num)
@@ -109,8 +90,8 @@ local presses = {
for k, v in pairs (presses) do for k, v in pairs (presses) do
ps.createUseable(v.item, function(source, item) ps.createUseable(v.item, function(source, item)
local src = source local src = source
local check, loc = ps.callback('md-drugs:client:setpress', src, v) local location = ps.callback('md-drugs:client:setpress', src, v)
if check then if location then
if ps.removeItem(src, v.item, 1) then if ps.removeItem(src, v.item, 1) then
activePresses[ps.getIdentifier(src)] = { activePresses[ps.getIdentifier(src)] = {
press = v.data, press = v.data,
@@ -118,7 +99,7 @@ ps.createUseable(v.item, function(source, item)
owner = ps.getPlayerName(src), owner = ps.getPlayerName(src),
ownerid = ps.getIdentifier(src), ownerid = ps.getIdentifier(src),
src = src, src = src,
loc = loc loc = location
} }
end end
end end
@@ -142,7 +123,10 @@ RegisterServerEvent('md-drugs:server:makextc', function(data)
end end
if timeOut(src, 'md-drugs:server:makextc') then return end if timeOut(src, 'md-drugs:server:makextc') then return end
if not ps.checkDistance(src, activePresses[ps.getIdentifier(src)].loc, 2.0) then return end if not ps.checkDistance(src, activePresses[ps.getIdentifier(src)].loc, 2.0) then return end
craft(src, RecipeList[activePresses[ps.getIdentifier(src)].press][data], data) if not ps.craftItem(src, RecipeList[activePresses[ps.getIdentifier(src)].press][data]) then
verifyHas(src, RecipeList[activePresses[ps.getIdentifier(src)].press][data].take)
return
end
end) end)
RegisterServerEvent('md-drugs:server:buypress', function(loc, item) RegisterServerEvent('md-drugs:server:buypress', function(loc, item)
@@ -166,12 +150,16 @@ RegisterServerEvent('md-drugs:server:upgradepress', function(data)
ps.notify(src, ps.lang('Catches.notIn'), "error") ps.notify(src, ps.lang('Catches.notIn'), "error")
return return
end end
craft(src, RecipeList.presses[data], data) if not ps.craftItem(src, RecipeList.presses[data]) then
verifyHas(src, RecipeList.presses[data].take)
return
end
end) end)
ps.registerCallback('md-drugs:server:getpressrecipes', function(source) ps.registerCallback('md-drugs:server:getpressrecipes', function(source)
return RecipeList.presses return RecipeList.presses
end) end)
------------- making powder ------------- making powder
RegisterServerEvent('md-drugs:server:makingrawxtc', function(num) RegisterServerEvent('md-drugs:server:makingrawxtc', function(num)
local src = source local src = source
@@ -180,7 +168,10 @@ RegisterServerEvent('md-drugs:server:makingrawxtc', function(num)
return return
end end
if timeOut(src, 'md-drugs:server:makingrawxtc') then return end if timeOut(src, 'md-drugs:server:makingrawxtc') then return end
if not ps.craftItem(src, RecipeList.raw.raw_xtc) then return end if not ps.craftItem(src, RecipeList.raw.raw_xtc) then
verifyHas(src, RecipeList.raw.raw_xtc.take)
return
end
end) end)
local function getColor(color) local function getColor(color)
+11 -1
View File
@@ -1,2 +1,12 @@
Newest Build: 4.0.0 Build: 4.0.0
- update to ps_lib - update to ps_lib
Newest Build: 4.0.1
- fix saving location of pill presses in xtc
- Adjust XTC item crafting
- HOW TO UPDATE BELOW
- bump version in fxmanifest from 4.0.0 to 4.0.1
- redownload and add these files
- client/xtc.lua
- server/xtc.lua
- version.txt