Hey,
ich versuche gerade meinen Interior nach dem Login setzen zu lassen, allerdings klappt das nicht...
Hier der Code:
addEventHandler("onResourceStart", getResourceRootElement(getThisResource()),
function ()
HomeMarker = createMarker(1005.412902832, -5347.275390625, 10.569277763367, "corona", 1.0, 0, 255, 0, 255, getRootElement())
HomeMarkerExit = createMarker(967.8359375, -53.2177734375, 1001.1245727539, "corona", 1.0, 255, 0, 0, 255, getRootElement())
setElementInterior(HomeMarkerExit, 3)
end)
addEventHandler("onClientResourceStop", resourceRoot,
function ()
destroyElement(HomeMarker)
end)
addEventHandler("onPlayerMarkerHit", getRootElement(),
function (markerHit)
if markerHit == HomeMarker then
setElementPosition(source, 961.1767578125, -53.078125, 1001.1171875)
setElementInterior(source, 3)
end
end)
addEventHandler("onPlayerMarkerHit", getRootElement(),
function (markerHit)
if markerHit == HomeMarkerExit then
setElementPosition(source, 1006.1033325195, -5343.5830078125, 10.569277763367)
setElementInterior(source, 0)
end
end)
addEventHandler("onPlayerQuit", getRootElement(),
function ()
setAccountData(getPlayerAccount(source), "Interior", getElementInterior(source))
end)
addEventHandler("onPlayerLogin", getRootElement(),
function (_, theCurrentAccount)
if getPlayerSerial(getAccountPlayer(theCurrentAccount)) == "Meine Serial" then
setElementInterior(source, getAccountData(theCurrentAccount, "Interior"))
end
end)
Könnte mir jemand helfen?