Hallo Community und hallo Lee_Adama
Nun .. Bei dem Script hier:
function playerLogin (thePreviousAccount, theCurrentAccount, autoLogin)
if not (isGuestAccount (getPlayerAccount (source))) then
local accountData = getAccountData (theCurrentAccount, "funmodev2-money")
if (accountData) then
local playerMoney = getAccountData (theCurrentAccount, "funmodev2-money")
local playerHealth = getAccountData (theCurrentAccount, "funmodev2-health")
local playerArmor = getAccountData (theCurrentAccount, "funmodev2-armor")
local playerKills = getAccountData (theCurrentAccount, "funmodev2-kills")
local playerDeaths = getAccountData (theCurrentAccount, "funmodev2-deaths")
local R = getAccountData (theCurrentAccount, "funmodev2-R")
local G = getAccountData (theCurrentAccount, "funmodev2-G")
local B = getAccountData (theCurrentAccount, "funmodev2-B")
setPlayerMoney (source, playerMoney)
setTimer (setElementHealth, 500, 1, source, playerHealth)
setTimer (setPedArmor, 500, 1, source, playerArmor)
setCameraTarget (source, source)
fadeCamera(source, true, 2.0)
setPlayerNametagColor (source, R, G, B)
end
end
end
addEventHandler ("onPlayerLogin", getRootElement(), playerLogin)
function onQuit (quitType, reason, responsibleElement)
if not (isGuestAccount (getPlayerAccount (source))) then
account = getPlayerAccount (source)
if (account) then
local x,y,z = getElementPosition (source)
local r,g,b = getPlayerNametagColor (source)
setAccountData (account, "funmodev2-money", tostring (getPlayerMoney (source)))
setAccountData (account, "funmodev2-health", tostring (getElementHealth (source)))
setAccountData (account, "funmodev2-armor", tostring (getPedArmor (source)))
setAccountData (account, "funmodev2-kills", tostring (getPlayerKills (source)))
setAccountData (account, "funmodev2-deaths", tostring (getPlayerDeaths (source)))
setAccountData (account, "funmodev2-R", r)
setAccountData (account, "funmodev2-G", g)
setAccountData (account, "funmodev2-B", b)
end
end
end
addEventHandler ("onPlayerQuit", getRootElement(), onQuit)
Wie ich bemerke gibt es kein getPlayerKills und Deaths, wie geht das dann?
Muss ich etwa selber Kills und Deaths System coden?
Oder gibt es schon so eine Funktion?
mfg der Canny