Jump to content

"Ayuda"


Xperia

Recommended Posts

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 
) 

Link to comment

1-Para cambiar el tamaño de las letras , edita el "textlib" del killmessage.

2-Si no me equivoco , edita el "s_spawnclasses" del Spawn. Son las primeras lines! ( no estoy seguro).

3- usaste onClientRender para cada vez que mates a un zombie?. Tambien es "Zombie kills" , porque el recurso zombies ya està echo asi. ( No estoy seguro de nuevo xD )

Ah , me olvidaba. Si los kills del script es "kills" , entonces como el otro script va a obtener los "zombie kills" sin es "kills"?.

Link to comment
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...