-
Notifications
You must be signed in to change notification settings - Fork 4
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
base: main
Are you sure you want to change the base?
Conversation
|
||
## 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.) |
There was a problem hiding this comment.
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.
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) | ||
|
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
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.