Jump to content

Help with save system


xyz

Recommended Posts

Posted
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)

.

Posted
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) 

.

Posted
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.

Posted
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.

Posted
  
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) 
  

Posted
  
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) 
  

Posted
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

Posted
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

Posted

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...