1º¿Como le puedo cambiar el tamaño del texto al resource killmessages?
2º?Como puedo mostrar todos los teams en el dxscoreboard con el spawn de 50p aunque no haya nadie en el team?
3º¿Y cual es el error del los siguientes 2 scripts?Lo que pasa es que no me cuenta los kills cada vez que mata a un zombie si no cada vez que te logeas.
Cuenta Zombies:
exports.dxscoreboard:addScoreboardColumn('Kills')
addEvent("onZombieWasted",true)
addEventHandler("onZombieWasted",root,
function (killer)
givePlayerMoney(killer,73)
addPlayerZombieKills(killer)
end)
function addPlayerZombieKills(killer)
local account = getPlayerAccount(killer)
if isGuestAccount(account) then return end
local zombieKills = getAccountData(account,"Kills")
if not zombieKills then setAccountData(account,"Kills",0) end
setAccountData(account,"Kills",tonumber(zombieKills)+1)
end
addEventHandler("onPlayerLogin",root,
function ()
local account = getPlayerAccount(source)
if isGuestAccount(account) then return end
local zombieKills = getAccountData(account,"Kills")
if zombieKills then
setElementData(source,"Kills",tostring(zombieKills))
else
setElementData(source,"Kills",0)
end
end)
Niveles:
exports.dxscoreboard:addScoreboardColumn('Level')
addEventHandler("onPlayerSpawn",root,
function()
local account = getPlayerAccount(source)
local zombiekills = getAccountData(account,"Kills")
if (zombiekills >= 0) and (zombiekills <= 100) then
setAccountData ( account, "Level", "Level 1" )
elseif (zombiekills >= 5) and (zombiekills <= 99) then
setAccountData ( account, "Level", "Level 2" )
elseif (zombiekills >= 100) and (zombiekills <= 249) then
setAccountData ( account, "Level", "Level 3" )
elseif (zombiekills >= 250) and (zombiekills <= 499) then
setAccountData ( account, "Level", "Level 4" )
elseif (zombiekills >= 500) and (zombiekills <= 999) then
setAccountData ( account, "Level", "Level 5" )
elseif (zombiekills >= 1000) and (zombiekills <= 1499) then
setAccountData ( account, "Level", "Level 6" )
elseif (zombiekills >= 1500) and (zombiekills <= 1999) then
setAccountData ( account, "Level", "Level 7" )
elseif (zombiekills >= 2000) and (zombiekills <= 2999) then
setAccountData ( account, "Level", "Level 8" )
elseif (zombiekills >= 3000) and (zombiekills <= 3999) then
setAccountData ( account, "Level", "Level 9" )
elseif (zombiekills >= 4000) and (zombiekills <= 4999) then
setAccountData ( account, "Level", "Level 10" )
elseif (zombiekills >= 5000) and (zombiekills <= 5999) then
setAccountData ( account, "Level", "Level 11" )
elseif (zombiekills >= 5000) and (zombiekills <= 5999) then
setAccountData ( account, "Level", "Level 12" )
elseif (zombiekills >= 6000) and (zombiekills <= 6999) then
setAccountData ( account, "Level", "Level 13" )
elseif (zombiekills >= 7000) and (zombiekills <= 7999) then
setAccountData ( account, "Level", "Level 14" )
elseif (zombiekills >= 8000) and (zombiekills <= 8999) then
setAccountData ( account, "Level", "Level 15" )
elseif (zombiekills >= 9000) and (zombiekills <= 9999) then
setAccountData ( account, "Level", "Level 16" )
elseif (zombiekills >= 10000) and (zombiekills <= 12000) then
setAccountData ( account, "Level", "Level 17" )
end
end
)
addEventHandler("onPlayerSpawn",root,
function ()
local cuenta = getPlayerAccount(source)
if isGuestAccount(cuenta) then return end
local rango = getAccountData(cuenta,"Level")
if rango then
setElementData(source,"Level", rango)
end
end
)