- update XTC
- fix saving location of pill presses in xtc - Adjust XTC item crafting - updated images
No files matched your search
@@ -60,7 +60,7 @@ ps.registerCallback('md-drugs:client:setpress', function(xtcData)
|
||||
},
|
||||
}
|
||||
ps.entityTarget(press, options)
|
||||
return true
|
||||
return coords
|
||||
end)
|
||||
|
||||
for k, v in pairs(locations.mdp2p) do
|
||||
|
||||
@@ -3,7 +3,7 @@ author "mustache_dom"
|
||||
description "drugs by mustache dom"
|
||||
fx_version "cerulean"
|
||||
game "gta5"
|
||||
version '4.0.0'
|
||||
version '4.0.1'
|
||||
client_scripts {
|
||||
'client/functions.lua',
|
||||
'client/plantSpawns.lua',
|
||||
|
||||
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 7.9 KiB |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 6.7 KiB |
|
Before Width: | Height: | Size: 9.8 KiB After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 9.2 KiB |
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 9.3 KiB After Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 9.6 KiB After Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 9.0 KiB After Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 9.8 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 9.1 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 5.9 KiB |
|
Before Width: | Height: | Size: 102 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 104 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 105 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 9.0 KiB After Width: | Height: | Size: 8.0 KiB |
|
Before Width: | Height: | Size: 8.8 KiB After Width: | Height: | Size: 8.1 KiB |
|
Before Width: | Height: | Size: 8.9 KiB After Width: | Height: | Size: 8.2 KiB |
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 6.0 KiB |
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 6.9 KiB |
|
After Width: | Height: | Size: 6.8 KiB |
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 137 KiB After Width: | Height: | Size: 5.9 KiB |
@@ -58,25 +58,6 @@ ps.registerCallback('md-drugs:server:GetXtcLocs', function(source)
|
||||
return xtcLocations
|
||||
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 = {}
|
||||
|
||||
RegisterServerEvent('md-drugs:server:stealisosafrole', function(num)
|
||||
@@ -109,8 +90,8 @@ local presses = {
|
||||
for k, v in pairs (presses) do
|
||||
ps.createUseable(v.item, function(source, item)
|
||||
local src = source
|
||||
local check, loc = ps.callback('md-drugs:client:setpress', src, v)
|
||||
if check then
|
||||
local location = ps.callback('md-drugs:client:setpress', src, v)
|
||||
if location then
|
||||
if ps.removeItem(src, v.item, 1) then
|
||||
activePresses[ps.getIdentifier(src)] = {
|
||||
press = v.data,
|
||||
@@ -118,7 +99,7 @@ ps.createUseable(v.item, function(source, item)
|
||||
owner = ps.getPlayerName(src),
|
||||
ownerid = ps.getIdentifier(src),
|
||||
src = src,
|
||||
loc = loc
|
||||
loc = location
|
||||
}
|
||||
end
|
||||
end
|
||||
@@ -142,7 +123,10 @@ RegisterServerEvent('md-drugs:server:makextc', function(data)
|
||||
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
|
||||
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)
|
||||
|
||||
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")
|
||||
return
|
||||
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)
|
||||
|
||||
ps.registerCallback('md-drugs:server:getpressrecipes', function(source)
|
||||
return RecipeList.presses
|
||||
end)
|
||||
|
||||
------------- making powder
|
||||
RegisterServerEvent('md-drugs:server:makingrawxtc', function(num)
|
||||
local src = source
|
||||
@@ -180,7 +168,10 @@ RegisterServerEvent('md-drugs:server:makingrawxtc', function(num)
|
||||
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)
|
||||
|
||||
local function getColor(color)
|
||||
|
||||
@@ -1,2 +1,12 @@
|
||||
Newest Build: 4.0.0
|
||||
Build: 4.0.0
|
||||
- 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
|
||||