hello i have problem! when i log out when i'm jumping or when i'm flying with superman and then connecting it doesn't set the camera target me but when i'm in ground it works well
code:
function savesystem()
local playeraccount = getPlayerAccount ( source )
if ( playeraccount ) then
local playermoney = getAccountData ( playeraccount, "s.HandMoney" )
if ( playermoney ) then
setPlayerMoney ( source, playermoney )
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, 0, playerInt, playerDim)
setCameraTarget(source,source)
for slot = 1, 12 do
local wep = getAccountData ( account, "save-wep".. slot )
local ammo = getAccountData ( account, "save-ammo".. slot )
giveWeapon ( source, wep, ammo )
end
end
end
end
addEventHandler("onPlayerLogin", root,savesystem)