mirror of
https://github.com/jimathy/rpemotes.git
synced 2026-04-05 09:03:50 -04:00
Major Update - Credits To Scully 🙂
* Major Update - Convert to RPEmotes. - Add support for colors on particles. - Removed an unusual check when using the pay emote function. - Added config option to change cancel key. - Changed all keys to lowercase to prevent the "key no worky" bug. - Changed the open key to f4. - Improved and cleaner version check. - Updated events as the usage was deprecated. - Added a check to remove any unsupported emotes such as ones unsupported from game builds and improved the adult animation removal. * Fix * Changes * Update README.md
This commit is contained in:
46
README.md
46
README.md
@@ -1,6 +1,6 @@
|
|||||||
# DpEmotes 🏋️
|
# RpEmotes 🏋️
|
||||||
|
|
||||||
DpEmotes is a Community driven FiveM menu allowing players to express themselves in roleplay with custom animations, countless facial expressions, walkstyles and props, originally created by [DullPear](https://github.com/andristum/dpemotes).
|
RpEmotes is a community driven FiveM emote menu allowing players to express themselves in roleplay with custom animations, countless facial expressions, walkstyles and props, originally created by [DullPear](https://github.com/andristum/dpemotes).
|
||||||
|
|
||||||
<img src="https://forum.cfx.re/uploads/default/original/4X/7/1/b/71b1b02319fd6b8d20f64d6a8a90f4f1ccaf5dfa.png" width="700">
|
<img src="https://forum.cfx.re/uploads/default/original/4X/7/1/b/71b1b02319fd6b8d20f64d6a8a90f4f1ccaf5dfa.png" width="700">
|
||||||
|
|
||||||
@@ -52,11 +52,11 @@ DpEmotes is a Community driven FiveM menu allowing players to express themselves
|
|||||||
|
|
||||||
* Swedish 🇸🇪
|
* Swedish 🇸🇪
|
||||||
|
|
||||||
All languages were translate or contributed by you, the community with the odd exception of using Google Translate
|
All languages were translated or contributed by you, the community with the odd exception of using Google Translate.
|
||||||
|
|
||||||
If you happen to find any incorrect translations or would like to add more languages, please feel free to make a Pull Request with the correct / additional translations, or join our discord.
|
If you happen to find any incorrect translations or would like to add more languages, please feel free to make a pull request with the correct / additional translations or join our discord.
|
||||||
|
|
||||||
Languages can be selected and/or added in the config.lua.
|
Languages can be selected and / or added in the config.lua.
|
||||||
|
|
||||||
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
@@ -80,7 +80,7 @@ Languages can be selected and/or added in the config.lua.
|
|||||||
|
|
||||||
- Further support for shared and couple poses / animations 👫
|
- Further support for shared and couple poses / animations 👫
|
||||||
|
|
||||||
- Easily convert Menyoo to dpemotes 🔄
|
- Easily convert Menyoo to rpemotes 🔄
|
||||||
|
|
||||||
- Hide Adult Emotes 🔞
|
- Hide Adult Emotes 🔞
|
||||||
|
|
||||||
@@ -91,25 +91,25 @@ Languages can be selected and/or added in the config.lua.
|
|||||||
- Standalone exports to play anim, cancel anim and block (or not) the cancel key
|
- Standalone exports to play anim, cancel anim and block (or not) the cancel key
|
||||||
|
|
||||||
```lua
|
```lua
|
||||||
exports["dpemotes"]:EmoteCommandStart(emoteName, textureVariation)
|
exports["rpemotes"]:EmoteCommandStart(emoteName, textureVariation)
|
||||||
exports["dpemotes"]:EmoteCancel(forceCancel) – forceCancel is optional
|
exports["rpemotes"]:EmoteCancel(forceCancel) – forceCancel is optional
|
||||||
exports["dpemotes"]:CanCancelEmote(state)
|
exports["rpemotes"]:CanCancelEmote(state)
|
||||||
```
|
```
|
||||||
|
|
||||||
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
# Menu Keybind 🎛️
|
# Menu Keybind 🎛️
|
||||||
|
|
||||||
The keybind uses RegisterKeyMapping. By default, the server configured keybind in the *initial* config.lua will be the default key, however once the keybind is set for a user, it'll stay with this new value. Editing the config keybind will change it for new players only.
|
The keybind uses RegisterKeyMapping. By default the configured keybind in the *initial* config.lua will be the default key, however once the keybind is set for a user it'll remain and can be changed in the users settings under `Esc > settings > keybinds > fivem`.
|
||||||
|
|
||||||
|
|
||||||
**Menu key:** F5
|
**Menu key:** F4
|
||||||
|
|
||||||
Server owners can change this in the `config.lua`.
|
Server owners can change this in the `config.lua`.
|
||||||
|
|
||||||
Alternatively, the player base can set their own menu keybind to open DpEmotes
|
Alternatively, the player base can set their own menu keybind to open RpEmotes
|
||||||
|
|
||||||
Esc > settings > keybinds > fivem > dpemotes
|
`Esc > settings > keybinds > fivem`
|
||||||
|
|
||||||
* More keybinds are now using key mappings which means that they are now available in your FiveM settings to change (`FavKeybind` and `RagdollKeybind`)
|
* More keybinds are now using key mappings which means that they are now available in your FiveM settings to change (`FavKeybind` and `RagdollKeybind`)
|
||||||
|
|
||||||
@@ -117,9 +117,7 @@ Esc > settings > keybinds > fivem > dpemotes
|
|||||||
|
|
||||||
# Keybinds and SQL 🎛️
|
# Keybinds and SQL 🎛️
|
||||||
|
|
||||||
The original DpEmotes uses mysql-async which was then changed to ghmattimysql. Unfortunately, they are no longer maintained.
|
To use the SQL features, install the latest version of the [oxmysql](https://github.com/overextended/oxmysql) resource. If you do not want to use the SQL features keep the `oxmysql` region in fxmanifest.lua commented out.
|
||||||
|
|
||||||
To use the SQL features, install the latest version of the [oxmysql](https://github.com/overextended/oxmysql) resource. If you do not want to use the SQL features, comment out the `oxmysql` region in fxmanifest.lua.
|
|
||||||
|
|
||||||
Alternatively, you can use the keybind command that comes with FiveM without having the SQL, by entering the following into F8:
|
Alternatively, you can use the keybind command that comes with FiveM without having the SQL, by entering the following into F8:
|
||||||
|
|
||||||
@@ -151,7 +149,7 @@ Alternatively, you can also hide animal emotes.
|
|||||||
|
|
||||||
# QBCore ⚙️
|
# QBCore ⚙️
|
||||||
|
|
||||||
**QBCore integration to match their fork of the original dpemotes**
|
**QBCore integration to match their fork of dpemotes**
|
||||||
|
|
||||||
- Config option which supports the QB Framework in their fork of dpemotes
|
- Config option which supports the QB Framework in their fork of dpemotes
|
||||||
|
|
||||||
@@ -174,7 +172,7 @@ If you’re using qb-core, you can now set `Framework = "qb-core"` in the config
|
|||||||
|
|
||||||
# Installation Instructions ⚙️:
|
# Installation Instructions ⚙️:
|
||||||
|
|
||||||
* Add DpEmotes to your `server.cfg`
|
* Add RpEmotes to your `server.cfg`
|
||||||
|
|
||||||
* Download the latest recommended artifacts [for Windows](https://runtime.fivem.net/artifacts/fivem/build_server_windows/master/) or [for Linux](https://runtime.fivem.net/artifacts/fivem/build_proot_linux/master/)
|
* Download the latest recommended artifacts [for Windows](https://runtime.fivem.net/artifacts/fivem/build_server_windows/master/) or [for Linux](https://runtime.fivem.net/artifacts/fivem/build_proot_linux/master/)
|
||||||
|
|
||||||
@@ -190,11 +188,11 @@ Alternatively, you can use the keybind command that comes with FiveM without hav
|
|||||||
|
|
||||||
`bind keyboard "Yourbutton" "e youremote"`. To remove the keybind, type `"unbind keyboard "Yourbutton"`.
|
`bind keyboard "Yourbutton" "e youremote"`. To remove the keybind, type `"unbind keyboard "Yourbutton"`.
|
||||||
|
|
||||||
* Start dpemotes
|
* Start rpemotes
|
||||||
|
|
||||||
# Additional Instructions ⚙️
|
# Additional Instructions ⚙️
|
||||||
|
|
||||||
- **[Please check the fivem forum thread](https://forum.fivem.net/t/dpemotes-356ish-emotes-usable-while-walking-props-and-more/843105)**
|
- **[Please check the fivem forum thread](https://forum.fivem.net/t/rpemotes-356ish-emotes-usable-while-walking-props-and-more/843105)**
|
||||||
|
|
||||||
- **Check out my youtube playlist below:**
|
- **Check out my youtube playlist below:**
|
||||||
|
|
||||||
@@ -250,13 +248,13 @@ By default, the main prop will share it's coordinates with the particle effect,
|
|||||||
|
|
||||||
If no prop is uses in the animation or you require the particle effect to be in a different location, use `PtfxNoProp = true`, and 0.0 will 9/10 times be the human peds' stomach; you can then offset your coordinates based on that with the first 3 entries being XYZ, and the last 3 being rotation XYZ.
|
If no prop is uses in the animation or you require the particle effect to be in a different location, use `PtfxNoProp = true`, and 0.0 will 9/10 times be the human peds' stomach; you can then offset your coordinates based on that with the first 3 entries being XYZ, and the last 3 being rotation XYZ.
|
||||||
|
|
||||||
Using Menyoo, spawn down a tennis ball and attach it to human, by default menyoo will attach it to the SKEL_ROOT bone (stomach), so from that, what we can do is offset the coordinates, say, up to the human ped's mouth, and then once we've got it correct, we can transfer those coordinates over to dpemotes, and tah dah, we have our Ptfx Placement.
|
Using Menyoo, spawn down a tennis ball and attach it to human, by default menyoo will attach it to the SKEL_ROOT bone (stomach), so from that, what we can do is offset the coordinates, say, up to the human ped's mouth, and then once we've got it correct, we can transfer those coordinates over to rpemotes, and tah dah, we have our Ptfx Placement.
|
||||||
|
|
||||||
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
# Adding Your Own Animations ⚙️
|
# Adding Your Own Animations ⚙️
|
||||||
|
|
||||||
Because the menu gets updated frequently, the files get overwritten. To avoid this, you can add your own / downloaded animation files `(.ycd)` inside of a newly created folder, give it a name, and place it in the `dpemotes\stream\[Custom Emotes]` folder.
|
Because the menu gets updated frequently, the files get overwritten. To avoid this, you can add your own / downloaded animation files `(.ycd)` inside of a newly created folder, give it a name, and place it in the `rpemotes\stream\[Custom Emotes]` folder.
|
||||||
|
|
||||||
Add your animation code to the `AnimationListCustom.lua` and make a backup of this file, call it `BackUpAnimationListCustom.lua`.
|
Add your animation code to the `AnimationListCustom.lua` and make a backup of this file, call it `BackUpAnimationListCustom.lua`.
|
||||||
|
|
||||||
@@ -289,9 +287,9 @@ This project does not contain a license however is in compliance with express cu
|
|||||||
|
|
||||||
You are not allowed to change / add a license.
|
You are not allowed to change / add a license.
|
||||||
|
|
||||||
These usage rights do not carry over to any third party including any other forks and/or projects without express permission and must not be extracted from [TayMcKenzieNZ's fork of DpEmotes](https://github.com/TayMcKenzieNZ/dpemotes).
|
These usage rights do not carry over to any third party including any other forks and/or projects without express permission and must not be extracted from [RpEmotes](https://github.com/TayMcKenzieNZ/rpemotes).
|
||||||
|
|
||||||
If you want to modify this particular fork of DpEmotes ***(does not apply if you want to use it for personal purposes)*** or make an agreement, you can contact TayMcKenzieNZ via Discord. Pull requests are actively reviewed and discussed with TayMcKenzieNZ and contributors and will be accepted as long as they do not contain breaking changes.
|
If you want to modify RpEmotes ***(does not apply if you want to use it for personal purposes)*** or make an agreement, you can contact TayMcKenzieNZ via Discord. Pull requests are actively reviewed and discussed with TayMcKenzieNZ and contributors and will be accepted as long as they do not contain breaking changes.
|
||||||
|
|
||||||
You can read more about unlicensed repositories [here](https://opensource.stackexchange.com/questions/1720/what-can-i-assume-if-a-publicly-published-project-has-no-license) if questions remain.
|
You can read more about unlicensed repositories [here](https://opensource.stackexchange.com/questions/1720/what-can-i-assume-if-a-publicly-published-project-has-no-license) if questions remain.
|
||||||
|
|
||||||
|
|||||||
@@ -1,14 +1,13 @@
|
|||||||
-- DPEmotes forked by TayMcKenzieNZ requires you to be on the latest FiveM Gamebuild for all emotes to function. --
|
-- ALL custon animations added to this repository were added with express permission from the creators and does not contain any paid content --
|
||||||
-- ALL custon animations added to this fork were added with express permission from the creators and does not contain any paid content --
|
|
||||||
-- If an emote does not work, you may be on an older gamebuild. --
|
-- If an emote does not work, you may be on an older gamebuild. --
|
||||||
-- To get a higher gamebuild, see ReadMe on github repositorty --
|
-- To get a higher gamebuild, see ReadMe on github repositorty --
|
||||||
|
|
||||||
|
|
||||||
DP = {}
|
RP = {}
|
||||||
|
|
||||||
-- EXPRESSIONS --
|
-- EXPRESSIONS --
|
||||||
|
|
||||||
DP.Expressions = {
|
RP.Expressions = {
|
||||||
["Aiming"] = {
|
["Aiming"] = {
|
||||||
"Expression",
|
"Expression",
|
||||||
"mood_aiming_1"
|
"mood_aiming_1"
|
||||||
@@ -126,7 +125,7 @@ DP.Expressions = {
|
|||||||
|
|
||||||
--- WALKSTYLES ---
|
--- WALKSTYLES ---
|
||||||
|
|
||||||
DP.Walks = {
|
RP.Walks = {
|
||||||
-- The key shouldn't have any other uppercase letter than the first one!
|
-- The key shouldn't have any other uppercase letter than the first one!
|
||||||
-- The first letter HAS to be uppercase!
|
-- The first letter HAS to be uppercase!
|
||||||
-- First element of array is the walk animation
|
-- First element of array is the walk animation
|
||||||
@@ -528,7 +527,7 @@ DP.Walks = {
|
|||||||
|
|
||||||
--- SHARED EMOTES ---
|
--- SHARED EMOTES ---
|
||||||
|
|
||||||
DP.Shared = {
|
RP.Shared = {
|
||||||
|
|
||||||
--[emotename] = {dictionary, animation, displayname, targetemotename, additionalanimationoptions} --
|
--[emotename] = {dictionary, animation, displayname, targetemotename, additionalanimationoptions} --
|
||||||
-- You don't have to specify targetemotename; If you don't, it will just play the same animation on both.--
|
-- You don't have to specify targetemotename; If you don't, it will just play the same animation on both.--
|
||||||
@@ -1452,7 +1451,7 @@ DP.Shared = {
|
|||||||
|
|
||||||
--- DANCING EMOTES, SOME WITH PROPS ---
|
--- DANCING EMOTES, SOME WITH PROPS ---
|
||||||
|
|
||||||
DP.Dances = {
|
RP.Dances = {
|
||||||
["dance"] = {
|
["dance"] = {
|
||||||
"anim@amb@nightclub@dancers@podium_dancers@",
|
"anim@amb@nightclub@dancers@podium_dancers@",
|
||||||
"hi_dance_facedj_17_v2_male^5",
|
"hi_dance_facedj_17_v2_male^5",
|
||||||
@@ -2800,7 +2799,7 @@ DP.Dances = {
|
|||||||
---- ANIMAL EMOTES ----
|
---- ANIMAL EMOTES ----
|
||||||
---- BIG DOG ----
|
---- BIG DOG ----
|
||||||
|
|
||||||
DP.AnimalEmotes = {
|
RP.AnimalEmotes = {
|
||||||
["bdogbark"] = {
|
["bdogbark"] = {
|
||||||
"creatures@rottweiler@amb@world_dog_barking@idle_a",
|
"creatures@rottweiler@amb@world_dog_barking@idle_a",
|
||||||
"idle_a",
|
"idle_a",
|
||||||
@@ -4551,7 +4550,7 @@ DP.AnimalEmotes = {
|
|||||||
|
|
||||||
--- EMOTES NO PROPS ---
|
--- EMOTES NO PROPS ---
|
||||||
|
|
||||||
DP.Emotes = {
|
RP.Emotes = {
|
||||||
|
|
||||||
["dispenser"] = {
|
["dispenser"] = {
|
||||||
"mini@sprunk",
|
"mini@sprunk",
|
||||||
@@ -7927,7 +7926,7 @@ DP.Emotes = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
--- EMOTES WITH 1 OR 2 PROPS ---
|
--- EMOTES WITH 1 OR 2 PROPS ---
|
||||||
DP.PropEmotes = {
|
RP.PropEmotes = {
|
||||||
["umbrella"] = {
|
["umbrella"] = {
|
||||||
"amb@world_human_drinking@coffee@male@base",
|
"amb@world_human_drinking@coffee@male@base",
|
||||||
"base",
|
"base",
|
||||||
@@ -11467,7 +11466,7 @@ DP.PropEmotes = {
|
|||||||
EmoteMoving = true,
|
EmoteMoving = true,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
["microck"] = { --- Custom Emote Provided To TayMcKenzieNZ's DpEmotes Fork By Prue颜
|
["microck"] = { --- Custom Emote Provided To RpEmotes By Prue颜
|
||||||
"lunyx@mic@p1",
|
"lunyx@mic@p1",
|
||||||
"mic@p1",
|
"mic@p1",
|
||||||
"Microphone Rock",
|
"Microphone Rock",
|
||||||
@@ -11486,7 +11485,7 @@ DP.PropEmotes = {
|
|||||||
EmoteMoving = true,
|
EmoteMoving = true,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
["microckb"] = { --- Custom Emote Provided To TayMcKenzieNZ's DpEmotes Fork By Prue颜
|
["microckb"] = { --- Custom Emote Provided To RpEmotes By Prue颜
|
||||||
"lunyx@mic@p2",
|
"lunyx@mic@p2",
|
||||||
"mic@p2",
|
"mic@p2",
|
||||||
"Microphone Rock 2",
|
"Microphone Rock 2",
|
||||||
@@ -11505,7 +11504,7 @@ DP.PropEmotes = {
|
|||||||
EmoteMoving = true,
|
EmoteMoving = true,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
["microckc"] = { --- Custom Emote Provided To TayMcKenzieNZ's DpEmotes Fork By Prue颜
|
["microckc"] = { --- Custom Emote Provided To RpEmotes By Prue颜
|
||||||
"lunyx@mic@p3",
|
"lunyx@mic@p3",
|
||||||
"mic@p3",
|
"mic@p3",
|
||||||
"Microphone Rock 3",
|
"Microphone Rock 3",
|
||||||
@@ -11524,7 +11523,7 @@ DP.PropEmotes = {
|
|||||||
EmoteMoving = true,
|
EmoteMoving = true,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
["microckd"] = { --- Custom Emote Provided To TayMcKenzieNZ's DpEmotes Fork By Prue颜
|
["microckd"] = { --- Custom Emote Provided To RpEmotes By Prue颜
|
||||||
"lunyx@mic@p4",
|
"lunyx@mic@p4",
|
||||||
"mic@p4",
|
"mic@p4",
|
||||||
"Microphone Rock 4",
|
"Microphone Rock 4",
|
||||||
@@ -11543,7 +11542,7 @@ DP.PropEmotes = {
|
|||||||
EmoteMoving = true,
|
EmoteMoving = true,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
["microcke"] = { --- Custom Emote Provided To TayMcKenzieNZ's DpEmotes Fork By Prue颜
|
["microcke"] = { --- Custom Emote Provided To RpEmotes By Prue颜
|
||||||
"lunyx@mic@p5",
|
"lunyx@mic@p5",
|
||||||
"mic@p5",
|
"mic@p5",
|
||||||
"Microphone Rock 5",
|
"Microphone Rock 5",
|
||||||
@@ -11562,7 +11561,7 @@ DP.PropEmotes = {
|
|||||||
EmoteMoving = true,
|
EmoteMoving = true,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
["microckf"] = { --- Custom Emote Provided To TayMcKenzieNZ's DpEmotes Fork By Prue颜
|
["microckf"] = { --- Custom Emote Provided To RpEmotes By Prue颜
|
||||||
"lunyx@mic@p6",
|
"lunyx@mic@p6",
|
||||||
"mic@p6",
|
"mic@p6",
|
||||||
"Microphone Rock 6",
|
"Microphone Rock 6",
|
||||||
@@ -11581,7 +11580,7 @@ DP.PropEmotes = {
|
|||||||
EmoteMoving = true,
|
EmoteMoving = true,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
["microckg"] = { --- Custom Emote Provided To TayMcKenzieNZ's DpEmotes Fork By Prue颜
|
["microckg"] = { --- Custom Emote Provided To RpEmotes By Prue颜
|
||||||
"lunyx@mic@p7",
|
"lunyx@mic@p7",
|
||||||
"mic@p7",
|
"mic@p7",
|
||||||
"Microphone Rock 7",
|
"Microphone Rock 7",
|
||||||
@@ -11600,7 +11599,7 @@ DP.PropEmotes = {
|
|||||||
EmoteMoving = true,
|
EmoteMoving = true,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
["microckh"] = { --- Custom Emote Provided To TayMcKenzieNZ's DpEmotes Fork By Prue颜
|
["microckh"] = { --- Custom Emote Provided To RpEmotes By Prue颜
|
||||||
"lunyx@mic@p8",
|
"lunyx@mic@p8",
|
||||||
"mic@p8",
|
"mic@p8",
|
||||||
"Microphone Rock 8",
|
"Microphone Rock 8",
|
||||||
@@ -11619,7 +11618,7 @@ DP.PropEmotes = {
|
|||||||
EmoteMoving = true,
|
EmoteMoving = true,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
["microcki"] = { --- Custom Emote Provided To TayMcKenzieNZ's DpEmotes Fork By Prue颜
|
["microcki"] = { --- Custom Emote Provided To RpEmotes By Prue颜
|
||||||
"lunyx@mic@p9",
|
"lunyx@mic@p9",
|
||||||
"mic@p9",
|
"mic@p9",
|
||||||
"Microphone Rock 9",
|
"Microphone Rock 9",
|
||||||
@@ -11638,7 +11637,7 @@ DP.PropEmotes = {
|
|||||||
EmoteMoving = true,
|
EmoteMoving = true,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
["microckj"] = { --- Custom Emote Provided To TayMcKenzieNZ's DpEmotes Fork By Prue颜
|
["microckj"] = { --- Custom Emote Provided To RpEmotes By Prue颜
|
||||||
"lunyx@mic@p10",
|
"lunyx@mic@p10",
|
||||||
"mic@p10",
|
"mic@p10",
|
||||||
"Microphone Rock 10",
|
"Microphone Rock 10",
|
||||||
@@ -15395,18 +15394,23 @@ DP.PropEmotes = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
-- Remove emotes if needed
|
-- Remove emotes if needed
|
||||||
if Config.AdultEmotesDisabled then
|
|
||||||
for _, array in ipairs({
|
local emoteTypes = {
|
||||||
"Shared",
|
"Shared",
|
||||||
"Dances",
|
"Dances",
|
||||||
"AnimalEmotes",
|
"AnimalEmotes",
|
||||||
"Emotes",
|
"Emotes",
|
||||||
"PropEmotes",
|
"PropEmotes",
|
||||||
}) do
|
}
|
||||||
for emoteName, emoteData in pairs(DP[array]) do
|
|
||||||
if emoteData.AdultAnimation then
|
for i = 1, #emoteTypes do
|
||||||
DP[array][emoteName] = nil
|
local emoteType = emoteTypes[i]
|
||||||
end
|
for emoteName, emoteData in pairs(RP[emoteType]) do
|
||||||
end
|
local shouldRemove = false
|
||||||
|
if Config.AdultEmotesDisabled and emoteData.AdultAnimation then shouldRemove = true end
|
||||||
|
if emoteData[1] and not DoesAnimDictExist(emoteData[1]) then shouldRemove = true end
|
||||||
|
if emoteData.AnimationOptions and emoteData.AnimationOptions.Prop and not IsModelValid(joaat(emoteData.AnimationOptions.Prop)) then shouldRemove = true end
|
||||||
|
if emoteData.AnimationOptions and emoteData.AnimationOptions.SecondProp and not IsModelValid(joaat(emoteData.AnimationOptions.SecondProp)) then shouldRemove = true end
|
||||||
|
if shouldRemove then RP[emoteType][emoteName] = nil end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -11,11 +11,11 @@ CustomDP.PropEmotes = {}
|
|||||||
|
|
||||||
-- Add the custom emotes
|
-- Add the custom emotes
|
||||||
for arrayName, array in pairs(CustomDP) do
|
for arrayName, array in pairs(CustomDP) do
|
||||||
if DP[arrayName] then
|
if RP[arrayName] then
|
||||||
for emoteName, emoteData in pairs(array) do
|
for emoteName, emoteData in pairs(array) do
|
||||||
-- We don't add adult animations if not needed
|
-- We don't add adult animations if not needed
|
||||||
if not emoteData.AdultAnimation or not Config.AdultEmotesDisabled then
|
if not emoteData.AdultAnimation or not Config.AdultEmotesDisabled then
|
||||||
DP[arrayName][emoteName] = emoteData
|
RP[arrayName][emoteName] = emoteData
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
100
client/Emote.lua
100
client/Emote.lua
@@ -60,11 +60,11 @@ local function RunAnimationThread()
|
|||||||
end
|
end
|
||||||
|
|
||||||
if Config.EnableXtoCancel then
|
if Config.EnableXtoCancel then
|
||||||
RegisterKeyMapping("emotecancel", "Cancel current emote", "keyboard", "X")
|
RegisterKeyMapping("emotecancel", "Cancel current emote", "keyboard", Config.CancelEmoteKey)
|
||||||
end
|
end
|
||||||
|
|
||||||
if Config.MenuKeybindEnabled then
|
if Config.MenuKeybindEnabled then
|
||||||
RegisterKeyMapping("emotemenu", "Open dpemotes menu", "keyboard", Config.MenuKeybind)
|
RegisterKeyMapping("emotemenu", "Open rpemotes menu", "keyboard", Config.MenuKeybind)
|
||||||
end
|
end
|
||||||
|
|
||||||
if Config.HandsupKeybindEnabled then
|
if Config.HandsupKeybindEnabled then
|
||||||
@@ -92,7 +92,7 @@ Citizen.CreateThread(function()
|
|||||||
{ name = "emotename", help = "dance, camera, sit or any valid emote." } })
|
{ name = "emotename", help = "dance, camera, sit or any valid emote." } })
|
||||||
TriggerEvent('chat:addSuggestion', '/emotebinds', 'Check your currently bound emotes.')
|
TriggerEvent('chat:addSuggestion', '/emotebinds', 'Check your currently bound emotes.')
|
||||||
end
|
end
|
||||||
TriggerEvent('chat:addSuggestion', '/emotemenu', 'Open dpemotes menu (F5) by default.')
|
TriggerEvent('chat:addSuggestion', '/emotemenu', 'Open rpemotes menu (F5) by default.')
|
||||||
TriggerEvent('chat:addSuggestion', '/emotes', 'List available emotes.')
|
TriggerEvent('chat:addSuggestion', '/emotes', 'List available emotes.')
|
||||||
TriggerEvent('chat:addSuggestion', '/walk', 'Set your walkingstyle.',
|
TriggerEvent('chat:addSuggestion', '/walk', 'Set your walkingstyle.',
|
||||||
{ { name = "style", help = "/walks for a list of valid styles" } })
|
{ { name = "style", help = "/walks for a list of valid styles" } })
|
||||||
@@ -102,17 +102,17 @@ Citizen.CreateThread(function()
|
|||||||
TriggerEvent('chat:addSuggestion', '/pointing', 'Finger pointing.')
|
TriggerEvent('chat:addSuggestion', '/pointing', 'Finger pointing.')
|
||||||
end)
|
end)
|
||||||
|
|
||||||
RegisterCommand('e', function(source, args, raw) EmoteCommandStart(source, args, raw) end)
|
RegisterCommand('e', function(source, args, raw) EmoteCommandStart(source, args, raw) end, false)
|
||||||
RegisterCommand('emote', function(source, args, raw) EmoteCommandStart(source, args, raw) end)
|
RegisterCommand('emote', function(source, args, raw) EmoteCommandStart(source, args, raw) end, false)
|
||||||
if Config.SqlKeybinding then
|
if Config.SqlKeybinding then
|
||||||
RegisterCommand('emotebind', function(source, args, raw) EmoteBindStart(source, args, raw) end)
|
RegisterCommand('emotebind', function(source, args, raw) EmoteBindStart(source, args, raw) end, false)
|
||||||
RegisterCommand('emotebinds', function(source, args, raw) EmoteBindsStart(source, args, raw) end)
|
RegisterCommand('emotebinds', function(source, args, raw) EmoteBindsStart(source, args, raw) end, false)
|
||||||
end
|
end
|
||||||
RegisterCommand('emotemenu', function(source, args, raw) OpenEmoteMenu() end)
|
RegisterCommand('emotemenu', function(source, args, raw) OpenEmoteMenu() end, false)
|
||||||
RegisterCommand('emotes', function(source, args, raw) EmotesOnCommand() end)
|
RegisterCommand('emotes', function(source, args, raw) EmotesOnCommand() end, false)
|
||||||
RegisterCommand('walk', function(source, args, raw) WalkCommandStart(source, args, raw) end)
|
RegisterCommand('walk', function(source, args, raw) WalkCommandStart(source, args, raw) end, false)
|
||||||
RegisterCommand('walks', function(source, args, raw) WalksOnCommand() end)
|
RegisterCommand('walks', function(source, args, raw) WalksOnCommand() end, false)
|
||||||
RegisterCommand('emotecancel', function(source, args, raw) EmoteCancel() end)
|
RegisterCommand('emotecancel', function(source, args, raw) EmoteCancel() end, false)
|
||||||
|
|
||||||
RegisterCommand('handsup', function(source, args, raw)
|
RegisterCommand('handsup', function(source, args, raw)
|
||||||
if Config.HandsupKeybindEnabled then
|
if Config.HandsupKeybindEnabled then
|
||||||
@@ -122,7 +122,8 @@ RegisterCommand('handsup', function(source, args, raw)
|
|||||||
EmoteCommandStart(nil, {"handsup"}, nil)
|
EmoteCommandStart(nil, {"handsup"}, nil)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end)
|
end, false)
|
||||||
|
|
||||||
RegisterCommand('pointing', function(source, args, raw)
|
RegisterCommand('pointing', function(source, args, raw)
|
||||||
if Config.PointingKeybindEnabled then
|
if Config.PointingKeybindEnabled then
|
||||||
local ped = PlayerPedId()
|
local ped = PlayerPedId()
|
||||||
@@ -187,7 +188,7 @@ RegisterCommand('pointing', function(source, args, raw)
|
|||||||
Pointing = false
|
Pointing = false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end)
|
end, false)
|
||||||
|
|
||||||
AddEventHandler('onResourceStop', function(resource)
|
AddEventHandler('onResourceStop', function(resource)
|
||||||
if resource == GetCurrentResourceName() then
|
if resource == GetCurrentResourceName() then
|
||||||
@@ -286,6 +287,7 @@ AddStateBagChangeHandler('ptfx', nil, function(bagName, key, value, _unused, rep
|
|||||||
local offset = stateBag.ptfxOffset
|
local offset = stateBag.ptfxOffset
|
||||||
local rot = stateBag.ptfxRot
|
local rot = stateBag.ptfxRot
|
||||||
local scale = stateBag.ptfxScale or 1
|
local scale = stateBag.ptfxScale or 1
|
||||||
|
local color = stateBag.ptfxColor
|
||||||
local propNet = stateBag.ptfxPropNet
|
local propNet = stateBag.ptfxPropNet
|
||||||
local entityTarget = plyPed
|
local entityTarget = plyPed
|
||||||
-- Only do for valid obj
|
-- Only do for valid obj
|
||||||
@@ -296,10 +298,15 @@ AddStateBagChangeHandler('ptfx', nil, function(bagName, key, value, _unused, rep
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
PtfxThis(asset)
|
PtfxThis(asset)
|
||||||
PlayerParticles[plyId] = StartNetworkedParticleFxLoopedOnEntityBone(name, entityTarget, offset.x, offset.y,
|
PlayerParticles[plyId] = StartNetworkedParticleFxLoopedOnEntityBone(name, entityTarget, offset.x, offset.y, offset.z, rot.x, rot.y, rot.z, GetEntityBoneIndexByName(name, "VFX"), scale + 0.0, 0, 0, 0, 1065353216, 1065353216, 1065353216, 0)
|
||||||
offset.z, rot.x, rot.y, rot.z, GetEntityBoneIndexByName(name, "VFX"), scale + 0.0, 0, 0, 0, 1065353216,
|
if color then
|
||||||
1065353216, 1065353216, 0)
|
if color[1] and type(color[1]) == 'table' then
|
||||||
SetParticleFxLoopedColour(PlayerParticles[plyId], 1.0, 1.0, 1.0)
|
local randomIndex = math.random(1, #color)
|
||||||
|
color = color[randomIndex]
|
||||||
|
end
|
||||||
|
SetParticleFxLoopedAlpha(PlayerParticles[plyId], color.A)
|
||||||
|
SetParticleFxLoopedColour(PlayerParticles[plyId], color.R / 255, color.G / 255, color.B / 255, false)
|
||||||
|
end
|
||||||
DebugPrint("Started PTFX: " .. PlayerParticles[plyId])
|
DebugPrint("Started PTFX: " .. PlayerParticles[plyId])
|
||||||
else
|
else
|
||||||
-- Stop ptfx
|
-- Stop ptfx
|
||||||
@@ -313,7 +320,7 @@ end)
|
|||||||
|
|
||||||
function EmotesOnCommand(source, args, raw)
|
function EmotesOnCommand(source, args, raw)
|
||||||
local EmotesCommand = ""
|
local EmotesCommand = ""
|
||||||
for a in pairsByKeys(DP.Emotes) do
|
for a in pairsByKeys(RP.Emotes) do
|
||||||
EmotesCommand = EmotesCommand .. "" .. a .. ", "
|
EmotesCommand = EmotesCommand .. "" .. a .. ", "
|
||||||
end
|
end
|
||||||
EmoteChatMessage(EmotesCommand)
|
EmoteChatMessage(EmotesCommand)
|
||||||
@@ -343,26 +350,26 @@ function EmoteMenuStart(args, hard, textureVariation)
|
|||||||
local etype = hard
|
local etype = hard
|
||||||
|
|
||||||
if etype == "dances" then
|
if etype == "dances" then
|
||||||
if DP.Dances[name] ~= nil then
|
if RP.Dances[name] ~= nil then
|
||||||
if OnEmotePlay(DP.Dances[name]) then end
|
OnEmotePlay(RP.Dances[name])
|
||||||
end
|
end
|
||||||
elseif etype == "animals" then
|
elseif etype == "animals" then
|
||||||
if DP.AnimalEmotes[name] ~= nil then
|
if RP.AnimalEmotes[name] ~= nil then
|
||||||
if OnEmotePlay(DP.AnimalEmotes[name]) then end
|
OnEmotePlay(RP.AnimalEmotes[name])
|
||||||
end
|
end
|
||||||
elseif etype == "props" then
|
elseif etype == "props" then
|
||||||
if DP.PropEmotes[name] ~= nil then
|
if RP.PropEmotes[name] ~= nil then
|
||||||
if OnEmotePlay(DP.PropEmotes[name], textureVariation) then end
|
OnEmotePlay(RP.PropEmotes[name], textureVariation)
|
||||||
end
|
end
|
||||||
elseif etype == "emotes" then
|
elseif etype == "emotes" then
|
||||||
if DP.Emotes[name] ~= nil then
|
if RP.Emotes[name] ~= nil then
|
||||||
if OnEmotePlay(DP.Emotes[name]) then end
|
OnEmotePlay(RP.Emotes[name])
|
||||||
else
|
else
|
||||||
if name ~= "🕺 Dance Emotes" then end
|
if name ~= "🕺 Dance Emotes" then end
|
||||||
end
|
end
|
||||||
elseif etype == "expression" then
|
elseif etype == "expression" then
|
||||||
if DP.Expressions[name] ~= nil then
|
if RP.Expressions[name] ~= nil then
|
||||||
if OnEmotePlay(DP.Expressions[name]) then end
|
OnEmotePlay(RP.Expressions[name])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -382,35 +389,35 @@ function EmoteCommandStart(source, args, raw)
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
if DP.Emotes[name] ~= nil then
|
if RP.Emotes[name] ~= nil then
|
||||||
if OnEmotePlay(DP.Emotes[name]) then end
|
OnEmotePlay(RP.Emotes[name])
|
||||||
return
|
return
|
||||||
elseif DP.Dances[name] ~= nil then
|
elseif RP.Dances[name] ~= nil then
|
||||||
if OnEmotePlay(DP.Dances[name]) then end
|
OnEmotePlay(RP.Dances[name])
|
||||||
return
|
return
|
||||||
elseif DP.AnimalEmotes[name] ~= nil then
|
elseif RP.AnimalEmotes[name] ~= nil then
|
||||||
if OnEmotePlay(DP.AnimalEmotes[name]) then end
|
OnEmotePlay(RP.AnimalEmotes[name])
|
||||||
return
|
return
|
||||||
elseif DP.PropEmotes[name] ~= nil then
|
elseif RP.PropEmotes[name] ~= nil then
|
||||||
if DP.PropEmotes[name].AnimationOptions.PropTextureVariations then
|
if RP.PropEmotes[name].AnimationOptions.PropTextureVariations then
|
||||||
if #args > 1 then
|
if #args > 1 then
|
||||||
local textureVariation = tonumber(args[2])
|
local textureVariation = tonumber(args[2])
|
||||||
if (DP.PropEmotes[name].AnimationOptions.PropTextureVariations[textureVariation] ~= nil) then
|
if (RP.PropEmotes[name].AnimationOptions.PropTextureVariations[textureVariation] ~= nil) then
|
||||||
if OnEmotePlay(DP.PropEmotes[name], textureVariation - 1) then end
|
OnEmotePlay(RP.PropEmotes[name], textureVariation - 1)
|
||||||
return
|
return
|
||||||
else
|
else
|
||||||
local str = ""
|
local str = ""
|
||||||
for k, v in ipairs(DP.PropEmotes[name].AnimationOptions.PropTextureVariations) do
|
for k, v in ipairs(RP.PropEmotes[name].AnimationOptions.PropTextureVariations) do
|
||||||
str = str .. string.format("\n(%s) - %s", k, v.Name)
|
str = str .. string.format("\n(%s) - %s", k, v.Name)
|
||||||
end
|
end
|
||||||
|
|
||||||
EmoteChatMessage(string.format(Config.Languages[lang]['invalidvariation'], str), true)
|
EmoteChatMessage(string.format(Config.Languages[lang]['invalidvariation'], str), true)
|
||||||
if OnEmotePlay(DP.PropEmotes[name], 0) then end
|
OnEmotePlay(RP.PropEmotes[name], 0)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if OnEmotePlay(DP.PropEmotes[name]) then end
|
OnEmotePlay(RP.PropEmotes[name])
|
||||||
return
|
return
|
||||||
else
|
else
|
||||||
EmoteChatMessage("'" .. name .. "' " .. Config.Languages[lang]['notvalidemote'] .. "")
|
EmoteChatMessage("'" .. name .. "' " .. Config.Languages[lang]['notvalidemote'] .. "")
|
||||||
@@ -602,6 +609,7 @@ function OnEmotePlay(EmoteName, textureVariation)
|
|||||||
PtfxNoProp = false
|
PtfxNoProp = false
|
||||||
end
|
end
|
||||||
Ptfx1, Ptfx2, Ptfx3, Ptfx4, Ptfx5, Ptfx6, PtfxScale = table.unpack(EmoteName.AnimationOptions.PtfxPlacement)
|
Ptfx1, Ptfx2, Ptfx3, Ptfx4, Ptfx5, Ptfx6, PtfxScale = table.unpack(EmoteName.AnimationOptions.PtfxPlacement)
|
||||||
|
PtfxColor = EmoteName.AnimationOptions.PtfxColor
|
||||||
PtfxInfo = EmoteName.AnimationOptions.PtfxInfo
|
PtfxInfo = EmoteName.AnimationOptions.PtfxInfo
|
||||||
PtfxWait = EmoteName.AnimationOptions.PtfxWait
|
PtfxWait = EmoteName.AnimationOptions.PtfxWait
|
||||||
PtfxCanHold = EmoteName.AnimationOptions.PtfxCanHold
|
PtfxCanHold = EmoteName.AnimationOptions.PtfxCanHold
|
||||||
@@ -609,8 +617,8 @@ function OnEmotePlay(EmoteName, textureVariation)
|
|||||||
PtfxPrompt = true
|
PtfxPrompt = true
|
||||||
-- RunAnimationThread() -- ? This call should not be required, see if needed with tests
|
-- RunAnimationThread() -- ? This call should not be required, see if needed with tests
|
||||||
|
|
||||||
TriggerServerEvent("dpemotes:ptfx:sync", PtfxAsset, PtfxName, vector3(Ptfx1, Ptfx2, Ptfx3),
|
TriggerServerEvent("rpemotes:ptfx:sync", PtfxAsset, PtfxName, vector3(Ptfx1, Ptfx2, Ptfx3),
|
||||||
vector3(Ptfx4, Ptfx5, Ptfx6), PtfxScale)
|
vector3(Ptfx4, Ptfx5, Ptfx6), PtfxScale, PtfxColor)
|
||||||
else
|
else
|
||||||
DebugPrint("Ptfx = none")
|
DebugPrint("Ptfx = none")
|
||||||
PtfxPrompt = false
|
PtfxPrompt = false
|
||||||
@@ -651,12 +659,10 @@ function OnEmotePlay(EmoteName, textureVariation)
|
|||||||
|
|
||||||
-- Ptfx is on the prop, then we need to sync it
|
-- Ptfx is on the prop, then we need to sync it
|
||||||
if EmoteName.AnimationOptions.PtfxAsset and not PtfxNoProp then
|
if EmoteName.AnimationOptions.PtfxAsset and not PtfxNoProp then
|
||||||
TriggerServerEvent("dpemotes:ptfx:syncProp", ObjToNet(prop))
|
TriggerServerEvent("rpemotes:ptfx:syncProp", ObjToNet(prop))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
return true
|
|
||||||
end
|
end
|
||||||
|
|
||||||
-----------------------------------------------------------------------------------------------------
|
-----------------------------------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
TriggerServerEvent("dp:CheckVersion")
|
|
||||||
|
|
||||||
rightPosition = { x = 1450, y = 100 }
|
rightPosition = { x = 1450, y = 100 }
|
||||||
leftPosition = { x = 0, y = 100 }
|
leftPosition = { x = 0, y = 100 }
|
||||||
menuPosition = { x = 0, y = 200 }
|
menuPosition = { x = 0, y = 200 }
|
||||||
@@ -39,11 +37,11 @@ end
|
|||||||
|
|
||||||
-- Clear all the animal emotes if disabled.
|
-- Clear all the animal emotes if disabled.
|
||||||
if not Config.AnimalEmotesEnabled then
|
if not Config.AnimalEmotesEnabled then
|
||||||
DP.AnimalEmotes = {}
|
RP.AnimalEmotes = {}
|
||||||
for k, v in pairs(DP) do
|
for k, v in pairs(RP) do
|
||||||
for i, j in pairs(v) do
|
for i, j in pairs(v) do
|
||||||
if j.AnimalEmote then
|
if j.AnimalEmote then
|
||||||
DP[k][i] = nil
|
RP[k][i] = nil
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -126,7 +124,7 @@ function AddEmoteMenu(menu)
|
|||||||
submenu:AddItem(keyinfo)
|
submenu:AddItem(keyinfo)
|
||||||
end
|
end
|
||||||
|
|
||||||
for a, b in pairsByKeys(DP.Emotes) do
|
for a, b in pairsByKeys(RP.Emotes) do
|
||||||
x, y, z = table.unpack(b)
|
x, y, z = table.unpack(b)
|
||||||
emoteitem = NativeUI.CreateItem(z, "/e (" .. a .. ")")
|
emoteitem = NativeUI.CreateItem(z, "/e (" .. a .. ")")
|
||||||
submenu:AddItem(emoteitem)
|
submenu:AddItem(emoteitem)
|
||||||
@@ -136,7 +134,7 @@ function AddEmoteMenu(menu)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
for a, b in pairsByKeys(DP.Dances) do
|
for a, b in pairsByKeys(RP.Dances) do
|
||||||
x, y, z = table.unpack(b)
|
x, y, z = table.unpack(b)
|
||||||
danceitem = NativeUI.CreateItem(z, "/e (" .. a .. ")")
|
danceitem = NativeUI.CreateItem(z, "/e (" .. a .. ")")
|
||||||
dancemenu:AddItem(danceitem)
|
dancemenu:AddItem(danceitem)
|
||||||
@@ -151,7 +149,7 @@ function AddEmoteMenu(menu)
|
|||||||
end
|
end
|
||||||
|
|
||||||
if Config.AnimalEmotesEnabled then
|
if Config.AnimalEmotesEnabled then
|
||||||
for a, b in pairsByKeys(DP.AnimalEmotes) do
|
for a, b in pairsByKeys(RP.AnimalEmotes) do
|
||||||
x, y, z = table.unpack(b)
|
x, y, z = table.unpack(b)
|
||||||
animalitem = NativeUI.CreateItem(z, "/e (" .. a .. ")")
|
animalitem = NativeUI.CreateItem(z, "/e (" .. a .. ")")
|
||||||
animalmenu:AddItem(animalitem)
|
animalmenu:AddItem(animalitem)
|
||||||
@@ -163,7 +161,7 @@ function AddEmoteMenu(menu)
|
|||||||
end
|
end
|
||||||
|
|
||||||
if Config.SharedEmotesEnabled then
|
if Config.SharedEmotesEnabled then
|
||||||
for a, b in pairsByKeys(DP.Shared) do
|
for a, b in pairsByKeys(RP.Shared) do
|
||||||
x, y, z, otheremotename = table.unpack(b)
|
x, y, z, otheremotename = table.unpack(b)
|
||||||
if otheremotename == nil then
|
if otheremotename == nil then
|
||||||
shareitem = NativeUI.CreateItem(z, "/nearby (~g~" .. a .. "~w~)")
|
shareitem = NativeUI.CreateItem(z, "/nearby (~g~" .. a .. "~w~)")
|
||||||
@@ -177,7 +175,7 @@ function AddEmoteMenu(menu)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
for a, b in pairsByKeys(DP.PropEmotes) do
|
for a, b in pairsByKeys(RP.PropEmotes) do
|
||||||
x, y, z = table.unpack(b)
|
x, y, z = table.unpack(b)
|
||||||
|
|
||||||
if b.AnimationOptions.PropTextureVariations then
|
if b.AnimationOptions.PropTextureVariations then
|
||||||
@@ -232,7 +230,7 @@ function AddEmoteMenu(menu)
|
|||||||
if ShareTable[index] ~= 'none' then
|
if ShareTable[index] ~= 'none' then
|
||||||
target, distance = GetClosestPlayer()
|
target, distance = GetClosestPlayer()
|
||||||
if (distance ~= -1 and distance < 3) then
|
if (distance ~= -1 and distance < 3) then
|
||||||
_, _, rename = table.unpack(DP.Shared[ShareTable[index]])
|
_, _, rename = table.unpack(RP.Shared[ShareTable[index]])
|
||||||
TriggerServerEvent("ServerEmoteRequest", GetPlayerServerId(target), ShareTable[index])
|
TriggerServerEvent("ServerEmoteRequest", GetPlayerServerId(target), ShareTable[index])
|
||||||
SimpleNotify(Config.Languages[lang]['sentrequestto'] .. GetPlayerName(target))
|
SimpleNotify(Config.Languages[lang]['sentrequestto'] .. GetPlayerName(target))
|
||||||
else
|
else
|
||||||
@@ -244,7 +242,7 @@ function AddEmoteMenu(menu)
|
|||||||
shareddancemenu.OnItemSelect = function(sender, item, index)
|
shareddancemenu.OnItemSelect = function(sender, item, index)
|
||||||
target, distance = GetClosestPlayer()
|
target, distance = GetClosestPlayer()
|
||||||
if (distance ~= -1 and distance < 3) then
|
if (distance ~= -1 and distance < 3) then
|
||||||
_, _, rename = table.unpack(DP.Dances[DanceTable[index]])
|
_, _, rename = table.unpack(RP.Dances[DanceTable[index]])
|
||||||
TriggerServerEvent("ServerEmoteRequest", GetPlayerServerId(target), DanceTable[index], 'Dances')
|
TriggerServerEvent("ServerEmoteRequest", GetPlayerServerId(target), DanceTable[index], 'Dances')
|
||||||
SimpleNotify(Config.Languages[lang]['sentrequestto'] .. GetPlayerName(target))
|
SimpleNotify(Config.Languages[lang]['sentrequestto'] .. GetPlayerName(target))
|
||||||
else
|
else
|
||||||
@@ -288,7 +286,7 @@ if Config.Search then
|
|||||||
local input = GetOnscreenKeyboardResult()
|
local input = GetOnscreenKeyboardResult()
|
||||||
if input ~= nil then
|
if input ~= nil then
|
||||||
local results = {}
|
local results = {}
|
||||||
for k, v in pairs(DP) do
|
for k, v in pairs(RP) do
|
||||||
if not ignoredCategories[k] then
|
if not ignoredCategories[k] then
|
||||||
for a, b in pairs(v) do
|
for a, b in pairs(v) do
|
||||||
if string.find(string.lower(a), string.lower(input)) or (b[3] ~= nil and string.find(string.lower(b[3]), string.lower(input))) then
|
if string.find(string.lower(a), string.lower(input)) or (b[3] ~= nil and string.find(string.lower(b[3]), string.lower(input))) then
|
||||||
@@ -368,7 +366,7 @@ if Config.Search then
|
|||||||
elseif data.table == "Shared" then
|
elseif data.table == "Shared" then
|
||||||
target, distance = GetClosestPlayer()
|
target, distance = GetClosestPlayer()
|
||||||
if (distance ~= -1 and distance < 3) then
|
if (distance ~= -1 and distance < 3) then
|
||||||
_, _, rename = table.unpack(DP.Shared[data.name])
|
_, _, rename = table.unpack(RP.Shared[data.name])
|
||||||
TriggerServerEvent("ServerEmoteRequest", GetPlayerServerId(target), data.name)
|
TriggerServerEvent("ServerEmoteRequest", GetPlayerServerId(target), data.name)
|
||||||
SimpleNotify(Config.Languages[lang]['sentrequestto'] .. GetPlayerName(target))
|
SimpleNotify(Config.Languages[lang]['sentrequestto'] .. GetPlayerName(target))
|
||||||
else
|
else
|
||||||
@@ -388,7 +386,7 @@ if Config.Search then
|
|||||||
local data = results[index]
|
local data = results[index]
|
||||||
target, distance = GetClosestPlayer()
|
target, distance = GetClosestPlayer()
|
||||||
if (distance ~= -1 and distance < 3) then
|
if (distance ~= -1 and distance < 3) then
|
||||||
_, _, rename = table.unpack(DP.Dances[data.name])
|
_, _, rename = table.unpack(RP.Dances[data.name])
|
||||||
TriggerServerEvent("ServerEmoteRequest", GetPlayerServerId(target), data.name, 'Dances')
|
TriggerServerEvent("ServerEmoteRequest", GetPlayerServerId(target), data.name, 'Dances')
|
||||||
SimpleNotify(Config.Languages[lang]['sentrequestto'] .. GetPlayerName(target))
|
SimpleNotify(Config.Languages[lang]['sentrequestto'] .. GetPlayerName(target))
|
||||||
else
|
else
|
||||||
@@ -441,7 +439,7 @@ function AddWalkMenu(menu)
|
|||||||
submenu:AddItem(WalkInjured)
|
submenu:AddItem(WalkInjured)
|
||||||
table.insert(WalkTable, "move_m@injured")
|
table.insert(WalkTable, "move_m@injured")
|
||||||
|
|
||||||
for a, b in pairsByKeys(DP.Walks) do
|
for a, b in pairsByKeys(RP.Walks) do
|
||||||
x, label = table.unpack(b)
|
x, label = table.unpack(b)
|
||||||
walkitem = NativeUI.CreateItem(label or a, "/walk (" .. string.lower(a) .. ")")
|
walkitem = NativeUI.CreateItem(label or a, "/walk (" .. string.lower(a) .. ")")
|
||||||
submenu:AddItem(walkitem)
|
submenu:AddItem(walkitem)
|
||||||
@@ -465,7 +463,7 @@ function AddFaceMenu(menu)
|
|||||||
submenu:AddItem(facereset)
|
submenu:AddItem(facereset)
|
||||||
table.insert(FaceTable, "")
|
table.insert(FaceTable, "")
|
||||||
|
|
||||||
for a, b in pairsByKeys(DP.Expressions) do
|
for a, b in pairsByKeys(RP.Expressions) do
|
||||||
x, y, z = table.unpack(b)
|
x, y, z = table.unpack(b)
|
||||||
faceitem = NativeUI.CreateItem(a, "")
|
faceitem = NativeUI.CreateItem(a, "")
|
||||||
submenu:AddItem(faceitem)
|
submenu:AddItem(faceitem)
|
||||||
@@ -570,14 +568,14 @@ function ProcessMenu()
|
|||||||
isMenuProcessing = false
|
isMenuProcessing = false
|
||||||
end
|
end
|
||||||
|
|
||||||
RegisterNetEvent("dp:Update")
|
RegisterNetEvent("rp:Update")
|
||||||
AddEventHandler("dp:Update", function(state)
|
AddEventHandler("rp:Update", function(state)
|
||||||
UpdateAvailable = state
|
UpdateAvailable = state
|
||||||
AddInfoMenu(mainMenu)
|
AddInfoMenu(mainMenu)
|
||||||
_menuPool:RefreshIndex()
|
_menuPool:RefreshIndex()
|
||||||
end)
|
end)
|
||||||
|
|
||||||
RegisterNetEvent("dp:RecieveMenu") -- For opening the emote menu from another resource.
|
RegisterNetEvent("rp:RecieveMenu") -- For opening the emote menu from another resource.
|
||||||
AddEventHandler("dp:RecieveMenu", function()
|
AddEventHandler("rp:RecieveMenu", function()
|
||||||
OpenEmoteMenu()
|
OpenEmoteMenu()
|
||||||
end)
|
end)
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ if Config.SqlKeybinding then
|
|||||||
while true do
|
while true do
|
||||||
if NetworkIsPlayerActive(PlayerId()) and not Initialized then
|
if NetworkIsPlayerActive(PlayerId()) and not Initialized then
|
||||||
if not Initialized then
|
if not Initialized then
|
||||||
TriggerServerEvent("dp:ServerKeybindExist")
|
TriggerServerEvent("rp:ServerKeybindExist")
|
||||||
Wait(5000)
|
Wait(5000)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -43,17 +43,17 @@ if Config.SqlKeybinding then
|
|||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
RegisterNetEvent("dp:ClientKeybindExist")
|
RegisterNetEvent("rp:ClientKeybindExist")
|
||||||
AddEventHandler("dp:ClientKeybindExist", function(does)
|
AddEventHandler("rp:ClientKeybindExist", function(does)
|
||||||
if does then
|
if does then
|
||||||
TriggerServerEvent("dp:ServerKeybindGrab")
|
TriggerServerEvent("rp:ServerKeybindGrab")
|
||||||
else
|
else
|
||||||
TriggerServerEvent("dp:ServerKeybindCreate")
|
TriggerServerEvent("rp:ServerKeybindCreate")
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
RegisterNetEvent("dp:ClientKeybindGet")
|
RegisterNetEvent("rp:ClientKeybindGet")
|
||||||
AddEventHandler("dp:ClientKeybindGet", function(k1, e1, k2, e2, k3, e3, k4, e4, k5, e5, k6, e6)
|
AddEventHandler("rp:ClientKeybindGet", function(k1, e1, k2, e2, k3, e3, k4, e4, k5, e5, k6, e6)
|
||||||
keyb1 = k1
|
keyb1 = k1
|
||||||
emob1 = e1
|
emob1 = e1
|
||||||
keyb2 = k2
|
keyb2 = k2
|
||||||
@@ -69,8 +69,8 @@ if Config.SqlKeybinding then
|
|||||||
Initialized = true
|
Initialized = true
|
||||||
end)
|
end)
|
||||||
|
|
||||||
RegisterNetEvent("dp:ClientKeybindGetOne")
|
RegisterNetEvent("rp:ClientKeybindGetOne")
|
||||||
AddEventHandler("dp:ClientKeybindGetOne", function(key, e)
|
AddEventHandler("rp:ClientKeybindGetOne", function(key, e)
|
||||||
SimpleNotify(Config.Languages[lang]['bound'] ..
|
SimpleNotify(Config.Languages[lang]['bound'] ..
|
||||||
"~y~" .. e .. "~w~ " .. Config.Languages[lang]['to'] .. " ~g~" .. firstToUpper(key) .. "~w~")
|
"~y~" .. e .. "~w~ " .. Config.Languages[lang]['to'] .. " ~g~" .. firstToUpper(key) .. "~w~")
|
||||||
if key == "num4" then emob1 = e
|
if key == "num4" then emob1 = e
|
||||||
@@ -107,12 +107,12 @@ if Config.SqlKeybinding then
|
|||||||
local key = string.lower(args[1])
|
local key = string.lower(args[1])
|
||||||
local emote = string.lower(args[2])
|
local emote = string.lower(args[2])
|
||||||
if (Config.KeybindKeys[key]) ~= nil then
|
if (Config.KeybindKeys[key]) ~= nil then
|
||||||
if DP.Emotes[emote] ~= nil then
|
if RP.Emotes[emote] ~= nil then
|
||||||
TriggerServerEvent("dp:ServerKeybindUpdate", key, emote)
|
TriggerServerEvent("rp:ServerKeybindUpdate", key, emote)
|
||||||
elseif DP.Dances[emote] ~= nil then
|
elseif RP.Dances[emote] ~= nil then
|
||||||
TriggerServerEvent("dp:ServerKeybindUpdate", key, emote)
|
TriggerServerEvent("rp:ServerKeybindUpdate", key, emote)
|
||||||
elseif DP.PropEmotes[emote] ~= nil then
|
elseif RP.PropEmotes[emote] ~= nil then
|
||||||
TriggerServerEvent("dp:ServerKeybindUpdate", key, emote)
|
TriggerServerEvent("rp:ServerKeybindUpdate", key, emote)
|
||||||
else
|
else
|
||||||
EmoteChatMessage("'" .. emote .. "' " .. Config.Languages[lang]['notvalidemote'] .. "")
|
EmoteChatMessage("'" .. emote .. "' " .. Config.Languages[lang]['notvalidemote'] .. "")
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -14,8 +14,8 @@ if Config.SharedEmotesEnabled then
|
|||||||
local emotename = string.lower(args[1])
|
local emotename = string.lower(args[1])
|
||||||
target, distance = GetClosestPlayer()
|
target, distance = GetClosestPlayer()
|
||||||
if (distance ~= -1 and distance < 3) then
|
if (distance ~= -1 and distance < 3) then
|
||||||
if DP.Shared[emotename] ~= nil then
|
if RP.Shared[emotename] ~= nil then
|
||||||
dict, anim, ename = table.unpack(DP.Shared[emotename])
|
dict, anim, ename = table.unpack(RP.Shared[emotename])
|
||||||
TriggerServerEvent("ServerEmoteRequest", GetPlayerServerId(target), emotename)
|
TriggerServerEvent("ServerEmoteRequest", GetPlayerServerId(target), emotename)
|
||||||
SimpleNotify(Config.Languages[lang]['sentrequestto'] ..
|
SimpleNotify(Config.Languages[lang]['sentrequestto'] ..
|
||||||
GetPlayerName(target) .. " ~w~(~g~" .. ename .. "~w~)")
|
GetPlayerName(target) .. " ~w~(~g~" .. ename .. "~w~)")
|
||||||
@@ -37,32 +37,32 @@ AddEventHandler("SyncPlayEmote", function(emote, player)
|
|||||||
Wait(300)
|
Wait(300)
|
||||||
targetPlayerId = player
|
targetPlayerId = player
|
||||||
-- wait a little to make sure animation shows up right on both clients after canceling any previous emote
|
-- wait a little to make sure animation shows up right on both clients after canceling any previous emote
|
||||||
if DP.Shared[emote] ~= nil then
|
if RP.Shared[emote] ~= nil then
|
||||||
if DP.Shared[emote].AnimationOptions and DP.Shared[emote].AnimationOptions.Attachto then
|
if RP.Shared[emote].AnimationOptions and RP.Shared[emote].AnimationOptions.Attachto then
|
||||||
-- We do not want to attach the player if the target emote already is attached to player
|
-- We do not want to attach the player if the target emote already is attached to player
|
||||||
-- this would cause issue where both player would be attached to each other and fall under the map
|
-- this would cause issue where both player would be attached to each other and fall under the map
|
||||||
local targetEmote = DP.Shared[emote][4]
|
local targetEmote = RP.Shared[emote][4]
|
||||||
if not targetEmote or not DP.Shared[targetEmote] or not DP.Shared[targetEmote].AnimationOptions or
|
if not targetEmote or not RP.Shared[targetEmote] or not RP.Shared[targetEmote].AnimationOptions or
|
||||||
not DP.Shared[targetEmote].AnimationOptions.Attachto then
|
not RP.Shared[targetEmote].AnimationOptions.Attachto then
|
||||||
local plyServerId = GetPlayerFromServerId(player)
|
local plyServerId = GetPlayerFromServerId(player)
|
||||||
local ply = PlayerPedId()
|
local ply = PlayerPedId()
|
||||||
local pedInFront = GetPlayerPed(plyServerId ~= 0 and plyServerId or GetClosestPlayer())
|
local pedInFront = GetPlayerPed(plyServerId ~= 0 and plyServerId or GetClosestPlayer())
|
||||||
local bone = DP.Shared[emote].AnimationOptions.bone or -1 -- No bone
|
local bone = RP.Shared[emote].AnimationOptions.bone or -1 -- No bone
|
||||||
local xPos = DP.Shared[emote].AnimationOptions.xPos or 0.0
|
local xPos = RP.Shared[emote].AnimationOptions.xPos or 0.0
|
||||||
local yPos = DP.Shared[emote].AnimationOptions.yPos or 0.0
|
local yPos = RP.Shared[emote].AnimationOptions.yPos or 0.0
|
||||||
local zPos = DP.Shared[emote].AnimationOptions.zPos or 0.0
|
local zPos = RP.Shared[emote].AnimationOptions.zPos or 0.0
|
||||||
local xRot = DP.Shared[emote].AnimationOptions.xRot or 0.0
|
local xRot = RP.Shared[emote].AnimationOptions.xRot or 0.0
|
||||||
local yRot = DP.Shared[emote].AnimationOptions.yRot or 0.0
|
local yRot = RP.Shared[emote].AnimationOptions.yRot or 0.0
|
||||||
local zRot = DP.Shared[emote].AnimationOptions.zRot or 0.0
|
local zRot = RP.Shared[emote].AnimationOptions.zRot or 0.0
|
||||||
AttachEntityToEntity(ply, pedInFront, GetPedBoneIndex(pedInFront, bone), xPos, yPos, zPos, xRot, yRot,
|
AttachEntityToEntity(ply, pedInFront, GetPedBoneIndex(pedInFront, bone), xPos, yPos, zPos, xRot, yRot,
|
||||||
zRot, false, false, false, true, 1, true)
|
zRot, false, false, false, true, 1, true)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if OnEmotePlay(DP.Shared[emote]) then end
|
OnEmotePlay(RP.Shared[emote])
|
||||||
return
|
return
|
||||||
elseif DP.Dances[emote] ~= nil then
|
elseif RP.Dances[emote] ~= nil then
|
||||||
if OnEmotePlay(DP.Dances[emote]) then end
|
OnEmotePlay(RP.Dances[emote])
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
@@ -77,7 +77,7 @@ AddEventHandler("SyncPlayEmoteSource", function(emote, player)
|
|||||||
local SyncOffsetFront = 1.0
|
local SyncOffsetFront = 1.0
|
||||||
local SyncOffsetSide = 0.0
|
local SyncOffsetSide = 0.0
|
||||||
|
|
||||||
local AnimationOptions = DP.Shared[emote] and DP.Shared[emote].AnimationOptions
|
local AnimationOptions = RP.Shared[emote] and RP.Shared[emote].AnimationOptions
|
||||||
if AnimationOptions then
|
if AnimationOptions then
|
||||||
if AnimationOptions.SyncOffsetFront then
|
if AnimationOptions.SyncOffsetFront then
|
||||||
SyncOffsetFront = AnimationOptions.SyncOffsetFront + 0.0
|
SyncOffsetFront = AnimationOptions.SyncOffsetFront + 0.0
|
||||||
@@ -106,11 +106,11 @@ AddEventHandler("SyncPlayEmoteSource", function(emote, player)
|
|||||||
EmoteCancel()
|
EmoteCancel()
|
||||||
Wait(300)
|
Wait(300)
|
||||||
targetPlayerId = player
|
targetPlayerId = player
|
||||||
if DP.Shared[emote] ~= nil then
|
if RP.Shared[emote] ~= nil then
|
||||||
if OnEmotePlay(DP.Shared[emote]) then end
|
OnEmotePlay(RP.Shared[emote])
|
||||||
return
|
return
|
||||||
elseif DP.Dances[emote] ~= nil then
|
elseif RP.Dances[emote] ~= nil then
|
||||||
if OnEmotePlay(DP.Dances[emote]) then end
|
OnEmotePlay(RP.Dances[emote])
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
@@ -136,9 +136,9 @@ AddEventHandler("ClientEmoteRequestReceive", function(emotename, etype)
|
|||||||
requestedemote = emotename
|
requestedemote = emotename
|
||||||
|
|
||||||
if etype == 'Dances' then
|
if etype == 'Dances' then
|
||||||
_, _, remote = table.unpack(DP.Dances[requestedemote])
|
_, _, remote = table.unpack(RP.Dances[requestedemote])
|
||||||
else
|
else
|
||||||
_, _, remote = table.unpack(DP.Shared[requestedemote])
|
_, _, remote = table.unpack(RP.Shared[requestedemote])
|
||||||
end
|
end
|
||||||
|
|
||||||
PlaySound(-1, "NAV", "HUD_AMMO_SHOP_SOUNDSET", 0, 0, 1)
|
PlaySound(-1, "NAV", "HUD_AMMO_SHOP_SOUNDSET", 0, 0, 1)
|
||||||
@@ -151,10 +151,10 @@ Citizen.CreateThread(function()
|
|||||||
if IsControlJustPressed(1, 246) and isRequestAnim then
|
if IsControlJustPressed(1, 246) and isRequestAnim then
|
||||||
target, distance = GetClosestPlayer()
|
target, distance = GetClosestPlayer()
|
||||||
if (distance ~= -1 and distance < 3) then
|
if (distance ~= -1 and distance < 3) then
|
||||||
if DP.Shared[requestedemote] ~= nil then
|
if RP.Shared[requestedemote] ~= nil then
|
||||||
_, _, _, otheremote = table.unpack(DP.Shared[requestedemote])
|
_, _, _, otheremote = table.unpack(RP.Shared[requestedemote])
|
||||||
elseif DP.Dances[requestedemote] ~= nil then
|
elseif RP.Dances[requestedemote] ~= nil then
|
||||||
_, _, _, otheremote = table.unpack(DP.Dances[requestedemote])
|
_, _, _, otheremote = table.unpack(RP.Dances[requestedemote])
|
||||||
end
|
end
|
||||||
if otheremote == nil then otheremote = requestedemote end
|
if otheremote == nil then otheremote = requestedemote end
|
||||||
TriggerServerEvent("ServerValidEmote", GetPlayerServerId(target), requestedemote, otheremote)
|
TriggerServerEvent("ServerValidEmote", GetPlayerServerId(target), requestedemote, otheremote)
|
||||||
@@ -195,7 +195,7 @@ end
|
|||||||
|
|
||||||
function NearbysOnCommand(source, args, raw)
|
function NearbysOnCommand(source, args, raw)
|
||||||
local NearbysCommand = ""
|
local NearbysCommand = ""
|
||||||
for a in pairsByKeys(DP.Shared) do
|
for a in pairsByKeys(RP.Shared) do
|
||||||
NearbysCommand = NearbysCommand .. "" .. a .. ", "
|
NearbysCommand = NearbysCommand .. "" .. a .. ", "
|
||||||
end
|
end
|
||||||
EmoteChatMessage(NearbysCommand)
|
EmoteChatMessage(NearbysCommand)
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ end
|
|||||||
|
|
||||||
function WalksOnCommand(source, args, raw)
|
function WalksOnCommand(source, args, raw)
|
||||||
local WalksCommand = ""
|
local WalksCommand = ""
|
||||||
for a in pairsByKeys(DP.Walks) do
|
for a in pairsByKeys(RP.Walks) do
|
||||||
WalksCommand = WalksCommand .. "" .. string.lower(a) .. ", "
|
WalksCommand = WalksCommand .. "" .. string.lower(a) .. ", "
|
||||||
end
|
end
|
||||||
EmoteChatMessage(WalksCommand)
|
EmoteChatMessage(WalksCommand)
|
||||||
@@ -29,8 +29,8 @@ function WalkCommandStart(source, args, raw)
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
if tableHasKey(DP.Walks, name) then
|
if tableHasKey(RP.Walks, name) then
|
||||||
local name2 = table.unpack(DP.Walks[name])
|
local name2 = table.unpack(RP.Walks[name])
|
||||||
WalkMenuStart(name2)
|
WalkMenuStart(name2)
|
||||||
elseif name == "Injured" then
|
elseif name == "Injured" then
|
||||||
WalkMenuStart("move_m@injured")
|
WalkMenuStart("move_m@injured")
|
||||||
|
|||||||
40
config.lua
40
config.lua
@@ -1,5 +1,4 @@
|
|||||||
--- Dpemotes by DullPear is a free FiveM script ---
|
--- Maintained by TayMcKenzieNZ for the community ---
|
||||||
--- This release was forked and updated by TayMcKenzieNZ and the community ---
|
|
||||||
--- Leakers and resellers are the absolute scum of the earth ---
|
--- Leakers and resellers are the absolute scum of the earth ---
|
||||||
|
|
||||||
Config = {
|
Config = {
|
||||||
@@ -12,16 +11,17 @@ Config = {
|
|||||||
DebugDisplay = false,
|
DebugDisplay = false,
|
||||||
-- Set this to false if you have something else on X, and then just use /e c to cancel emotes.
|
-- Set this to false if you have something else on X, and then just use /e c to cancel emotes.
|
||||||
EnableXtoCancel = true,
|
EnableXtoCancel = true,
|
||||||
|
CancelEmoteKey = 'x', -- Get the button string here https://docs.fivem.net/docs/game-references/input-mapper-parameter-ids/keyboard/
|
||||||
-- Set this to true if you want to disarm the player when they play an emote.
|
-- Set this to true if you want to disarm the player when they play an emote.
|
||||||
DisarmPlayer = false,
|
DisarmPlayer = false,
|
||||||
-- Set this if you really wanna disable emotes in cars, as of 1.7.2 they only play the upper body part if in vehicle
|
-- Set this if you really wanna disable emotes in cars, as of 1.7.2 they only play the upper body part if in vehicle
|
||||||
AllowedInCars = true,
|
AllowedInCars = true,
|
||||||
-- You can disable the menu here / change the keybind. It is currently set to F5
|
-- You can disable the menu here / change the keybind. It is currently set to F5
|
||||||
MenuKeybindEnabled = true,
|
MenuKeybindEnabled = true,
|
||||||
MenuKeybind = 'F5', -- Get the button string here https://docs.fivem.net/docs/game-references/input-mapper-parameter-ids/keyboard/
|
MenuKeybind = 'f4', -- Get the button string here https://docs.fivem.net/docs/game-references/input-mapper-parameter-ids/keyboard/
|
||||||
-- You can disable the Favorite emote keybinding here.
|
-- You can disable the Favorite emote keybinding here.
|
||||||
FavKeybindEnabled = true,
|
FavKeybindEnabled = true,
|
||||||
FavKeybind = 'CAPITAL', -- Get the button string here https://docs.fivem.net/docs/game-references/input-mapper-parameter-ids/keyboard/
|
FavKeybind = 'capital', -- Get the button string here https://docs.fivem.net/docs/game-references/input-mapper-parameter-ids/keyboard/
|
||||||
-- You can change the header image for the menu here
|
-- You can change the header image for the menu here
|
||||||
-- Use a 512 x 128 image!
|
-- Use a 512 x 128 image!
|
||||||
-- Note this might cause an issue of the image getting stuck on peoples screens
|
-- Note this might cause an issue of the image getting stuck on peoples screens
|
||||||
@@ -34,7 +34,7 @@ Config = {
|
|||||||
MenuPosition = "right", -- (left, right)
|
MenuPosition = "right", -- (left, right)
|
||||||
-- You can enable or disable the Ragdoll keybinding here.
|
-- You can enable or disable the Ragdoll keybinding here.
|
||||||
RagdollEnabled = false,
|
RagdollEnabled = false,
|
||||||
RagdollKeybind = 'U', -- Get the button string here https://docs.fivem.net/docs/game-references/input-mapper-parameter-ids/keyboard/
|
RagdollKeybind = 'u', -- Get the button string here https://docs.fivem.net/docs/game-references/input-mapper-parameter-ids/keyboard/
|
||||||
-- You can enable or disable Ragdoll as Toggle here. Only works if RagdollEnabled is set to true.
|
-- You can enable or disable Ragdoll as Toggle here. Only works if RagdollEnabled is set to true.
|
||||||
RagdollAsToggle = true,
|
RagdollAsToggle = true,
|
||||||
-- You can disable the Facial Expressions menu here.
|
-- You can disable the Facial Expressions menu here.
|
||||||
@@ -61,10 +61,10 @@ Config = {
|
|||||||
Search = true,
|
Search = true,
|
||||||
-- You can disable the handsup here / change the keybind. It is currently set to H
|
-- You can disable the handsup here / change the keybind. It is currently set to H
|
||||||
HandsupKeybindEnabled = false,
|
HandsupKeybindEnabled = false,
|
||||||
HandsupKeybind = 'H', -- Get the button string here https://docs.fivem.net/docs/game-references/input-mapper-parameter-ids/keyboard/
|
HandsupKeybind = 'h', -- Get the button string here https://docs.fivem.net/docs/game-references/input-mapper-parameter-ids/keyboard/
|
||||||
-- You can disable the fingrer pointing here / change the keybind. It is currently set to B
|
-- You can disable the fingrer pointing here / change the keybind. It is currently set to B
|
||||||
PointingKeybindEnabled = false,
|
PointingKeybindEnabled = false,
|
||||||
PointingKeybind = 'B', -- Get the button string here https://docs.fivem.net/docs/game-references/input-mapper-parameter-ids/keyboard/
|
PointingKeybind = 'b', -- Get the button string here https://docs.fivem.net/docs/game-references/input-mapper-parameter-ids/keyboard/
|
||||||
CheckForUpdates = true,
|
CheckForUpdates = true,
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -98,7 +98,7 @@ Config.Languages = {
|
|||||||
['moods'] = "Humores 😒",
|
['moods'] = "Humores 😒",
|
||||||
['infoupdate'] = "Crédito e agradecimento 🙏🏻",
|
['infoupdate'] = "Crédito e agradecimento 🙏🏻",
|
||||||
['infoupdateav'] = "Informação (Atualização disponível)",
|
['infoupdateav'] = "Informação (Atualização disponível)",
|
||||||
['infoupdateavtext'] = "Uma atualização disponível, veja ~y~https://github.com/TayMcKenzieNZ/dpemotes~w~ para pegar",
|
['infoupdateavtext'] = "Uma atualização disponível, veja ~y~https://github.com/TayMcKenzieNZ/rpemotes~w~ para pegar",
|
||||||
['suggestions'] = "Sugestões?",
|
['suggestions'] = "Sugestões?",
|
||||||
['suggestionsinfo'] = "~r~TayMcKenzieNZ~s~ no fórum do FiveM para qualquer sugestão de recurso/emotes! ✉️",
|
['suggestionsinfo'] = "~r~TayMcKenzieNZ~s~ no fórum do FiveM para qualquer sugestão de recurso/emotes! ✉️",
|
||||||
['notvaliddance'] = "não é uma dança válida.",
|
['notvaliddance'] = "não é uma dança válida.",
|
||||||
@@ -156,7 +156,7 @@ Config.Languages = {
|
|||||||
['moods'] = "Výrazy 😒",
|
['moods'] = "Výrazy 😒",
|
||||||
['infoupdate'] = "Kredity a nápady 🙏🏻",
|
['infoupdate'] = "Kredity a nápady 🙏🏻",
|
||||||
['infoupdateav'] = "Informace (aktualizace dostupná)",
|
['infoupdateav'] = "Informace (aktualizace dostupná)",
|
||||||
['infoupdateavtext'] = "Je k dispozici aktualizace, stáhněte si nejnovější verzi z ~y~https://github.com/TayMcKenzieNZ/dpemotes~w~",
|
['infoupdateavtext'] = "Je k dispozici aktualizace, stáhněte si nejnovější verzi z ~y~https://github.com/TayMcKenzieNZ/rpemotes~w~",
|
||||||
['suggestions'] = "Nápady?",
|
['suggestions'] = "Nápady?",
|
||||||
['suggestionsinfo'] = "~r~TayMcKenzieNZ~s~ na FiveM forums je pro jakýkoliv návrh! ✉️",
|
['suggestionsinfo'] = "~r~TayMcKenzieNZ~s~ na FiveM forums je pro jakýkoliv návrh! ✉️",
|
||||||
['notvaliddance'] = "Není platný tanec.",
|
['notvaliddance'] = "Není platný tanec.",
|
||||||
@@ -214,7 +214,7 @@ Config.Languages = {
|
|||||||
['moods'] = "Humør 😒",
|
['moods'] = "Humør 😒",
|
||||||
['infoupdate'] = "Info / Opdateringer",
|
['infoupdate'] = "Info / Opdateringer",
|
||||||
['infoupdateav'] = "Information (Opdatering tilgængelig)",
|
['infoupdateav'] = "Information (Opdatering tilgængelig)",
|
||||||
['infoupdateavtext'] = "En opdatering er tilgænglig, hent den nyeste version fra ~y~https://github.com/TayMcKenzieNZ/dpemotes~w~",
|
['infoupdateavtext'] = "En opdatering er tilgænglig, hent den nyeste version fra ~y~https://github.com/TayMcKenzieNZ/rpemotes~w~",
|
||||||
['suggestions'] = "Forslag?",
|
['suggestions'] = "Forslag?",
|
||||||
['suggestionsinfo'] = "~r~TayMcKenzieNZ~s~ på FiveM-forum for alle funktioner/emote-forslag! ✉️",
|
['suggestionsinfo'] = "~r~TayMcKenzieNZ~s~ på FiveM-forum for alle funktioner/emote-forslag! ✉️",
|
||||||
['notvaliddance'] = "er ikke en gyldig dans",
|
['notvaliddance'] = "er ikke en gyldig dans",
|
||||||
@@ -272,7 +272,7 @@ Config.Languages = {
|
|||||||
['moods'] = "Stemmingen 😒",
|
['moods'] = "Stemmingen 😒",
|
||||||
['infoupdate'] = "Credits en bedankt 🙏🏻",
|
['infoupdate'] = "Credits en bedankt 🙏🏻",
|
||||||
['infoupdateav'] = "Informatie (Update beschikbaar)",
|
['infoupdateav'] = "Informatie (Update beschikbaar)",
|
||||||
['infoupdateavtext'] = "Een update is beschikbaar, download de laatste versie via ~y~https://github.com/TayMcKenzieNZ/dpemotes~w~",
|
['infoupdateavtext'] = "Een update is beschikbaar, download de laatste versie via ~y~https://github.com/TayMcKenzieNZ/rpemotes~w~",
|
||||||
['suggestions'] = "Suggesties?",
|
['suggestions'] = "Suggesties?",
|
||||||
['suggestionsinfo'] = "~r~TayMcKenzieNZ~s~ op de FiveM forums om suggesties in te dienen! ✉️",
|
['suggestionsinfo'] = "~r~TayMcKenzieNZ~s~ op de FiveM forums om suggesties in te dienen! ✉️",
|
||||||
['notvaliddance'] = "Is geen geldige dans.",
|
['notvaliddance'] = "Is geen geldige dans.",
|
||||||
@@ -330,7 +330,7 @@ Config.Languages = {
|
|||||||
['moods'] = "Moods 😒",
|
['moods'] = "Moods 😒",
|
||||||
['infoupdate'] = "Credits & Suggestions 🙏🏻",
|
['infoupdate'] = "Credits & Suggestions 🙏🏻",
|
||||||
['infoupdateav'] = "Information (Update available)",
|
['infoupdateav'] = "Information (Update available)",
|
||||||
['infoupdateavtext'] = "An update is available, get the latest version from ~y~https://github.com/TayMcKenzieNZ/dpemotes~w~",
|
['infoupdateavtext'] = "An update is available, get the latest version from ~y~https://github.com/TayMcKenzieNZ/rpemotes~w~",
|
||||||
['suggestions'] = "Suggestions?",
|
['suggestions'] = "Suggestions?",
|
||||||
['suggestionsinfo'] = "~r~TayMcKenzieNZ~s~ on FiveM forums for any feature/emote suggestions! ✉️",
|
['suggestionsinfo'] = "~r~TayMcKenzieNZ~s~ on FiveM forums for any feature/emote suggestions! ✉️",
|
||||||
['notvaliddance'] = "is not a valid dance.",
|
['notvaliddance'] = "is not a valid dance.",
|
||||||
@@ -388,7 +388,7 @@ Config.Languages = {
|
|||||||
['moods'] = "Mielialat 😒",
|
['moods'] = "Mielialat 😒",
|
||||||
['infoupdate'] = "Krediitit & Ehdotukset 🙏🏻",
|
['infoupdate'] = "Krediitit & Ehdotukset 🙏🏻",
|
||||||
['infoupdateav'] = "Informaatio (Päivitys saatavilla)",
|
['infoupdateav'] = "Informaatio (Päivitys saatavilla)",
|
||||||
['infoupdateavtext'] = "Uusin versio saatavilla täältä ~y~https://github.com/TayMcKenzieNZ/dpemotes~w~",
|
['infoupdateavtext'] = "Uusin versio saatavilla täältä ~y~https://github.com/TayMcKenzieNZ/rpemotes~w~",
|
||||||
['suggestions'] = "Ehdotukset?",
|
['suggestions'] = "Ehdotukset?",
|
||||||
['suggestionsinfo'] = "~r~TayMcKenzieNZ~s~ FiveM foorumeilla liittyen mihin tahansa ominaisuus/animaatio ehdotukseen! ✉️",
|
['suggestionsinfo'] = "~r~TayMcKenzieNZ~s~ FiveM foorumeilla liittyen mihin tahansa ominaisuus/animaatio ehdotukseen! ✉️",
|
||||||
['notvaliddance'] = "Ei ole tanssi.",
|
['notvaliddance'] = "Ei ole tanssi.",
|
||||||
@@ -446,7 +446,7 @@ Config.Languages = {
|
|||||||
['moods'] = "Humeurs 😒",
|
['moods'] = "Humeurs 😒",
|
||||||
['infoupdate'] = "Crédits et suggestions 🙏🏻",
|
['infoupdate'] = "Crédits et suggestions 🙏🏻",
|
||||||
['infoupdateav'] = "Information (Mise à jour disponible)",
|
['infoupdateav'] = "Information (Mise à jour disponible)",
|
||||||
['infoupdateavtext'] = "Une mise à jour est disponible ~y~https://github.com/TayMcKenzieNZ/dpemotes~w~",
|
['infoupdateavtext'] = "Une mise à jour est disponible ~y~https://github.com/TayMcKenzieNZ/rpemotes~w~",
|
||||||
['suggestions'] = "Suggestions?",
|
['suggestions'] = "Suggestions?",
|
||||||
['suggestionsinfo'] = "~r~TayMcKenzieNZ~s~ sur les forums FiveM pour toutes les suggestions! ✉️",
|
['suggestionsinfo'] = "~r~TayMcKenzieNZ~s~ sur les forums FiveM pour toutes les suggestions! ✉️",
|
||||||
['notvaliddance'] = "n'est pas une danse valide",
|
['notvaliddance'] = "n'est pas une danse valide",
|
||||||
@@ -503,7 +503,7 @@ Config.Languages = {
|
|||||||
['moods'] = "Stimmungen 😒",
|
['moods'] = "Stimmungen 😒",
|
||||||
['infoupdate'] = "Credits und Dank 🙏🏻",
|
['infoupdate'] = "Credits und Dank 🙏🏻",
|
||||||
['infoupdateav'] = "Information (Update verfügbar)",
|
['infoupdateav'] = "Information (Update verfügbar)",
|
||||||
['infoupdateavtext'] = "Eine Aktualisierung ist verfügbar ~y~https://github.com/TayMcKenzieNZ/dpemotes~w~",
|
['infoupdateavtext'] = "Eine Aktualisierung ist verfügbar ~y~https://github.com/TayMcKenzieNZ/rpemotes~w~",
|
||||||
['suggestions'] = "Vorschläge?",
|
['suggestions'] = "Vorschläge?",
|
||||||
['suggestionsinfo'] = "~r~TayMcKenzieNZ~s~ in FiveM-Foren für alle Feature- / Emote-Vorschläge! ✉️",
|
['suggestionsinfo'] = "~r~TayMcKenzieNZ~s~ in FiveM-Foren für alle Feature- / Emote-Vorschläge! ✉️",
|
||||||
['notvaliddance'] = "ist kein gültiger Tanz",
|
['notvaliddance'] = "ist kein gültiger Tanz",
|
||||||
@@ -560,7 +560,7 @@ Config.Languages = {
|
|||||||
['moods'] = "Umori 😒",
|
['moods'] = "Umori 😒",
|
||||||
['infoupdate'] = "Crediti e grazie 🙏🏻",
|
['infoupdate'] = "Crediti e grazie 🙏🏻",
|
||||||
['infoupdateav'] = "Informazioni (Aggiornamento disponibile)",
|
['infoupdateav'] = "Informazioni (Aggiornamento disponibile)",
|
||||||
['infoupdateavtext'] = "Un aggiornamento è disponibile, ottieni l'ulima versione qui ~y~https://github.com/TayMcKenzieNZ/dpemotes~w~",
|
['infoupdateavtext'] = "Un aggiornamento è disponibile, ottieni l'ulima versione qui ~y~https://github.com/TayMcKenzieNZ/rpemotes~w~",
|
||||||
['suggestions'] = "Suggerimenti?",
|
['suggestions'] = "Suggerimenti?",
|
||||||
['suggestionsinfo'] = "~r~TayMcKenzieNZ~s~ nei forum di FiveM per suggerimenti su funzionalitá/animazioni! ✉️",
|
['suggestionsinfo'] = "~r~TayMcKenzieNZ~s~ nei forum di FiveM per suggerimenti su funzionalitá/animazioni! ✉️",
|
||||||
['notvaliddance'] = "non è un ballo valido.",
|
['notvaliddance'] = "non è un ballo valido.",
|
||||||
@@ -618,7 +618,7 @@ Config.Languages = {
|
|||||||
['moods'] = "Nastroje 😒",
|
['moods'] = "Nastroje 😒",
|
||||||
['infoupdate'] = "Creditsy & sugestie 🙏🏻",
|
['infoupdate'] = "Creditsy & sugestie 🙏🏻",
|
||||||
['infoupdateav'] = "Informacje (aktualizacja dostępna)",
|
['infoupdateav'] = "Informacje (aktualizacja dostępna)",
|
||||||
['infoupdateavtext'] = "Dostępna jest nowa aktualizacja, pobierz ją z: ~y~https://github.com/TayMcKenzieNZ/dpemotes~w~",
|
['infoupdateavtext'] = "Dostępna jest nowa aktualizacja, pobierz ją z: ~y~https://github.com/TayMcKenzieNZ/rpemotes~w~",
|
||||||
['suggestions'] = "Masz sugestie?",
|
['suggestions'] = "Masz sugestie?",
|
||||||
['suggestionsinfo'] = "Napisz do ~r~TayMcKenzieNZ~s~ na forum FiveMa odnośnie przyszłych ficzerów czy propozycji! ✉️",
|
['suggestionsinfo'] = "Napisz do ~r~TayMcKenzieNZ~s~ na forum FiveMa odnośnie przyszłych ficzerów czy propozycji! ✉️",
|
||||||
['notvaliddance'] = "nie jest poprawnym tańcem.",
|
['notvaliddance'] = "nie jest poprawnym tańcem.",
|
||||||
@@ -734,7 +734,7 @@ Config.Languages = {
|
|||||||
['moods'] = "Настроение 😒",
|
['moods'] = "Настроение 😒",
|
||||||
['infoupdate'] = "Признательность и предложения 🙏🏻",
|
['infoupdate'] = "Признательность и предложения 🙏🏻",
|
||||||
['infoupdateav'] = "Информация (Доступно обновление)",
|
['infoupdateav'] = "Информация (Доступно обновление)",
|
||||||
['infoupdateavtext'] = "Доступно обновление, загрузите последнюю версию с ~y~https://github.com/TayMcKenzieNZ/dpemotes~w~",
|
['infoupdateavtext'] = "Доступно обновление, загрузите последнюю версию с ~y~https://github.com/TayMcKenzieNZ/rpemotes~w~",
|
||||||
['suggestions'] = "Предложения?",
|
['suggestions'] = "Предложения?",
|
||||||
['suggestionsinfo'] = "~r~TayMcKenzieNZ~s~ на форумах FiveM для любых предложений по функциям/эмоциям! ✉️",
|
['suggestionsinfo'] = "~r~TayMcKenzieNZ~s~ на форумах FiveM для любых предложений по функциям/эмоциям! ✉️",
|
||||||
['notvaliddance'] = "не существующий танец.",
|
['notvaliddance'] = "не существующий танец.",
|
||||||
@@ -792,7 +792,7 @@ Config.Languages = {
|
|||||||
['moods'] = "Estados de animo 😒",
|
['moods'] = "Estados de animo 😒",
|
||||||
['infoupdate'] = "Créditos Y Sugerencias 🙏🏻",
|
['infoupdate'] = "Créditos Y Sugerencias 🙏🏻",
|
||||||
['infoupdateav'] = "Informacion (Actualizacion disponible)",
|
['infoupdateav'] = "Informacion (Actualizacion disponible)",
|
||||||
['infoupdateavtext'] = "Una actualizacion esta disponible, para conseguir la ultima version ingresa a ~y~https://github.com/TayMcKenzieNZ/dpemotes~w~",
|
['infoupdateavtext'] = "Una actualizacion esta disponible, para conseguir la ultima version ingresa a ~y~https://github.com/TayMcKenzieNZ/rpemotes~w~",
|
||||||
['suggestions'] = "Sugerencias?",
|
['suggestions'] = "Sugerencias?",
|
||||||
['suggestionsinfo'] = "~r~TayMcKenzieNZ~s~ en el foro de FiveM para cualquier sugerencia! ✉️",
|
['suggestionsinfo'] = "~r~TayMcKenzieNZ~s~ en el foro de FiveM para cualquier sugerencia! ✉️",
|
||||||
['notvaliddance'] = "no es un baile valido.",
|
['notvaliddance'] = "no es un baile valido.",
|
||||||
@@ -849,7 +849,7 @@ Config.Languages = {
|
|||||||
['moods'] = "Humör 😒",
|
['moods'] = "Humör 😒",
|
||||||
['infoupdate'] = "Krediter Och Förslag 🙏🏻",
|
['infoupdate'] = "Krediter Och Förslag 🙏🏻",
|
||||||
['infoupdateav'] = "Information (Uppdatering tillgänglig)",
|
['infoupdateav'] = "Information (Uppdatering tillgänglig)",
|
||||||
['infoupdateavtext'] = "En uppdatering är tillgänglig ~y~https://github.com/TayMcKenzieNZ/dpemotes~w~",
|
['infoupdateavtext'] = "En uppdatering är tillgänglig ~y~https://github.com/TayMcKenzieNZ/rpemotes~w~",
|
||||||
['suggestions'] = "Förslag?",
|
['suggestions'] = "Förslag?",
|
||||||
['suggestionsinfo'] = "~r~TayMcKenzieNZ~s~ på FiveM-forum för förslag på funktioner/emotes! ✉️",
|
['suggestionsinfo'] = "~r~TayMcKenzieNZ~s~ på FiveM-forum för förslag på funktioner/emotes! ✉️",
|
||||||
['notvaliddance'] = "är inte en giltig dans",
|
['notvaliddance'] = "är inte en giltig dans",
|
||||||
|
|||||||
@@ -1,10 +1,9 @@
|
|||||||
--- DPEmotes by andristum ---
|
--- Maintained by TayMcKenzieNZ ---
|
||||||
--- Forked by TayMcKenzieNZ ---
|
--- Check for updates at https://github.com/TayMcKenzieNZ/rpemotes ---
|
||||||
--- Check for updates at https://github.com/TayMcKenzieNZ/dpemotes ---
|
|
||||||
|
|
||||||
fx_version 'cerulean'
|
fx_version 'cerulean'
|
||||||
|
|
||||||
game 'gta5'
|
game 'gta5'
|
||||||
|
version '1.0.0'
|
||||||
lua54 'yes'
|
lua54 'yes'
|
||||||
|
|
||||||
-- Remove the following lines if you would like to use the SQL keybinds. Requires oxmysql.
|
-- Remove the following lines if you would like to use the SQL keybinds. Requires oxmysql.
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
print("DpEmotes forked by TayMcKenzieNZ loaded sucessfully.")
|
print("RpEmotes maintained by TayMcKenzieNZ loaded sucessfully.")
|
||||||
|
|||||||
@@ -2,26 +2,23 @@
|
|||||||
-- Shared Emotes Syncing ---------------------------------------------------------------------------
|
-- Shared Emotes Syncing ---------------------------------------------------------------------------
|
||||||
-----------------------------------------------------------------------------------------------------
|
-----------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
RegisterServerEvent("ServerEmoteRequest")
|
RegisterNetEvent("ServerEmoteRequest", function(target, emotename, etype)
|
||||||
AddEventHandler("ServerEmoteRequest", function(target, emotename, etype)
|
|
||||||
TriggerClientEvent("ClientEmoteRequestReceive", target, emotename, etype)
|
TriggerClientEvent("ClientEmoteRequestReceive", target, emotename, etype)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
RegisterServerEvent("ServerValidEmote")
|
RegisterNetEvent("ServerValidEmote", function(target, requestedemote, otheremote)
|
||||||
AddEventHandler("ServerValidEmote", function(target, requestedemote, otheremote)
|
|
||||||
TriggerClientEvent("SyncPlayEmote", source, otheremote, target)
|
TriggerClientEvent("SyncPlayEmote", source, otheremote, target)
|
||||||
TriggerClientEvent("SyncPlayEmoteSource", target, requestedemote, source)
|
TriggerClientEvent("SyncPlayEmoteSource", target, requestedemote, source)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
RegisterServerEvent("ServerEmoteCancel")
|
RegisterNetEvent("ServerEmoteCancel", function(target)
|
||||||
AddEventHandler("ServerEmoteCancel", function(target)
|
|
||||||
TriggerClientEvent("SyncCancelEmote", target, source)
|
TriggerClientEvent("SyncCancelEmote", target, source)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
--#region ptfx
|
--#region ptfx
|
||||||
RegisterNetEvent("dpemotes:ptfx:sync", function(asset, name, offset, rot, scale)
|
RegisterNetEvent("rpemotes:ptfx:sync", function(asset, name, offset, rot, scale, color)
|
||||||
if type(asset) ~= "string" or type(name) ~= "string" or type(offset) ~= "vector3" or type(rot) ~= "vector3" then
|
if type(asset) ~= "string" or type(name) ~= "string" or type(offset) ~= "vector3" or type(rot) ~= "vector3" then
|
||||||
print("[dpemotes] ptfx:sync: invalid arguments for source:", source)
|
print("[rpemotes] ptfx:sync: invalid arguments for source:", source)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
local srcPlayerState = Player(source).state
|
local srcPlayerState = Player(source).state
|
||||||
@@ -30,11 +27,12 @@ RegisterNetEvent("dpemotes:ptfx:sync", function(asset, name, offset, rot, scale)
|
|||||||
srcPlayerState:set('ptfxOffset', offset, true)
|
srcPlayerState:set('ptfxOffset', offset, true)
|
||||||
srcPlayerState:set('ptfxRot', rot, true)
|
srcPlayerState:set('ptfxRot', rot, true)
|
||||||
srcPlayerState:set('ptfxScale', scale, true)
|
srcPlayerState:set('ptfxScale', scale, true)
|
||||||
|
srcPlayerState:set('ptfxColor', color, true)
|
||||||
srcPlayerState:set('ptfxPropNet', false, true)
|
srcPlayerState:set('ptfxPropNet', false, true)
|
||||||
srcPlayerState:set('ptfx', false, true)
|
srcPlayerState:set('ptfx', false, true)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
RegisterNetEvent("dpemotes:ptfx:syncProp", function(propNet)
|
RegisterNetEvent("rpemotes:ptfx:syncProp", function(propNet)
|
||||||
local srcPlayerState = Player(source).state
|
local srcPlayerState = Player(source).state
|
||||||
if propNet then
|
if propNet then
|
||||||
-- Prevent infinite loop to get entity
|
-- Prevent infinite loop to get entity
|
||||||
@@ -60,15 +58,14 @@ end)
|
|||||||
-----------------------------------------------------------------------------------------------------
|
-----------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
local function addKeybindEventHandlers()
|
local function addKeybindEventHandlers()
|
||||||
RegisterServerEvent("dp:ServerKeybindExist")
|
RegisterNetEvent("rp:ServerKeybindExist", function()
|
||||||
AddEventHandler('dp:ServerKeybindExist', function()
|
|
||||||
local src = source
|
local src = source
|
||||||
local srcid = GetPlayerIdentifier(source)
|
local srcid = GetPlayerIdentifier(source)
|
||||||
MySQL.query('SELECT * FROM dpkeybinds WHERE `id`=@id;', { id = srcid }, function(dpkeybinds)
|
MySQL.query('SELECT * FROM dpkeybinds WHERE `id`=@id;', { id = srcid }, function(dpkeybinds)
|
||||||
if dpkeybinds[1] then
|
if dpkeybinds[1] then
|
||||||
TriggerClientEvent("dp:ClientKeybindExist", src, true)
|
TriggerClientEvent("rp:ClientKeybindExist", src, true)
|
||||||
else
|
else
|
||||||
TriggerClientEvent("dp:ClientKeybindExist", src, false)
|
TriggerClientEvent("rp:ClientKeybindExist", src, false)
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
end)
|
end)
|
||||||
@@ -76,40 +73,37 @@ local function addKeybindEventHandlers()
|
|||||||
-- This is my first time doing SQL stuff, and after i finished everything i realized i didnt have to store the keybinds in the database at all.
|
-- This is my first time doing SQL stuff, and after i finished everything i realized i didnt have to store the keybinds in the database at all.
|
||||||
-- But remaking it now is a little pointless since it does it job just fine!
|
-- But remaking it now is a little pointless since it does it job just fine!
|
||||||
|
|
||||||
RegisterServerEvent("dp:ServerKeybindCreate")
|
RegisterNetEvent("rp:ServerKeybindCreate", function()
|
||||||
AddEventHandler("dp:ServerKeybindCreate", function()
|
|
||||||
local src = source
|
local src = source
|
||||||
local srcid = GetPlayerIdentifier(source)
|
local srcid = GetPlayerIdentifier(source)
|
||||||
MySQL.insert('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);'
|
MySQL.insert('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 = "",
|
{ id = srcid, keybind1 = "num4", emote1 = "", keybind2 = "num5", emote2 = "", keybind3 = "num6", emote3 = "",
|
||||||
keybind4 = "num7", emote4 = "", keybind5 = "num8", emote5 = "", keybind6 = "num9", emote6 = "" },
|
keybind4 = "num7", emote4 = "", keybind5 = "num8", emote5 = "", keybind6 = "num9", emote6 = "" },
|
||||||
function(created) print("[dp] ^2" .. GetPlayerName(src) .. "^7 got created!")
|
function(created) print("[rp] ^2" .. GetPlayerName(src) .. "^7 got created!")
|
||||||
TriggerClientEvent("dp:ClientKeybindGet"
|
TriggerClientEvent("rp:ClientKeybindGet"
|
||||||
, src, "num4", "", "num5", "", "num6", "", "num7", "", "num8", "", "num8", "")
|
, src, "num4", "", "num5", "", "num6", "", "num7", "", "num8", "", "num8", "")
|
||||||
end)
|
end)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
RegisterServerEvent("dp:ServerKeybindGrab")
|
RegisterNetEvent("rp:ServerKeybindGrab", function()
|
||||||
AddEventHandler("dp:ServerKeybindGrab", function()
|
|
||||||
local src = source
|
local src = source
|
||||||
local srcid = GetPlayerIdentifier(source)
|
local srcid = GetPlayerIdentifier(source)
|
||||||
MySQL.query('SELECT keybind1, emote1, keybind2, emote2, keybind3, emote3, keybind4, emote4, keybind5, emote5, keybind6, emote6 FROM `dpkeybinds` WHERE `id` = @id'
|
MySQL.query('SELECT keybind1, emote1, keybind2, emote2, keybind3, emote3, keybind4, emote4, keybind5, emote5, keybind6, emote6 FROM `dpkeybinds` WHERE `id` = @id'
|
||||||
,
|
,
|
||||||
{ ['@id'] = srcid }, function(kb)
|
{ ['@id'] = srcid }, function(kb)
|
||||||
if kb[1].keybind1 ~= nil then
|
if kb[1].keybind1 ~= nil then
|
||||||
TriggerClientEvent("dp:ClientKeybindGet", src, kb[1].keybind1, kb[1].emote1, kb[1].keybind2, kb[1].emote2
|
TriggerClientEvent("rp: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].keybind3, kb[1].emote3, kb[1].keybind4, kb[1].emote4, kb[1].keybind5, kb[1].emote5,
|
||||||
kb[1].keybind6, kb[1].emote6)
|
kb[1].keybind6, kb[1].emote6)
|
||||||
else
|
else
|
||||||
TriggerClientEvent("dp:ClientKeybindGet", src, "num4", "", "num5", "", "num6", "", "num7", "", "num8", ""
|
TriggerClientEvent("rp:ClientKeybindGet", src, "num4", "", "num5", "", "num6", "", "num7", "", "num8", ""
|
||||||
, "num8", "")
|
, "num8", "")
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
RegisterServerEvent("dp:ServerKeybindUpdate")
|
RegisterNetEvent("rp:ServerKeybindUpdate", function(key, emote)
|
||||||
AddEventHandler("dp:ServerKeybindUpdate", function(key, emote)
|
|
||||||
local src = source
|
local src = source
|
||||||
local myid = GetPlayerIdentifier(source)
|
local myid = GetPlayerIdentifier(source)
|
||||||
if key == "num4" then chosenk = "keybind1"
|
if key == "num4" then chosenk = "keybind1"
|
||||||
@@ -121,22 +115,22 @@ local function addKeybindEventHandlers()
|
|||||||
end
|
end
|
||||||
if chosenk == "keybind1" then
|
if chosenk == "keybind1" then
|
||||||
MySQL.update("UPDATE dpkeybinds SET emote1=@emote WHERE id=@id", { id = myid, emote = emote },
|
MySQL.update("UPDATE dpkeybinds SET emote1=@emote WHERE id=@id", { id = myid, emote = emote },
|
||||||
function() TriggerClientEvent("dp:ClientKeybindGetOne", src, key, emote) end)
|
function() TriggerClientEvent("rp:ClientKeybindGetOne", src, key, emote) end)
|
||||||
elseif chosenk == "keybind2" then
|
elseif chosenk == "keybind2" then
|
||||||
MySQL.update("UPDATE dpkeybinds SET emote2=@emote WHERE id=@id", { id = myid, emote = emote },
|
MySQL.update("UPDATE dpkeybinds SET emote2=@emote WHERE id=@id", { id = myid, emote = emote },
|
||||||
function() TriggerClientEvent("dp:ClientKeybindGetOne", src, key, emote) end)
|
function() TriggerClientEvent("rp:ClientKeybindGetOne", src, key, emote) end)
|
||||||
elseif chosenk == "keybind3" then
|
elseif chosenk == "keybind3" then
|
||||||
MySQL.update("UPDATE dpkeybinds SET emote3=@emote WHERE id=@id", { id = myid, emote = emote },
|
MySQL.update("UPDATE dpkeybinds SET emote3=@emote WHERE id=@id", { id = myid, emote = emote },
|
||||||
function() TriggerClientEvent("dp:ClientKeybindGetOne", src, key, emote) end)
|
function() TriggerClientEvent("rp:ClientKeybindGetOne", src, key, emote) end)
|
||||||
elseif chosenk == "keybind4" then
|
elseif chosenk == "keybind4" then
|
||||||
MySQL.update("UPDATE dpkeybinds SET emote4=@emote WHERE id=@id", { id = myid, emote = emote },
|
MySQL.update("UPDATE dpkeybinds SET emote4=@emote WHERE id=@id", { id = myid, emote = emote },
|
||||||
function() TriggerClientEvent("dp:ClientKeybindGetOne", src, key, emote) end)
|
function() TriggerClientEvent("rp:ClientKeybindGetOne", src, key, emote) end)
|
||||||
elseif chosenk == "keybind5" then
|
elseif chosenk == "keybind5" then
|
||||||
MySQL.update("UPDATE dpkeybinds SET emote5=@emote WHERE id=@id", { id = myid, emote = emote },
|
MySQL.update("UPDATE dpkeybinds SET emote5=@emote WHERE id=@id", { id = myid, emote = emote },
|
||||||
function() TriggerClientEvent("dp:ClientKeybindGetOne", src, key, emote) end)
|
function() TriggerClientEvent("rp:ClientKeybindGetOne", src, key, emote) end)
|
||||||
elseif chosenk == "keybind6" then
|
elseif chosenk == "keybind6" then
|
||||||
MySQL.update("UPDATE dpkeybinds SET emote6=@emote WHERE id=@id", { id = myid, emote = emote },
|
MySQL.update("UPDATE dpkeybinds SET emote6=@emote WHERE id=@id", { id = myid, emote = emote },
|
||||||
function() TriggerClientEvent("dp:ClientKeybindGetOne", src, key, emote) end)
|
function() TriggerClientEvent("rp:ClientKeybindGetOne", src, key, emote) end)
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
@@ -163,9 +157,9 @@ if Config.SqlKeybinding and MySQL then
|
|||||||
if success then
|
if success then
|
||||||
addKeybindEventHandlers()
|
addKeybindEventHandlers()
|
||||||
else
|
else
|
||||||
print("[dp] ^3Error connecting to DB^7")
|
print("[rp] ^3Error connecting to DB^7")
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
else
|
else
|
||||||
print("[dp] ^3Sql Keybinding^7 is turned ^1off^7, if you want to enable /emotebind, set ^3SqlKeybinding = ^2true^7 in config.lua and uncomment oxmysql lines in fxmanifest.lua.")
|
print("[rp] ^3Sql Keybinding^7 is turned ^1off^7, if you want to enable /emotebind, set ^3SqlKeybinding = ^2true^7 in config.lua and uncomment oxmysql lines in fxmanifest.lua.")
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,33 +1,25 @@
|
|||||||
if Config.CheckForUpdates then
|
if Config.CheckForUpdates then
|
||||||
Citizen.CreateThread(function()
|
local function VersionLog(_type, log)
|
||||||
updatePath = "/TayMcKenzieNZ/dpemotes"
|
local color = _type == 'success' and '^2' or '^1'
|
||||||
resourceName = "dp Emotes (" .. GetCurrentResourceName() .. ")"
|
print(('^8[rpemotes]%s %s^7'):format(color, log))
|
||||||
PerformHttpRequest("https://raw.githubusercontent.com" .. updatePath .. "/master/version", checkVersion, "GET")
|
|
||||||
end)
|
|
||||||
end
|
|
||||||
|
|
||||||
RegisterServerEvent("dp:CheckVersion")
|
|
||||||
AddEventHandler("dp:CheckVersion", function()
|
|
||||||
if updateavail then
|
|
||||||
TriggerClientEvent("dp:Update", source, true)
|
|
||||||
else
|
|
||||||
TriggerClientEvent("dp:Update", source, false)
|
|
||||||
end
|
end
|
||||||
end)
|
|
||||||
|
|
||||||
function checkVersion(err, responseText, headers)
|
local function CheckMenuVersion()
|
||||||
curVersion = LoadResourceFile(GetCurrentResourceName(), "version")
|
PerformHttpRequest('https://raw.githubusercontent.com/TayMcKenzieNZ/rpemotes/master/version.txt', function(err, text, headers)
|
||||||
|
local currentVersion = GetResourceMetadata(GetCurrentResourceName(), 'version')
|
||||||
if curVersion ~= responseText and tonumber(curVersion) < tonumber(responseText) then
|
if not text then
|
||||||
updateavail = true
|
VersionLog('error', 'Currently unable to run a version check.')
|
||||||
print("\n^1----------------------------------------------------------------------------------^7")
|
return
|
||||||
print(resourceName .. " is outdated, latest version is: ^2" .. responseText .. "^7, installed version: ^1" .. curVersion .. "^7!\nupdate from https://github.com" .. updatePath .. "")
|
end
|
||||||
print("^1----------------------------------------------------------------------------------^7")
|
VersionLog('success', ('Current Version: %s'):format(currentVersion))
|
||||||
elseif tonumber(curVersion) > tonumber(responseText) then
|
VersionLog('success', ('Latest Version: %s'):format(text))
|
||||||
print("\n^3----------------------------------------------------------------------------------^7")
|
if text == currentVersion then
|
||||||
print(resourceName .. " git version is: ^2" .. responseText .. "^7, installed version: ^1" .. curVersion .. "^7!")
|
VersionLog('success', 'You are running the latest version.')
|
||||||
print("^3----------------------------------------------------------------------------------^7")
|
else
|
||||||
else
|
VersionLog('error', ('You are currently running an outdated version, please update to version %s'):format(text))
|
||||||
print("\n" .. resourceName .. " is up to date. (^2" .. curVersion .. "^7)")
|
end
|
||||||
|
end)
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
CheckMenuVersion()
|
||||||
|
end
|
||||||
@@ -29,11 +29,11 @@ if Config.SqlKeybinding then
|
|||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
QBCore.Commands.Add('emotemenu', 'Open dpemotes menu (F3) by default.', {}, false, function(source)
|
QBCore.Commands.Add('emotemenu', 'Open rpemotes menu (F3) by default.', {}, false, function(source)
|
||||||
TriggerClientEvent('animations:client:EmoteMenu', source)
|
TriggerClientEvent('animations:client:EmoteMenu', source)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
QBCore.Commands.Add('em', 'Open dpemotes menu (F3) by default.', {}, false, function(source)
|
QBCore.Commands.Add('em', 'Open rpemotes menu (F3) by default.', {}, false, function(source)
|
||||||
TriggerClientEvent('animations:client:EmoteMenu', source)
|
TriggerClientEvent('animations:client:EmoteMenu', source)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
|||||||
1
version.txt
Normal file
1
version.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
1.0.0
|
||||||
Reference in New Issue
Block a user