- add whippits :)

This commit is contained in:
Mustache Dom committed 2025-10-11 23:18:48 -07:00
1 parent ec5e4f0e15
commit 3ba3c5bc9d
33 files changed
+323 -85

No files matched your search

+77
View File
@@ -0,0 +1,77 @@
local prop = nil
local function animation(color)
local coords = GetEntityCoords(PlayerPedId())
ps.requestAnim('mp_player_intdrink')
ps.requestModel(color)
prop = CreateObject(GetHashKey(color), coords.x, coords.y, coords.z, true, true, true)
AttachEntityToEntity(prop, PlayerPedId(), GetPedBoneIndex(PlayerPedId(), 18905), 0.087000, -0.130001, 0.138999, 63.630001, 3.299881, -21.000000, true, true, false, true, 1, true)
TaskPlayAnim(PlayerPedId(), 'mp_player_intdrink', 'loop_bottle', 8.0, -8.0, -1, 49, 0, false, false, false)
if ps.progressbar('Inhaling Nitrous', 5000, false) then
ClearPedTasks(PlayerPedId())
DetachEntity(prop, true, true)
DeleteEntity(prop)
prop = nil
return true
else
ClearPedTasks(PlayerPedId())
DetachEntity(prop, true, true)
DeleteEntity(prop)
prop = nil
return false
end
end
local function blur(duration)
CreateThread(function()
TriggerScreenblurFadeIn(1000)
Wait(duration)
TriggerScreenblurFadeOut(1000)
end)
end
ps.registerCallback('md-drugs:client:useWhippit', function(color)
if animation(color) then
blur(30000)
return true
else
return false
end
end)
local function spawnShops()
local locations = ps.callback('md-drugs:server:getWhippitLocations')
for k, v in pairs(locations) do
ps.requestModel(v.ped)
local ped = CreatePed(5, GetHashKey(v.ped), v.loc.x, v.loc.y, v.loc.z, v.loc.w, true, true)
FreezeEntityPosition(ped, true)
SetEntityInvincible(ped, true)
SetBlockingOfNonTemporaryEvents(ped, true)
ps.entityTarget(ped, {
{
label = ps.lang('Whippit.targetShop'),
icon = 'fa-solid fa-cart-shopping',
action = function()
local menu = {}
local items = ps.callback('md-drugs:server:getwhippitShop')
for item, price in pairs (items) do
menu[#menu + 1] = {
title = ps.getLabel(item),
icon = ps.getImage(item),
description = '$' .. price,
action = function()
local amount = ps.input(ps.getLabel(item), {
{type = 'number', label = 'Amount', name = 'amount', min = 1, max = 100, default = 1}
})
if amount and amount[1] then
TriggerServerEvent('md-drugs:server:buyWhippitItem', k, item, amount[1])
end
end
}
end
ps.menu(ps.lang('Whippit.shopHeader'), ps.lang('Whippit.shopHeader'), menu)
end
},
})
end
end
spawnShops()
Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

+72
View File
@@ -2078,4 +2078,76 @@
image = "kitty_orange4.png" image = "kitty_orange4.png"
}, },
}, },
["blue_uninflated_balloon"] = {
label = 'Blue Uninflated Balloon',
description = "",
weight = 100,
stack = true,
close = true,
client = { image = 'blue_uninflated_balloon.png' }
},
["cracker"] = {
label = 'Cracker',
description = "",
weight = 100,
stack = true,
close = true,
client = { image = 'cracker.png' }
},
["green_uninflated_balloon"] = {
label = 'Green Uninflated Balloon',
description = "",
weight = 100,
stack = true,
close = true,
client = { image = 'green_uninflated_balloon.png' }
},
["orange_uninflated_balloon"] = {
label = 'Orange Uninflated Balloon',
description = "",
weight = 100,
stack = true,
close = true,
client = { image = 'orange_uninflated_balloon.png' }
},
["purple_uninflated_balloon"] = {
label = 'Purple Uninflated Balloon',
description = "",
weight = 100,
stack = true,
close = true,
client = { image = 'purple_uninflated_balloon.png' }
},
["red_uninflated_balloon"] = {
label = 'Red Uninflated Balloon',
description = "",
weight = 100,
stack = true,
close = true,
client = { image = 'red_uninflated_balloon.png' }
},
["whipped_cream_cannister"] = {
label = 'Whipped Cream Cannister',
description = "",
weight = 100,
stack = true,
close = true,
client = { image = 'whipped_cream_cannister.png' }
},
["white_uninflated_balloon"] = {
label = 'White Uninflated Balloon',
description = "",
weight = 100,
stack = true,
close = true,
client = { image = 'white_uninflated_balloon.png' }
},
["yellow_uninflated_balloon"] = {
label = 'Yellow Uninflated Balloon',
description = "",
weight = 100,
stack = true,
close = true,
client = { image = 'yellow_uninflated_balloon.png' }
},
``` ```
+11
View File
@@ -261,4 +261,15 @@
orange_cats2 = {name = "orange_cats2", label = "orange cats", weight = 100, type = "item", image = "kitty_orange2.png", unique = false, useable = true, shouldClose = true, combinable = nil, description = ""}, orange_cats2 = {name = "orange_cats2", label = "orange cats", weight = 100, type = "item", image = "kitty_orange2.png", unique = false, useable = true, shouldClose = true, combinable = nil, description = ""},
orange_cats3 = {name = "orange_cats3", label = "orange cats", weight = 100, type = "item", image = "kitty_orange3.png", unique = false, useable = true, shouldClose = true, combinable = nil, description = ""}, orange_cats3 = {name = "orange_cats3", label = "orange cats", weight = 100, type = "item", image = "kitty_orange3.png", unique = false, useable = true, shouldClose = true, combinable = nil, description = ""},
orange_cats4 = {name = "orange_cats4", label = "orange cats", weight = 100, type = "item", image = "kitty_orange4.png", unique = false, useable = true, shouldClose = true, combinable = nil, description = ""}, orange_cats4 = {name = "orange_cats4", label = "orange cats", weight = 100, type = "item", image = "kitty_orange4.png", unique = false, useable = true, shouldClose = true, combinable = nil, description = ""},
blue_uninflated_balloon = { name = 'blue_uninflated_balloon', label = 'Blue Uninflated Balloon', weight = 100, type = 'item', image = 'blue_uninflated_balloon.png', unique = false, useable = true, shouldClose = true, description = "" },
cracker = { name = 'cracker', label = 'Cracker', weight = 100, type = 'item', image = 'cracker.png', unique = false, useable = true, shouldClose = true, description = "" },
green_uninflated_balloon = { name = 'green_uninflated_balloon', label = 'Green Uninflated Balloon', weight = 100, type = 'item', image = 'green_uninflated_balloon.png', unique = false, useable = true, shouldClose = true, description = "" },
orange_uninflated_balloon = { name = 'orange_uninflated_balloon', label = 'Orange Uninflated Balloon', weight = 100, type = 'item', image = 'orange_uninflated_balloon.png', unique = false, useable = true, shouldClose = true, description = "" },
purple_uninflated_balloon = { name = 'purple_uninflated_balloon', label = 'Purple Uninflated Balloon', weight = 100, type = 'item', image = 'purple_uninflated_balloon.png', unique = false, useable = true, shouldClose = true, description = "" },
red_uninflated_balloon = { name = 'red_uninflated_balloon', label = 'Red Uninflated Balloon', weight = 100, type = 'item', image = 'red_uninflated_balloon.png', unique = false, useable = true, shouldClose = true, description = "" },
whipped_cream_cannister = { name = 'whipped_cream_cannister', label = 'Whipped Cream Cannister', weight = 100, type = 'item', image = 'whipped_cream_cannister.png', unique = false, useable = true, shouldClose = true, description = "" },
white_uninflated_balloon = { name = 'white_uninflated_balloon', label = 'White Uninflated Balloon', weight = 100, type = 'item', image = 'white_uninflated_balloon.png', unique = false, useable = true, shouldClose = true, description = "" },
yellow_uninflated_balloon = { name = 'yellow_uninflated_balloon', label = 'Yellow Uninflated Balloon', weight = 100, type = 'item', image = 'yellow_uninflated_balloon.png', unique = false, useable = true, shouldClose = true, description = "" },
``` ```
+6 -1
View File
@@ -258,5 +258,10 @@ Lang.xtc = {
Lang.merchant = { Lang.merchant = {
targetOpen = 'Open merchant menu, LET’S GOOOO!', targetOpen = 'Open merchant menu, LET’S GOOOO!',
} }
Lang.Whippit = {
targetShop = 'Open Whippit Shop, PARTY TIME!',
needBalloon = 'Need a balloon for this, HYPE!',
needCanister = 'Need a canister for this, WOO!',
shopHeader = 'Whippit Shop, LET’S GO!',
}
return Lang return Lang
+6 -1
View File
@@ -259,5 +259,10 @@ Lang.xtc = {
Lang.merchant = { Lang.merchant = {
targetOpen = 'Otevřít obchodní nabídku', targetOpen = 'Otevřít obchodní nabídku',
} }
Lang.Whippit = {
targetShop = 'Otevřít obchod Whippit',
needBalloon = 'Potřebujete balón pro tuto akci',
needCanister = 'Potřebujete kanister pro tuto akci',
shopHeader = 'Obchod Whippit',
}
return Lang return Lang
+6 -1
View File
@@ -259,5 +259,10 @@ Lang.xtc = {
Lang.merchant = { Lang.merchant = {
targetOpen = 'Händlermenü öffnen', targetOpen = 'Händlermenü öffnen',
} }
Lang.Whippit = {
targetShop = 'Whippit Shop öffnen',
needBalloon = 'Du brauchst einen Ballon für diese Aktion',
needCanister = 'Du brauchst einen Kanister für diese Aktion',
shopHeader = 'Whippit Shop',
}
return Lang return Lang
+6 -1
View File
@@ -258,5 +258,10 @@ Lang.xtc = {
Lang.merchant = { Lang.merchant = {
targetOpen = 'Open merchant menu' targetOpen = 'Open merchant menu'
} }
Lang.Whippit = {
targetShop = 'Open Whippit Shop',
needBalloon = 'You Need A Balloon For This',
needCanister = 'You Need A Canister For This',
shopHeader = 'Whippit Shop'
}
return Lang return Lang
+7
View File
@@ -260,4 +260,11 @@ Lang.merchant = {
targetOpen = 'Open Merchant Menu', targetOpen = 'Open Merchant Menu',
} }
Lang.Whippit = {
targetShop = 'Open Whippit Shop',
needBalloon = 'You Need A Balloon For This',
needCanister = 'You Need A Canister For This',
shopHeader = 'Whippit Shop',
}
return Lang return Lang
+7
View File
@@ -260,4 +260,11 @@ Lang.merchant = {
targetOpen = 'Abrir menú de comerciante', targetOpen = 'Abrir menú de comerciante',
} }
Lang.Whippit = {
targetShop = 'Abrir tienda Whippit',
needBalloon = 'Necesitas un globo para esto',
needCanister = 'Necesitas un bote para esto',
shopHeader = 'Tienda Whippit',
}
return Lang return Lang
+6
View File
@@ -260,4 +260,10 @@ Lang.merchant = {
targetOpen = 'Ouvrir le menu du marchand', targetOpen = 'Ouvrir le menu du marchand',
} }
Lang.Whippit = {
targetShop = 'Ouvrir la boutique Whippit',
needBalloon = 'Vous avez besoin d’un ballon pour ça',
needCanister = 'Vous avez besoin d’un bidon pour ça',
shopHeader = 'Boutique Whippit',
}
return Lang return Lang
+6
View File
@@ -260,4 +260,10 @@ Lang.merchant = {
targetOpen = 'Openin da merchant menu', targetOpen = 'Openin da merchant menu',
} }
Lang.Whippit = {
targetShop = 'Open Whippit Shop',
needBalloon = 'Yousa needin a balloon for dis',
needCanister = 'Yousa needin a canister for dis',
shopHeader = 'Whippit Shop',
}
return Lang return Lang
+6 -1
View File
@@ -259,5 +259,10 @@ Lang.xtc = {
Lang.merchant = { Lang.merchant = {
targetOpen = 'merchant mIch poSmoH', targetOpen = 'merchant mIch poSmoH',
} }
Lang.Whippit = {
targetShop = 'Whippit Shop poSmoH',
needBalloon = 'DochvamvaD balloon DaHutlh',
needCanister = 'DochvamvaD canister DaHutlh',
shopHeader = 'Whippit Shop',
}
return Lang return Lang
+6
View File
@@ -259,5 +259,11 @@ Lang.xtc = {
Lang.merchant = { Lang.merchant = {
targetOpen = 'Open merchant menu, asshole', targetOpen = 'Open merchant menu, asshole',
} }
Lang.Whippit = {
targetShop = 'Open Whippit Shop',
needBalloon = 'You need a balloon for this, dumbass',
needCanister = 'You need a canister for this, moron',
shopHeader = 'Whippit Shop',
}
return Lang return Lang
+6
View File
@@ -260,4 +260,10 @@ Lang.merchant = {
targetOpen = 'Handelaarsmenu openen', targetOpen = 'Handelaarsmenu openen',
} }
Lang.Whippit = {
targetShop = 'Whippit-winkel openen',
needBalloon = 'Je hebt een ballon nodig voor dit proces',
needCanister = 'Je hebt een kanister nodig voor dit proces',
shopHeader = 'Whippit-winkel',
}
return Lang return Lang
+6
View File
@@ -260,4 +260,10 @@ Lang.merchant = {
targetOpen = 'Openyay ErchantMay EnuMay', targetOpen = 'Openyay ErchantMay EnuMay',
} }
Lang.Whippit = {
targetShop = 'Openyay HippitWay OpShay',
needBalloon = 'ouYay Eednay Ayay AlloonBay Orfay isThay',
needCanister = 'ouYay Eednay Ayay AnisterCay Orfay isThay',
shopHeader = 'HippitWay OpShay',
}
return Lang return Lang
+6
View File
@@ -260,4 +260,10 @@ Lang.merchant = {
targetOpen = 'Open the trader’s menu', targetOpen = 'Open the trader’s menu',
} }
Lang.Whippit = {
targetShop = 'Open Whippit Shop',
needBalloon = 'Ye need a balloon fer this, matey',
needCanister = 'Ye need a canister fer this, swabbie',
shopHeader = 'Whippit Shop',
}
return Lang return Lang
+6 -1
View File
@@ -259,5 +259,10 @@ Lang.xtc = {
Lang.merchant = { Lang.merchant = {
targetOpen = 'Abrir menu do comerciante', targetOpen = 'Abrir menu do comerciante',
} }
Lang.Whippit = {
targetShop = 'Abrir loja Whippit',
needBalloon = 'Você precisa de um balão para isso',
needCanister = 'Você precisa de um recipiente para isso',
shopHeader = 'Loja Whippit',
}
return Lang return Lang
+6
View File
@@ -260,4 +260,10 @@ Lang.merchant = {
targetOpen = 'Tüccar menüsünü aç', targetOpen = 'Tüccar menüsünü aç',
} }
Lang.Whippit = {
targetShop = 'Whippit Dükkanını Aç',
needBalloon = 'Bunun için bir balona ihtiyacın var',
needCanister = 'Bunun için bir bidona ihtiyacın var',
shopHeader = 'Whippit Dükkanı',
}
return Lang return Lang
+7
View File
@@ -257,4 +257,11 @@ Lang.xtc = {
Lang.merchant = { Lang.merchant = {
targetOpen = 'Open Wopen Store', targetOpen = 'Open Wopen Store',
} }
Lang.Whippit = {
targetShop = 'Open Whippit Shop',
needBalloon = 'You need a balloon for this, cutie! 🎈',
needCanister = 'You need a canister for this, bby! 🛢️',
shopHeader = 'Whippit Shop 🥳',
}
return Lang return Lang
+7
View File
@@ -257,4 +257,11 @@ Lang.merchant = {
targetOpen = 'Rraa raw!', targetOpen = 'Rraa raw!',
} }
Lang.Whippit = {
targetShop = 'Rraa Whippit!',
needBalloon = 'Rraa balloon!',
needCanister = 'Rraa canister!',
shopHeader = 'Whippit Rraa!',
}
return Lang return Lang
+4 -1
View File
@@ -19,7 +19,7 @@ A fully customizable, immersive drug system for FiveM servers.
- **Beta Testers:** Your invaluable feedback made this possible. - **Beta Testers:** Your invaluable feedback made this possible.
- **[1of1 Servers](https://1of1servers.com/ ):** Top-notch hosting and support. Join their [Discord](https://discord.gg/1of1servers ). - **[1of1 Servers](https://1of1servers.com/ ):** Top-notch hosting and support. Join their [Discord](https://discord.gg/1of1servers ).
- **[Kamaryn](https://discord.gg/KPRmZqFS ):** For the [installation guide video](https://youtu.be/zvuYnUfrqaA?si=FGJuBO5krZMC14Nd). - **[Kamaryn](https://discord.gg/KPRmZqFS ):** For the [installation guide video](https://youtu.be/zvuYnUfrqaA?si=FGJuBO5krZMC14Nd).
- **[Athena](https://discord.gg/mam8Nmg49d):** For the Balloon props :)
## 🎬 Preview ## 🎬 Preview
🎥 **[Watch Full Preview Video](https://www.youtube.com/watch?v=I_x7_oz_SAU)** 🎥 **[Watch Full Preview Video](https://www.youtube.com/watch?v=I_x7_oz_SAU)**
@@ -164,3 +164,6 @@ A fully customizable, immersive drug system for FiveM servers.
- Run SQL - Run SQL
- if you dont know how, click this image below - if you dont know how, click this image below
- [![YouTube Video](https://img.youtube.com/vi/8QpFOluK_xo/hqdefault.jpg)](https://www.youtube.com/watch?v=8QpFOluK_xo) - [![YouTube Video](https://img.youtube.com/vi/8QpFOluK_xo/hqdefault.jpg)](https://www.youtube.com/watch?v=8QpFOluK_xo)
### STEP 6
- If you want whippits, take the folder `ate_balloon` and place that folder into the standalone folder like it was another script :) (or a [props] if you got it)
-58
View File
@@ -1,58 +0,0 @@
local paintLocs = {
stores = {
{loc = vector4(2675.91, 3499.18, 53.3, 334.3), gang = ""},
}
}
local itemList = {
red_paint = 50,
blue_paint = 50,
yellow_paint = 50,
green_paint = 50,
black_paint = 50,
paper_bag = 2,
}
ps.registerCallback('md-drugs:server:GetPaintLocs', function(source)
return paintLocs
end)
ps.registerCallback('md-drugs:server:GetPaintItems', function(source)
return itemList
end)
RegisterNetEvent("md-drugs:server:purchasePaint", function(loc, item)
local src = source
if not ps.checkDistance(src, paintLocs.stores[loc].loc, 10) then
ps.notify(src, ps.lang('Catches.notIn'), "error")
return
end
if not itemList[item] then
ps.notify(src, ps.lang('Catches.invalidItem'), "error")
return
end
if ps.removeMoney(src, 'cash', itemList[item]) then
ps.addItem(src, item, 1)
else
ps.notify(src, ps.lang('Catches.notEnoughMoney'), "error")
end
end)
for k, v in pairs (itemList) do
if k == "paper_bag" then goto continue end
ps.createUseable(k, function(source, item)
local src = source
if ps.hasItem(src, "paper_bag", 1) then
if ps.removeItem(src, k, 1) and ps.removeItem(src, "paper_bag", 1) then
ps.addItem(src, "painted_"..k, 1)
ps.notify(src, ps.lang('paintHuff.used', {k}), 'success')
else
ps.notify(src, ps.lang('Catches.invalidItem'), "error")
end
else
ps.notify(src, ps.lang('paintHuff.noBag'), "error")
end
-- TODO: add usage here
end)
::continue::
end
+52 -20
View File
@@ -1,37 +1,69 @@
local itemCraft = { local itemCraft = {
cracker = { cracker = {
'blue_uninflated_balloon', {color = 'blue', item = 'blue_uninflated_balloon'},
'green_uninflated_balloon', {color = 'green', item = 'green_uninflated_balloon'},
'orange_uninflated_balloon', {color = 'orange', item = 'orange_uninflated_balloon'},
'purple_uninflated_balloon', {color = 'purple', item = 'purple_uninflated_balloon'},
'red_uninflated_balloon', {color = 'red', item = 'red_uninflated_balloon'},
'white_uninflated_balloon', {color = 'white', item = 'white_uninflated_balloon'},
'yellow_uninflated_balloon' {color = 'yellow', item = 'yellow_uninflated_balloon'}
} }
} }
local store = {
{loc =vector4(1695.47, 4872.98, 42.16, 288.86), ped = 'ig_priest' },
}
ps.registerCallback('md-drugs:server:getWhippitLocations', function(source)
return store
end)
local itemShop = {
blue_uninflated_balloon = 5,
green_uninflated_balloon = 5,
orange_uninflated_balloon = 5,
purple_uninflated_balloon = 5,
red_uninflated_balloon = 5,
white_uninflated_balloon = 5,
yellow_uninflated_balloon = 5,
cracker = 500,
whipped_cream_cannister = 10
}
ps.registerCallback('md-drugs:server:getwhippitShop', function(source)
return itemShop
end)
RegisterServerEvent('md-drugs:server:buyWhippitItem', function(loc, item,amount)
local src = source
if not ps.checkDistance(src, store[loc].loc, 3.0) then return end
if not itemShop[item] then return end
local price = itemShop[item] * amount
if not ps.removeMoney(src, 'cash', price, 'whippit-shop') then
return ps.notify(src, ps.lang('Whippit.notEnoughMoney', price), 'error')
end
ps.addItem(src, item, amount)
end)
ps.createUseable('cracker', function(source) ps.createUseable('cracker', function(source)
local src = source local src = source
if not itemCraft['cracker'] then return end if not ps.hasItem(src, 'cracker', 1) then return end
if not ps.hasItem(src, 'cracker') then return end if not ps.hasItem(src, 'whipped_cream_cannister', 1) then return end
if not ps.hasItem(src, 'whipped_cream_cannister') then return end local balloonItem, balloonColor = nil, nil
local hasBalloon = nil for _, balloon in pairs(itemCraft['cracker']) do
for _, balloon in pairs(itemCraft['cracker'].optionalColors) do if ps.hasItem(src, balloon.item, 1) then
if ps.getItemCount(src, balloon) >= 1 then balloonItem = balloon.item
hasBalloon = balloon balloonColor = 'ate_balloon_' .. balloon.color
break break
end end
end end
if not hasBalloon then if not balloonItem then
return ps.notify(src, 'You do not have a balloon to use the cracker on', 'error') return ps.notify(src, ps.lang('Whippit.needBalloon'), 'error')
end end
if not ps.removeItem(src, 'whipped_cream_cannister', 1) then if not ps.removeItem(src, 'whipped_cream_cannister', 1) then
return ps.notify(src, 'Failed to remove whipped cream canister', 'error') return ps.notify(src, ps.lang('Whippit.needCanister'), 'error')
end end
if not ps.removeItem(src, hasBalloon, 1) then if not ps.removeItem(src, balloonItem, 1) then
return ps.notify(src, 'Failed to remove balloon', 'error') return ps.warn(src, 'Failed to remove balloon', 'error')
end end
--TODO: Add animation callback ps.callback('md-drugs:client:useWhippit', src, balloonColor)
end) end)
+1
View File
@@ -49,6 +49,7 @@ Config.Drugs = { -- want a drug turn on? keep it true, want it turned off, mark
TravellingMerchant = true, TravellingMerchant = true,
weed = true, weed = true,
wholesale = false, wholesale = false,
whippit = true,
xtc = true, xtc = true,
} }