[RELEASE][ESX] Persistent Walking Styles

Hello friends,

Recently my players have requested the ability to set a walking style permanently without worrying about it resetting on relog, etc.

I did a little searching and could only find this but it seems as though it was pulled from GitHub.

Nevertheless,
I wrote this up with the help of popular emote menu dpemotes.

wasabi_walk

An ESX based persistent walking style script

Credits

Features

  • Set/Save walking styles(Default commands: /savewalk WALKHERE & /walklist)
  • Walking style saved / restored on reconnect
  • Utilizes json rather than SQL or alternative methods of data storage
  • ~0.0ms usage

Installation

  • Download script
  • Put script in your resources directory
  • Add ensure wasabi_walk in your server.cfg

Default Usage

  1. While in-game use command /walklist and find a walking style you would like to try.
  2. Use command /savewalk WALKNAMEHERE to set walking style.
  3. Enjoy your set walking type even on server restart/reconnect.

Preview

There isn’t one. It’s free and pretty self-explanatory

Download

My Other Releases:

6 Likes

does not work

Doesn’t work. After relogging it is not saved.

Interesting. Works fine on my server. I just double checked.

Could multiple characters cause this issue? Or how is it supposed to save walks on multiple characters?

Doesn’t work on my server.

esx legacy

What OS does your hosting machine run?

Windows Server 2019. And I run ESX legacy. I do run my server on a fairly large dedicated server. I’m going to do some tests and see if I can’t replicate issues others are having.

ESX V1 Final does not work after rejoining the server

works on v1 final :slight_smile: thank you , but the problem is from my crouch script if i going to crouch it reset my walk to normal

    Citizen.CreateThread(function()

     local x = 5000

    while true do

    Citizen.Wait(x)

    SetPedMovementClipset(PlayerPedId(), animSet, true)

    TriggerServerEvent('wasabi_walk:loadWalk')

    end

    end)

Assuming you are not using an older version of kashacters or something, identifiers are typically saved per character so for example when I save walk it saves to json like “char:123456”

KVP would be a good thing to utilise here.

this is for what ?

I was thinking the same thing I have just been away from PC to test.

I’m assuming changing

RegisterServerEvent('wasabi_walk:loadWalk')
AddEventHandler('wasabi_walk:loadWalk', function()
    local xPlayer = ESX.GetPlayerFromId(source)
    local identifier = xPlayer.identifier
    local rawData = LoadResourceFile(GetCurrentResourceName(), "./data.json")
    local data = json.decode(rawData)
    if data[identifier] ~= nil then
        TriggerClientEvent('wasabi_walk:setWalk', source, data[identifier])
    end
end)

to utilize KVP:

RegisterServerEvent('wasabi_walk:loadWalk')
AddEventHandler('wasabi_walk:loadWalk', function()
    local xPlayer = ESX.GetPlayerFromId(source)
    local identifier = xPlayer.identifier
    local rawData = LoadResourceFile(GetCurrentResourceName(), "./data.json")
    local data = json.decode(rawData)
    for k,v in pairs(data) do
        if k == identifier then
            TriggerClientEvent('wasabi_walk:setWalk', source, v)
            break
        end
    end
end)

Haven’t tested but looks like it would work.

It’s to note this is my first resource utilizing json and I spaced placing the data.json within the manifest files (oops).

If anyone above that was having issues can test the latest push and see if issues have resolved.

can you please make a qb or a standalone please