Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Save Ped Through Roleplays #3

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

TateTheBait
Copy link

I added a feature and command where if the player saves a setup or uses the command /saverpped, the ped will be saved for the next roleplay for ease of access because I have had so many members complain about it.

Comment on lines +19 to +21

## Command:
(Use /saverpped to save your current ped for the next roleplay! even when changing characters you can be sure that your ped will be there.)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the purpose with this command, the current player outfit should be saved anyways.

Comment on lines +8 to +14
RegisterNetEvent("ND:characterLoaded")
AddEventHandler("ND:characterLoaded", function()
local ped = PlayerPedId()
print(json.decode(GetResourceKvpString("ND_AppearanceShops:savedclothing")))
fivemAppearance:setPedAppearance(ped, json.decode(GetResourceKvpString("ND_AppearanceShops:savedclothing")))
end)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ND Characters should do this already...

AddEventHandler("onResourceStop", function(resource)
if resource ~= cache.resource then return end
SetResourceKvp(wardrobeId, json.encode(wardrobe))
SetResourceKvp("ND_AppearanceShops:savedclothing", json.encode(Outfit))
for _, ped in pairs(Peds) do
NDCore.removeAiPed(ped)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ND Core should do this.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It makes it so that the last appearance you saved in an Appearance shop loads in instead of the character you can only set once.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be fair, i dont know what version we are on, i don't own the server i work for. But this makes appearance shops more useful in my opinion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants