xyz Posted April 7, 2016 Posted April 7, 2016 So I'm nearly done with my saving system, but I can't save walking style, it wont work.. .
xyz Posted April 7, 2016 Author Posted April 7, 2016 So I'm nearly done with my saving system, but I can't save walking style, it wont work.. .
xyz Posted April 7, 2016 Author Posted April 7, 2016 function onQuit()local acc = getPlayerAccount(source) if (acc) and not isGuestAccount(acc) then local walk = getPedWalkingStyle (source) setAccountData(acc, "wstyle", walk) endendaddEventHandler("onPlayerQuit", getRootElement(), onQuit) function onLogin(_, acc)local walk = getAccountData(acc, "wstyle") setPedWalkingStyle(source, walk)endaddEventHandler("onPlayerLogin", getRootElement(), onLogin) .
xyz Posted April 7, 2016 Author Posted April 7, 2016 function onQuit() local acc = getPlayerAccount(source) if (acc) and not isGuestAccount(acc) then local walk = getPedWalkingStyle (source) setAccountData(acc, "wstyle", walk) end end addEventHandler("onPlayerQuit", getRootElement(), onQuit) function onLogin(_, acc) local walk = getAccountData(acc, "wstyle") setPedWalkingStyle(source, walk) end addEventHandler("onPlayerLogin", getRootElement(), onLogin) .
roaddog Posted April 7, 2016 Posted April 7, 2016 function onQuit() if isElement(source) then local acc = getPlayerAccount(source) if (acc) and not isGuestAccount(acc) then local walk = getPedWalkingStyle (source) setAccountData(acc, "wstyle", walk) end end end addEventHandler("onPlayerQuit", getRootElement(), onQuit) Try it. You gone learn today. I work my ass off, but I still can't pay tho.
roaddog Posted April 7, 2016 Posted April 7, 2016 function onQuit() if isElement(source) then local acc = getPlayerAccount(source) if (acc) and not isGuestAccount(acc) then local walk = getPedWalkingStyle (source) setAccountData(acc, "wstyle", walk) end end end addEventHandler("onPlayerQuit", getRootElement(), onQuit) Try it. You gone learn today. I work my ass off, but I still can't pay tho.
Anubhav Posted April 8, 2016 Posted April 8, 2016 function onQuit() local acc = getPlayerAccount(source) if (acc) and not isGuestAccount(acc) then local walk = getPedWalkingStyle (source) setAccountData(acc, "wstyle", tostring(walk)) end end addEventHandler("onPlayerQuit", getRootElement(), onQuit) function onLogin(_, acc) local walk = getAccountData(acc, "wstyle") or 0 setPedWalkingStyle(source, tonumber(walk)) end addEventHandler("onPlayerLogin", getRootElement(), onLogin) See my some resources: Skin shop: https://community.multitheftauto.com/in ... ls&id=8008 Note script: https://community.multitheftauto.com/in ... ls&id=8009 Rules Panel: https://community.multitheftauto.com/in ... ls&id=8246 Random Money: https://community.multitheftauto.com/in ... ls&id=8718
Anubhav Posted April 8, 2016 Posted April 8, 2016 function onQuit() local acc = getPlayerAccount(source) if (acc) and not isGuestAccount(acc) then local walk = getPedWalkingStyle (source) setAccountData(acc, "wstyle", tostring(walk)) end end addEventHandler("onPlayerQuit", getRootElement(), onQuit) function onLogin(_, acc) local walk = getAccountData(acc, "wstyle") or 0 setPedWalkingStyle(source, tonumber(walk)) end addEventHandler("onPlayerLogin", getRootElement(), onLogin) See my some resources: Skin shop: https://community.multitheftauto.com/in ... ls&id=8008 Note script: https://community.multitheftauto.com/in ... ls&id=8009 Rules Panel: https://community.multitheftauto.com/in ... ls&id=8246 Random Money: https://community.multitheftauto.com/in ... ls&id=8718
Walid Posted April 8, 2016 Posted April 8, 2016 function onLogin(_, acc) local walk = getAccountData(acc, "wstyle") or 0 if walk then setPedWalkingStyle(source, tonumber(walk)) end end addEventHandler("onPlayerLogin", getRootElement(), onLogin) Do not yield your back to your enemy, might feel something strange in your ass. Two things are infinite the universe and human stupidity and i'm not sure about the universe. UF: IsTextInGridList | GetGridListRowIndexFromText | Table.removeValue | removeHex | dxDrawTriangle Skype: SaSuki102 | About Me | Youtube channel | Lua Tips & Tricks | Lua Strings | Lua Tables | Lua Operators
Walid Posted April 8, 2016 Posted April 8, 2016 function onLogin(_, acc) local walk = getAccountData(acc, "wstyle") or 0 if walk then setPedWalkingStyle(source, tonumber(walk)) end end addEventHandler("onPlayerLogin", getRootElement(), onLogin) Do not yield your back to your enemy, might feel something strange in your ass. Two things are infinite the universe and human stupidity and i'm not sure about the universe. UF: IsTextInGridList | GetGridListRowIndexFromText | Table.removeValue | removeHex | dxDrawTriangle Skype: SaSuki102 | About Me | Youtube channel | Lua Tips & Tricks | Lua Strings | Lua Tables | Lua Operators
GTX Posted April 10, 2016 Posted April 10, 2016 Any errors in debugscript? Is the script server sided? Try: function onQuit() local acc = getPlayerAccount(source) if not isGuestAccount(acc) then local walk = getPedWalkingStyle (source) setAccountData(acc, "wstyle", tonumber(walk)) end end addEventHandler("onPlayerQuit", getRootElement(), onQuit) function onLogin(_, acc) local walk = getAccountData(acc, "wstyle") or 0 setPedWalkingStyle(source, tonumber(walk)) end addEventHandler("onPlayerLogin", getRootElement(), onLogin) Do you require a paid scripter? Contact me! (Unavailable) Currently I am experienced in Lua, PHP, HTML, CSS, SQL and JS. Developer and owner of https://projectbea.st - Project Beast
KariiiM Posted April 10, 2016 Posted April 10, 2016 GTX's code seem working fine, just be sure you have declared your file as server sided in your meta xml
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