Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Maximebaker committed Feb 23, 2022
0 parents commit 7db8841
Show file tree
Hide file tree
Showing 9 changed files with 1,190 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Auto detect text files and perform LF normalization
* text=auto
41 changes: 41 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Compiled Lua sources
luac.out

# luarocks build files
*.src.rock
*.zip
*.tar.gz

# Object files
*.o
*.os
*.ko
*.obj
*.elf

# Precompiled Headers
*.gch
*.pch

# Libraries
*.lib
*.a
*.la
*.lo
*.def
*.exp

# Shared objects (inc. Windows DLLs)
*.dll
*.so
*.so.*
*.dylib

# Executables
*.exe
*.out
*.app
*.i*86
*.x86_64
*.hex

21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# ea_animations-rdr3
Système d'animations par commandes dans le chat.
[Emace Airoh](https://discord.emace-airoh.ca) vous recommande d'utiliser [TouchEm](https://join-touchem.emace-airoh.ca) pour l'exécution des commandes.

# Instructions d'installation
1. Ajouter ea_animations-rdr3 dans votre dossier de ressources.
2. Ajouter la ligne suivante dans votre server.cfg:
`ensure ea_animations-rdr3`

## Pour du support, veuillez [créer un ticket sur le Discord de TouchEm](https://join-touchem.emace-airoh.ca) <-- Cliquez ici!

## [Discord de TouchEm](https://join-touchem.emace-airoh.ca)

## [Discord d'Emace Airoh](https://discord.emace-airoh.ca)

![Made by Emace Airoh](https://media.discordapp.net/attachments/868264279202201650/944765363718074378/Made_by_EMACE_AIROH.png?width=1440&height=307)


# Changelogs
## 0.9.0
- Version initiale.
70 changes: 70 additions & 0 deletions client/commands.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
local currentWalkStyle
RegisterCommand('walk', function(source, args, rawCommand)
if #args > 0 then
local name = string.lower(args[1])

local pedId = PlayerPedId()

if name == "reset" then
Citizen.InvokeNative(0xCB9401F918CB0F75, pedId, currentWalkStyle, 0, -1)
Wait(500)
currentWalkStyle = nil
return
elseif Walks[name] ~= nil then

Citizen.InvokeNative(0xCB9401F918CB0F75, pedId, currentWalkStyle, 0, -1)
Wait(500)
currentWalkStyle = Walks[name][1]

Citizen.InvokeNative(0xCB9401F918CB0F75, pedId, currentWalkStyle, 1, -1)
print(Walks[name][1])
end
end
end, false)

RegisterCommand("em", function(source, args, rawCommand)
if #args > 0 then
local name = string.lower(args[1])
local foundEmote = Emotes[name]

if name == "c" then
stopAnim()
elseif foundEmote ~= nil then
playAnim(foundEmote)
-- RemoveAnimDict(animDict)
end
end
end)

local asked1 = false
RegisterCommand('emw', function(source, args, rawCommand)
if #args > 0 then
local name = string.lower(args[1])
local foundEmote = SharedEmotes[name]
if foundEmote == nil then
return
end

-- if not asked1 then
local closestPlayer, closestDistance, playerid, tgt1 = GetClosestPlayer()
-- if closestPlayer ~= -1 and closestDistance <= 5.0 then
-- asked1 = true
local heading1 = GetEntityHeading(PlayerPedId())
local coords1 = GetEntityCoords(PlayerPedId())
local heading2 = GetEntityHeading(PlayerPedId()) - 180
local coords2 = coords1 + (GetEntityForwardVector(PlayerPedId()) / 2)
TriggerServerEvent("ea:asknearby", playerid, name, coords1, heading1, coords2, heading2)
-- end
-- end
end
end, false)

-- RegisterCommand("twa", function(source, args)
-- Citizen.InvokeNative(0xB31A277C1AC7B7FF, PlayerPedId(), 4, 1, 0xE6D0DD51, 1, 1, 0, 0)
-- end)
-- RegisterCommand("twb", function(source, args)
-- Citizen.InvokeNative(0xB31A277C1AC7B7FF, PlayerPedId(), 4, 1, 0xE04E36A5, 1, 1, 0, 0)
-- end)
-- RegisterCommand("twc", function(source, args)
-- Citizen.InvokeNative(0xB31A277C1AC7B7FF, PlayerPedId(), 4, 1, 0x43F0C62B, 1, 1, 0, 0)
-- end)
Loading

0 comments on commit 7db8841

Please sign in to comment.