UnKnownGuy Posted October 24, 2016 Posted October 24, 2016 Hello. Guys I am using Gym From NG and its not saving in account so i tried to fix it but i failed so i wanna know how to save the walking style in my account its named (NGGym)
Walid Posted October 24, 2016 Posted October 24, 2016 function saveWalkStyle() local acc = getPlayerAccount(source) if acc and not isGuestAccount(acc) then local walk = getPedWalkingStyle (source) setAccountData(acc, "walkStyle", tonumber(walk)) end end addEventHandler("onPlayerQuit", root, saveWalkStyle) function loadWalkStyle(_, acc) local walk = getAccountData(acc, "wstyle") or 0 setPedWalkingStyle(source, tonumber(walk)) end addEventHandler("onPlayerLogin", root, loadWalkStyle)
UnKnownGuy Posted October 25, 2016 Author Posted October 25, 2016 14 hours ago, Walid said: function saveWalkStyle() local acc = getPlayerAccount(source) if acc and not isGuestAccount(acc) then local walk = getPedWalkingStyle (source) setAccountData(acc, "walkStyle", tonumber(walk)) end end addEventHandler("onPlayerQuit", root, saveWalkStyle) function loadWalkStyle(_, acc) local walk = getAccountData(acc, "wstyle") or 0 setPedWalkingStyle(source, tonumber(walk)) end addEventHandler("onPlayerLogin", root, loadWalkStyle) I'll use this in client.lua or server.lua?
iPrestege Posted October 25, 2016 Posted October 25, 2016 25 minutes ago, UnKnownGuy said: I'll use this in client.lua or server.lua? It's server side you at least open the functions and you will know that even if you know the events you will know it's a SERVER SIDE CODE.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now