Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

 n/a #45

Open
wants to merge 31 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
09ffc76
Replace mysql-async with ghmattimysql
kibook Aug 11, 2021
75eeafc
Add animal emotes menu
kibook Aug 11, 2021
85f2d5a
Correct emote menu item offset
kibook Aug 16, 2021
d53cab5
Add animal emotes menu
kibook Aug 17, 2021
47312cd
Add new emotes and improve existing ones
kibook Aug 17, 2021
cac0b24
Add comment regarding optional ghmattimysql dep
kibook Aug 17, 2021
e43f053
Update AnimationList.lua
TayMcKenzieNZ Aug 27, 2021
e46bae6
Delete anim@amb@casino@bar@special_peds@lauren@01a@[email protected]
TayMcKenzieNZ Aug 27, 2021
ad2a09f
Delete stream/CasinoEmotes directory
TayMcKenzieNZ Aug 27, 2021
facb2a8
Add files via upload
TayMcKenzieNZ Aug 27, 2021
3b4f73d
Clean up changes
kibook Aug 27, 2021
ac05f73
Removed streamed files
kibook Aug 27, 2021
ffa09e8
Rename duplicate animation
kibook Aug 27, 2021
c5ae084
Add animal emotes to /e command
kibook Aug 27, 2021
8f27117
Merge branch 'master' into TayMcKenzieNZ-DPEmotes
kibook Aug 27, 2021
ab423f3
Merge pull request #1 from TayMcKenzieNZ/TayMcKenzieNZ-DPEmotes
kibook Aug 27, 2021
3d587e1
Added hitchhiking and weight lifting animations
TayMcKenzieNZ Aug 29, 2021
4e6126d
Added Sign Carrying & Cone Head Animations
TayMcKenzieNZ Aug 29, 2021
15d2942
Updated Animal Emotes
TayMcKenzieNZ Sep 1, 2021
ecc70e9
Update AnimationList
TayMcKenzieNZ Sep 6, 2021
0d9b38e
Added "Smoke Weed" scenario for female peds
TayMcKenzieNZ Sep 6, 2021
83efaf1
Added Food Carrying Animations
TayMcKenzieNZ Sep 7, 2021
61ac586
Renamed Food Carrying Emotes & Fixed Ordering
TayMcKenzieNZ Sep 7, 2021
a00cc5d
Fixed Tool Box & Conehead Emotes, Added Tool Box 2
TayMcKenzieNZ Sep 8, 2021
a3f9d43
Update AnimationList.lua
TayMcKenzieNZ Sep 8, 2021
fb13f87
Added Graffiti Animations
TayMcKenzieNZ Sep 12, 2021
7facabb
Added /e beans
TayMcKenzieNZ Sep 20, 2021
bae2347
Fix indentation
kibook Sep 20, 2021
07f550f
Merge pull request #3 from TayMcKenzieNZ/new-emotes
kibook Sep 20, 2021
71bd10a
Add new emotes
kibook Oct 15, 2021
7dbc9b8
Replace ghmattimysql with oxmysql
kibook Nov 29, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3,357 changes: 2,117 additions & 1,240 deletions Client/AnimationList.lua

Large diffs are not rendered by default.

8 changes: 7 additions & 1 deletion Client/Emote.lua
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,10 @@ function EmoteMenuStart(args, hard)
if DP.Dances[name] ~= nil then
if OnEmotePlay(DP.Dances[name]) then end
end
elseif etype == "animals" then
if DP.AnimalEmotes[name] ~= nil then
if OnEmotePlay(DP.AnimalEmotes[name]) then end
end
elseif etype == "props" then
if DP.PropEmotes[name] ~= nil then
if OnEmotePlay(DP.PropEmotes[name]) then end
Expand Down Expand Up @@ -210,6 +214,8 @@ function EmoteCommandStart(source, args, raw)
if OnEmotePlay(DP.Emotes[name]) then end return
elseif DP.Dances[name] ~= nil then
if OnEmotePlay(DP.Dances[name]) then end return
elseif DP.AnimalEmotes[name] ~= nil then
if OnEmotePlay(DP.AnimalEmotes[name]) then end return
elseif DP.PropEmotes[name] ~= nil then
if OnEmotePlay(DP.PropEmotes[name]) then end return
else
Expand Down Expand Up @@ -422,4 +428,4 @@ function OnEmotePlay(EmoteName)
end
end
return true
end
end
16 changes: 15 additions & 1 deletion Client/EmoteMenu.lua
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ local EmoteTable = {}
local FavEmoteTable = {}
local KeyEmoteTable = {}
local DanceTable = {}
local AnimalTable = {}
local PropETable = {}
local WalkTable = {}
local FaceTable = {}
Expand Down Expand Up @@ -64,9 +65,11 @@ lang = Config.MenuLanguage
function AddEmoteMenu(menu)
local submenu = _menuPool:AddSubMenu(menu, Config.Languages[lang]['emotes'], "", "", Menuthing, Menuthing)
local dancemenu = _menuPool:AddSubMenu(submenu, Config.Languages[lang]['danceemotes'], "", "", Menuthing, Menuthing)
local animalmenu = _menuPool:AddSubMenu(submenu, Config.Languages[lang]['animalemotes'], "", "", Menuthing, Menuthing)
local propmenu = _menuPool:AddSubMenu(submenu, Config.Languages[lang]['propemotes'], "", "", Menuthing, Menuthing)
table.insert(EmoteTable, Config.Languages[lang]['danceemotes'])
table.insert(EmoteTable, Config.Languages[lang]['danceemotes'])
table.insert(EmoteTable, Config.Languages[lang]['animalemotes'])

if Config.SharedEmotesEnabled then
sharemenu = _menuPool:AddSubMenu(submenu, Config.Languages[lang]['shareemotes'], Config.Languages[lang]['shareemotesinfo'], "", Menuthing, Menuthing)
Expand Down Expand Up @@ -113,6 +116,13 @@ function AddEmoteMenu(menu)
table.insert(DanceTable, a)
end

for a,b in pairsByKeys(DP.AnimalEmotes) do
x,y,z = table.unpack(b)
animalitem = NativeUI.CreateItem(z, "/e ("..a..")")
animalmenu:AddItem(animalitem)
table.insert(AnimalTable, a)
end

if Config.SharedEmotesEnabled then
for a,b in pairsByKeys(DP.Shared) do
x,y,z,otheremotename = table.unpack(b)
Expand Down Expand Up @@ -155,6 +165,10 @@ function AddEmoteMenu(menu)
EmoteMenuStart(DanceTable[index], "dances")
end

animalmenu.OnItemSelect = function(sender, item, index)
EmoteMenuStart(AnimalTable[index], "animals")
end

if Config.SharedEmotesEnabled then
sharemenu.OnItemSelect = function(sender, item, index)
if ShareTable[index] ~= 'none' then
Expand Down Expand Up @@ -309,4 +323,4 @@ end)
RegisterNetEvent("dp:RecieveMenu") -- For opening the emote menu from another resource.
AddEventHandler("dp:RecieveMenu", function()
OpenEmoteMenu()
end)
end)
3 changes: 2 additions & 1 deletion Config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ Config.Languages = {
['en'] = {
['emotes'] = 'Emotes',
['danceemotes'] = "🕺 Dance Emotes",
['animalemotes'] = "🐩 Animal Emotes",
['propemotes'] = "📦 Prop Emotes",
['favoriteemotes'] = "🌟 Favorite",
['favoriteinfo'] = "Select an emote here to set it as your favorite.",
Expand Down Expand Up @@ -283,4 +284,4 @@ Config.Languages = {
['keybinds'] = "🔢 Keybinds",
['keybindsinfo'] = "Utilizar"
}
}
}
50 changes: 37 additions & 13 deletions Server/Server.lua
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,11 @@ end)
-- Keybinding --------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------

if Config.SqlKeybinding then
MySQL.ready(function()

local function addKeybindEventHandlers()
RegisterServerEvent("dp:ServerKeybindExist")
AddEventHandler('dp:ServerKeybindExist', function()
local src = source local srcid = GetPlayerIdentifier(source)
MySQL.Async.fetchAll('SELECT * FROM dpkeybinds WHERE `id`=@id;', {id = srcid}, function(dpkeybinds)
exports.oxmysql:execute('SELECT * FROM dpkeybinds WHERE `id`=@id;', {id = srcid}, function(dpkeybinds)
if dpkeybinds[1] then
TriggerClientEvent("dp:ClientKeybindExist", src, true)
else
Expand All @@ -39,14 +37,14 @@ if Config.SqlKeybinding then
RegisterServerEvent("dp:ServerKeybindCreate")
AddEventHandler("dp:ServerKeybindCreate", function()
local src = source local srcid = GetPlayerIdentifier(source)
MySQL.Async.execute('INSERT INTO dpkeybinds (`id`, `keybind1`, `emote1`, `keybind2`, `emote2`, `keybind3`, `emote3`, `keybind4`, `emote4`, `keybind5`, `emote5`, `keybind6`, `emote6`) VALUES (@id, @keybind1, @emote1, @keybind2, @emote2, @keybind3, @emote3, @keybind4, @emote4, @keybind5, @emote5, @keybind6, @emote6);',
exports.oxmysql:execute('INSERT INTO dpkeybinds (`id`, `keybind1`, `emote1`, `keybind2`, `emote2`, `keybind3`, `emote3`, `keybind4`, `emote4`, `keybind5`, `emote5`, `keybind6`, `emote6`) VALUES (@id, @keybind1, @emote1, @keybind2, @emote2, @keybind3, @emote3, @keybind4, @emote4, @keybind5, @emote5, @keybind6, @emote6);',
{id = srcid, keybind1 = "num4", emote1 = "", keybind2 = "num5", emote2 = "", keybind3 = "num6", emote3 = "", keybind4 = "num7", emote4 = "", keybind5 = "num8", emote5 = "", keybind6 = "num9", emote6 = ""}, function(created) print("[dp] ^2"..GetPlayerName(src).."^7 got created!") TriggerClientEvent("dp:ClientKeybindGet", src, "num4", "", "num5", "", "num6", "", "num7", "", "num8", "", "num8", "") end)
end)

RegisterServerEvent("dp:ServerKeybindGrab")
AddEventHandler("dp:ServerKeybindGrab", function()
local src = source local srcid = GetPlayerIdentifier(source)
MySQL.Async.fetchAll('SELECT keybind1, emote1, keybind2, emote2, keybind3, emote3, keybind4, emote4, keybind5, emote5, keybind6, emote6 FROM `dpkeybinds` WHERE `id` = @id',
exports.oxmysql:execute('SELECT keybind1, emote1, keybind2, emote2, keybind3, emote3, keybind4, emote4, keybind5, emote5, keybind6, emote6 FROM `dpkeybinds` WHERE `id` = @id',
{['@id'] = srcid}, function(kb)
if kb[1].keybind1 ~= nil then
TriggerClientEvent("dp:ClientKeybindGet", src, kb[1].keybind1, kb[1].emote1, kb[1].keybind2, kb[1].emote2, kb[1].keybind3, kb[1].emote3, kb[1].keybind4, kb[1].emote4, kb[1].keybind5, kb[1].emote5, kb[1].keybind6, kb[1].emote6)
Expand All @@ -61,20 +59,46 @@ if Config.SqlKeybinding then
local src = source local myid = GetPlayerIdentifier(source)
if key == "num4" then chosenk = "keybind1" elseif key == "num5" then chosenk = "keybind2" elseif key == "num6" then chosenk = "keybind3" elseif key == "num7" then chosenk = "keybind4" elseif key == "num8" then chosenk = "keybind5" elseif key == "num9" then chosenk = "keybind6" end
if chosenk == "keybind1" then
MySQL.Async.execute("UPDATE dpkeybinds SET emote1=@emote WHERE id=@id", {id = myid, emote = emote}, function() TriggerClientEvent("dp:ClientKeybindGetOne", src, key, emote) end)
exports.oxmysql:execute("UPDATE dpkeybinds SET emote1=@emote WHERE id=@id", {id = myid, emote = emote}, function() TriggerClientEvent("dp:ClientKeybindGetOne", src, key, emote) end)
elseif chosenk == "keybind2" then
MySQL.Async.execute("UPDATE dpkeybinds SET emote2=@emote WHERE id=@id", {id = myid, emote = emote}, function() TriggerClientEvent("dp:ClientKeybindGetOne", src, key, emote) end)
exports.oxmysql:execute("UPDATE dpkeybinds SET emote2=@emote WHERE id=@id", {id = myid, emote = emote}, function() TriggerClientEvent("dp:ClientKeybindGetOne", src, key, emote) end)
elseif chosenk == "keybind3" then
MySQL.Async.execute("UPDATE dpkeybinds SET emote3=@emote WHERE id=@id", {id = myid, emote = emote}, function() TriggerClientEvent("dp:ClientKeybindGetOne", src, key, emote) end)
exports.oxmysql:execute("UPDATE dpkeybinds SET emote3=@emote WHERE id=@id", {id = myid, emote = emote}, function() TriggerClientEvent("dp:ClientKeybindGetOne", src, key, emote) end)
elseif chosenk == "keybind4" then
MySQL.Async.execute("UPDATE dpkeybinds SET emote4=@emote WHERE id=@id", {id = myid, emote = emote}, function() TriggerClientEvent("dp:ClientKeybindGetOne", src, key, emote) end)
exports.oxmysql:execute("UPDATE dpkeybinds SET emote4=@emote WHERE id=@id", {id = myid, emote = emote}, function() TriggerClientEvent("dp:ClientKeybindGetOne", src, key, emote) end)
elseif chosenk == "keybind5" then
MySQL.Async.execute("UPDATE dpkeybinds SET emote5=@emote WHERE id=@id", {id = myid, emote = emote}, function() TriggerClientEvent("dp:ClientKeybindGetOne", src, key, emote) end)
exports.oxmysql:execute("UPDATE dpkeybinds SET emote5=@emote WHERE id=@id", {id = myid, emote = emote}, function() TriggerClientEvent("dp:ClientKeybindGetOne", src, key, emote) end)
elseif chosenk == "keybind6" then
MySQL.Async.execute("UPDATE dpkeybinds SET emote6=@emote WHERE id=@id", {id = myid, emote = emote}, function() TriggerClientEvent("dp:ClientKeybindGetOne", src, key, emote) end)
exports.oxmysql:execute("UPDATE dpkeybinds SET emote6=@emote WHERE id=@id", {id = myid, emote = emote}, function() TriggerClientEvent("dp:ClientKeybindGetOne", src, key, emote) end)
end
end)
end)
end

if Config.SqlKeybinding then
exports.oxmysql:execute(
[[
CREATE TABLE IF NOT EXISTS `dpkeybinds` (
`id` varchar(50) NULL DEFAULT NULL,
`keybind1` varchar(50) NULL DEFAULT "num4",
`emote1` varchar(255) NULL DEFAULT "",
`keybind2` varchar(50) NULL DEFAULT "num5",
`emote2` varchar(255) NULL DEFAULT "",
`keybind3` varchar(50) NULL DEFAULT "num6",
`emote3` varchar(255) NULL DEFAULT "",
`keybind4` varchar(50) NULL DEFAULT "num7",
`emote4` varchar(255) NULL DEFAULT "",
`keybind5` varchar(50) NULL DEFAULT "num8",
`emote5` varchar(255) NULL DEFAULT "",
`keybind6` varchar(50) NULL DEFAULT "num9",
`emote6` varchar(255) NULL DEFAULT ""
) ENGINE=InnoDB COLLATE=latin1_swedish_ci;
]], {}, function(success)
if success then
addKeybindEventHandlers()
else
print("[dp] ^3Error connecting to DB^7")
end
end)
else
print("[dp] ^3Sql Keybinding^7 is turned ^1off^7, if you want to enable /emotebind, import dpkeybinding.sql and set ^3SqlKeybinding = ^2true^7 in config.lua.")
end
16 changes: 0 additions & 16 deletions dpkeybinds.sql

This file was deleted.

4 changes: 3 additions & 1 deletion fxmanifest.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ fx_version 'adamant'

game 'gta5'

-- Comment this out if you don't want to use the SQL keybinds
dependency 'oxmysql'

client_scripts {
'NativeUI.lua',
'Config.lua',
Expand All @@ -10,6 +13,5 @@ client_scripts {

server_scripts {
'Config.lua',
'@mysql-async/lib/MySQL.lua',
'Server/*.lua'
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed stream/CasinoEmotes/anim@amb@[email protected]
Binary file not shown.
Binary file removed stream/CasinoEmotes/anim@amb@[email protected]
Binary file not shown.
Binary file removed stream/CasinoEmotes/anim@[email protected]
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed stream/CasinoEmotes/anim@[email protected]
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed stream/CasinoEmotes/anim@[email protected]
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.