MTASA TÜRK
Türkiye'nin En Güncel MTA Platformu


[YARDIM] Kaldığın Yerden Kalma Para Sıfırlama

0 Üye ve 1 Ziyaretçi konuyu incelemekte.

Çevrimdışı Prose

  • Deneyimli Üye
  • *
    • İleti: 486
  • Gökhan Türkoglu
Merhaba serverimde kaldıgın yerden devam sc var birde para kaydetme var ama cakısıyor galiba
kaldıgın yerden devam acıkken svye girisde paranı 0 yapıyor
yardım edermisniz ?
 

Kaldıgın Yerden Devam
Client.lua
Kod: lua
function playerLogin() 
    local playerAcc = getPlayerAccount(source)
    if (playerAcc) then
        local playerBank = getAccountData(playerAcc, "cash")
        if (playerBank) then
            setPlayerMoney(source, tonumber(playerBank))
        else
            outputChatBox("You are broke.", source, 255, 0, 0)
        end
    end
end
addEventHandler("onPlayerLogin", getRootElement(), playerLogin)

function onPlayerQuit ( )
      local playeraccount = getPlayerAccount ( source )
      if ( playeraccount ) then
            local x,y,z = getElementPosition (source)
            setAccountData ( playeraccount, "s.HandMoney", getPlayerMoney ( source ) )
      setAccountData (playeraccount, "s.skin", tostring (getPedSkin (source)))
    setAccountData (playeraccount, "s.x", x)
    setAccountData (playeraccount, "s.y", y)
      setAccountData (playeraccount, "s.z", z)
          setAccountData (playeraccount, "s.int", getElementInterior (source))
      setAccountData (playeraccount, "s.dim", getElementDimension (source))
setAccountData (playeraccount, "s.rot", getPlayerRotation (source))
setAccountData (playeraccount, "s.weap0", getPedWeapon ( source, 0 ))
setAccountData (playeraccount, "s.weap1", getPedWeapon ( source, 1 ))
setAccountData (playeraccount, "s.weap2", getPedWeapon ( source, 2 ))
setAccountData (playeraccount, "s.ammo2", getPedTotalAmmo ( source, 2 ))
setAccountData (playeraccount, "s.weap3", getPedWeapon ( source, 3 ))
setAccountData (playeraccount, "s.ammo3", getPedTotalAmmo ( source, 3 ))
setAccountData (playeraccount, "s.weap4", getPedWeapon ( source, 4 ))
setAccountData (playeraccount, "s.ammo4", getPedTotalAmmo ( source, 4 ))
setAccountData (playeraccount, "s.weap5", getPedWeapon ( source, 5 ))
setAccountData (playeraccount, "s.ammo5", getPedTotalAmmo ( source, 5 ))
setAccountData (playeraccount, "s.weap6", getPedWeapon ( source, 6 ))
setAccountData (playeraccount, "s.ammo6", getPedTotalAmmo ( source, 6 ))
setAccountData (playeraccount, "s.weap7", getPedWeapon ( source, 7 ))
setAccountData (playeraccount, "s.ammo7", getPedTotalAmmo ( source, 7 ))
setAccountData (playeraccount, "s.weap8", getPedWeapon ( source, 8 ))
setAccountData (playeraccount, "s.ammo8", getPedTotalAmmo ( source, 8 ))
setAccountData (playeraccount, "s.weap9", getPedWeapon ( source, 9 ))
setAccountData (playeraccount, "s.ammo9", getPedTotalAmmo ( source, 9 ))
setAccountData (playeraccount, "s.weap10", getPedWeapon ( source, 10 ))
setAccountData (playeraccount, "s.weap11", getPedWeapon ( source, 11 ))
setAccountData (playeraccount, "s.weap12", getPedWeapon ( source, 12 ))
      end
end
addEventHandler ( "onPlayerQuit", getRootElement ( ), onPlayerQuit )

local root = getRootElement()
addEventHandler("onPlayerLogin", root,
  function()
     local playeraccount = getPlayerAccount ( source )
      if ( playeraccount ) then
            local playermoney = getAccountData ( playeraccount, "s.HandMoney" )
            if ( playermoney ) then
                  setPlayerMoney ( source, playermoney )
            end
local playerInt = getAccountData (playeraccount, "s.int")
      local playerDim = getAccountData (playeraccount, "s.dim") 
local playerSkin = getAccountData (playeraccount, "s.skin")
      local playerX = getAccountData (playeraccount, "s.x")
      local playerY = getAccountData (playeraccount, "s.y")
      local playerZ = getAccountData (playeraccount, "s.z")
local playerRot = getAccountData (playeraccount, "s.rot")
      spawnPlayer(source, playerX, playerY, playerZ, playerRot, playerSkin, playerInt, playerDim)
fadeCamera (source, true)
setCameraTarget (source, source)
local weap0 = getAccountData(playeraccount, "s.weap0")
local weap1 = getAccountData(playeraccount, "s.weap1")
local weap2 = getAccountData(playeraccount, "s.weap2")
local ammo2 = getAccountData(playeraccount, "s.ammo2")
local weap3 = getAccountData(playeraccount, "s.weap3")
local ammo3 = getAccountData(playeraccount, "s.ammo3")
local weap4 = getAccountData(playeraccount, "s.weap4")
local ammo4 = getAccountData(playeraccount, "s.ammo4")
local weap5 = getAccountData(playeraccount, "s.weap5")
local ammo5 = getAccountData(playeraccount, "s.ammo5")
local weap6 = getAccountData(playeraccount, "s.weap6")
local ammo6 = getAccountData(playeraccount, "s.ammo6")
local weap7 = getAccountData(playeraccount, "s.weap7")
local ammo7 = getAccountData(playeraccount, "s.ammo7")
local weap8 = getAccountData(playeraccount, "s.weap8")
local ammo8 = getAccountData(playeraccount, "s.ammo8")
local weap9 = getAccountData(playeraccount, "s.weap9")
local ammo9 = getAccountData(playeraccount, "s.ammo9")
local weap10 = getAccountData(playeraccount, "s.weap10")
local weap11 = getAccountData(playeraccount, "s.weap11")
local weap12 = getAccountData(playeraccount, "s.weap12")
giveWeapon ( source, weap0, 1 )
giveWeapon ( source, weap1, 1 )
giveWeapon ( source, weap2, ammo2 )
giveWeapon ( source, weap3, ammo3 )
giveWeapon ( source, weap4, ammo4 )
giveWeapon ( source, weap5, ammo5 )
giveWeapon ( source, weap6, ammo6 )
giveWeapon ( source, weap7, ammo7 )
giveWeapon ( source, weap8, ammo8 )
giveWeapon ( source, weap9, ammo9 )
giveWeapon ( source, weap10, 1 )
giveWeapon ( source, weap11, 1 )
giveWeapon ( source, weap12, 1 )
      end
  end
)
« Son Düzenleme: 30 Mayıs 2017, 20:00:15 Gönderen: Narkoz »
 


MTASA TÜRK

[YARDIM] Kaldığın Yerden Kalma Para Sıfırlama
« : 29 Mayıs 2017, 19:04:15 »

Çevrimdışı ByCash

  • Bilişim Teknolojileri
  • Süper Moderatör
  • *
    • İleti: 977
  • C# - LUA
    • MTASATURK
Yanıtla #1 : 29 Mayıs 2017, 19:06:26
Bütün kaydetme scriptlerini sil bunu yükle bu script herşeyi kaydediyor sorunsuz çalışıyor.

Linki görebilmek için Kayıt olun yada Giriş yapın.
Linki görebilmek için Kayıt olun yada Giriş yapın.
 


Çevrimdışı Prose

  • Deneyimli Üye
  • *
    • İleti: 486
  • Gökhan Türkoglu
Yanıtla #2 : 29 Mayıs 2017, 19:09:34
Linki görebilmek için Kayıt olun yada Giriş yapın.
Bütün kaydetme scriptlerini sil bunu yükle bu script herşeyi kaydediyor sorunsuz çalışıyor.

Linki görebilmek için Kayıt olun yada Giriş yapın.

Svde Silah Bırakma Sistem Var Onun İcin Sadece Para Ve Kaldıgın Yerden Devam Lazım :)
 


Çevrimdışı Mahlukat

  • Scripter
  • *
    • İleti: 531
Yanıtla #3 : 29 Mayıs 2017, 19:27:06
Sadece money datalarını sildim çalışırı sanırım;
Kod: lua
function onPlayerQuit ( )
      local playeraccount = getPlayerAccount ( source )
      if ( playeraccount ) then
            local x,y,z = getElementPosition (source)
                setAccountData (playeraccount, "s.skin", tostring (getPedSkin (source)))
                setAccountData (playeraccount, "s.x", x)
                setAccountData (playeraccount, "s.y", y)
                setAccountData (playeraccount, "s.z", z)
            setAccountData (playeraccount, "s.int", getElementInterior (source))
                setAccountData (playeraccount, "s.dim", getElementDimension (source))
                        setAccountData (playeraccount, "s.rot", getPlayerRotation (source))
                        setAccountData (playeraccount, "s.weap0", getPedWeapon ( source, 0 ))
                        setAccountData (playeraccount, "s.weap1", getPedWeapon ( source, 1 ))
                        setAccountData (playeraccount, "s.weap2", getPedWeapon ( source, 2 ))
                        setAccountData (playeraccount, "s.ammo2", getPedTotalAmmo ( source, 2 ))
                        setAccountData (playeraccount, "s.weap3", getPedWeapon ( source, 3 ))
                        setAccountData (playeraccount, "s.ammo3", getPedTotalAmmo ( source, 3 ))
                        setAccountData (playeraccount, "s.weap4", getPedWeapon ( source, 4 ))
                        setAccountData (playeraccount, "s.ammo4", getPedTotalAmmo ( source, 4 ))
                        setAccountData (playeraccount, "s.weap5", getPedWeapon ( source, 5 ))
                        setAccountData (playeraccount, "s.ammo5", getPedTotalAmmo ( source, 5 ))
                        setAccountData (playeraccount, "s.weap6", getPedWeapon ( source, 6 ))
                        setAccountData (playeraccount, "s.ammo6", getPedTotalAmmo ( source, 6 ))
                        setAccountData (playeraccount, "s.weap7", getPedWeapon ( source, 7 ))
                        setAccountData (playeraccount, "s.ammo7", getPedTotalAmmo ( source, 7 ))
                        setAccountData (playeraccount, "s.weap8", getPedWeapon ( source, 8 ))
                        setAccountData (playeraccount, "s.ammo8", getPedTotalAmmo ( source, 8 ))
                        setAccountData (playeraccount, "s.weap9", getPedWeapon ( source, 9 ))
                        setAccountData (playeraccount, "s.ammo9", getPedTotalAmmo ( source, 9 ))
                        setAccountData (playeraccount, "s.weap10", getPedWeapon ( source, 10 ))
                        setAccountData (playeraccount, "s.weap11", getPedWeapon ( source, 11 ))
                        setAccountData (playeraccount, "s.weap12", getPedWeapon ( source, 12 ))
      end
end
addEventHandler ( "onPlayerQuit", getRootElement ( ), onPlayerQuit )
 
local root = getRootElement()
addEventHandler("onPlayerLogin", root,
  function()
     local playeraccount = getPlayerAccount ( source )
      if ( playeraccount ) then
                        local playerInt = getAccountData (playeraccount, "s.int")
                local playerDim = getAccountData (playeraccount, "s.dim") 
                        local playerSkin = getAccountData (playeraccount, "s.skin")
                local playerX = getAccountData (playeraccount, "s.x")
                local playerY = getAccountData (playeraccount, "s.y")
                local playerZ = getAccountData (playeraccount, "s.z")
                        local playerRot = getAccountData (playeraccount, "s.rot")
                spawnPlayer(source, playerX, playerY, playerZ, playerRot, playerSkin, playerInt, playerDim)
                        fadeCamera (source, true)
                        setCameraTarget (source, source)
                        local weap0 = getAccountData(playeraccount, "s.weap0")
                        local weap1 = getAccountData(playeraccount, "s.weap1")
                        local weap2 = getAccountData(playeraccount, "s.weap2")
                        local ammo2 = getAccountData(playeraccount, "s.ammo2")
                        local weap3 = getAccountData(playeraccount, "s.weap3")
                        local ammo3 = getAccountData(playeraccount, "s.ammo3")
                        local weap4 = getAccountData(playeraccount, "s.weap4")
                        local ammo4 = getAccountData(playeraccount, "s.ammo4")
                        local weap5 = getAccountData(playeraccount, "s.weap5")
                        local ammo5 = getAccountData(playeraccount, "s.ammo5")
                        local weap6 = getAccountData(playeraccount, "s.weap6")
                        local ammo6 = getAccountData(playeraccount, "s.ammo6")
                        local weap7 = getAccountData(playeraccount, "s.weap7")
                        local ammo7 = getAccountData(playeraccount, "s.ammo7")
                        local weap8 = getAccountData(playeraccount, "s.weap8")
                        local ammo8 = getAccountData(playeraccount, "s.ammo8")
                        local weap9 = getAccountData(playeraccount, "s.weap9")
                        local ammo9 = getAccountData(playeraccount, "s.ammo9")
                        local weap10 = getAccountData(playeraccount, "s.weap10")
                        local weap11 = getAccountData(playeraccount, "s.weap11")
                        local weap12 = getAccountData(playeraccount, "s.weap12")
                        giveWeapon ( source, weap0, 1 )
                        giveWeapon ( source, weap1, 1 )
                        giveWeapon ( source, weap2, ammo2 )
                        giveWeapon ( source, weap3, ammo3 )
                        giveWeapon ( source, weap4, ammo4 )
                        giveWeapon ( source, weap5, ammo5 )
                        giveWeapon ( source, weap6, ammo6 )
                        giveWeapon ( source, weap7, ammo7 )
                        giveWeapon ( source, weap8, ammo8 )
                        giveWeapon ( source, weap9, ammo9 )
                        giveWeapon ( source, weap10, 1 )
                        giveWeapon ( source, weap11, 1 )
                        giveWeapon ( source, weap12, 1 )               
      end
  end
)
 
 


Çevrimdışı Prose

  • Deneyimli Üye
  • *
    • İleti: 486
  • Gökhan Türkoglu
Yanıtla #4 : 29 Mayıs 2017, 20:12:31
Oldu Kilit
Linki görebilmek için Kayıt olun yada Giriş yapın.
 


Çevrimdışı Paradox

  • Kurucu
  • *
    • İleti: 743
  • SH Gaming
Yanıtla #5 : 29 Mayıs 2017, 20:15:17
Konu sahibinin isteği üzerine konu kilit.
 


MTASA TÜRK

Ynt: [Yardım]Kaldıgın Yerden Kalma Para Sıfırlama
« Yanıtla #5 : 29 Mayıs 2017, 20:15:17 »