Jump to content

Que hay mal aca? (Zombie Kills + Comando)


Alexs

Recommended Posts

Hola a Todos, tengo este script:

function setPlayerZombieKills ( playerSource, jugador, zkills ) 
local cuenta = getAccountName(getPlayerAccount ( playerSource )) 
    if ( jugador ) and ( cuenta == "Alexs_Steel" ) then 
        local account = getPlayerAccount ( jugador ) 
        if ( account and not isGuestAccount ( account ) ) then 
            return setAccountData ( account, "Zombie kills", tonumber(zkills) ) 
        else 
            return false 
        end 
    end 
end 
  

Me dice que el argumento 1 de getPlayerAccount no es un Elemento si no el comando que utilizo

Link to comment
function setPlayerZombieKills ( playerSource, commandName, jugador, zkills ) 
local cuenta = getAccountName(getPlayerAccount( playerSource )) 
    if ( jugador ) and (zkills) and ( cuenta == "Alexs_Steel" ) then 
        local account = getPlayerAccount ( getPlayerFromName(jugador) ) 
        if ( account and not isGuestAccount ( account ) ) then 
           setAccountData( account, "Zombie kills", tonumber(zkills) ) 
           setElementData(account, "Zombie kills", getAccountData(account), "Zombie kills") 
        else 
            return false 
        end 
    end 
end 
  
addCommandHandler("zkills", setPlayerZombieKills) 
  

Intente asi, pero no me pone los zombies del Scoreboard en el numero que pongo en (zkills)

Link to comment
function setPlayerZombieKills ( playerSource, commandName, jugador, zkills ) 
    local cuenta = getAccountName ( getPlayerAccount ( playerSource ) ) 
    if ( jugador ) and ( zkills ) and ( cuenta == "Alexs_Steel" ) then 
        local jugador = getPlayerFromName ( jugador ) 
        local account = getPlayerAccount ( jugador ) 
        if ( account and not isGuestAccount ( account ) ) then 
           setAccountData ( account, "Zombie kills", tonumber ( zkills ) ) 
           setElementData ( jugador, "Zombie kills", tonumber ( zkills ) ) 
        end 
    end 
end 
addCommandHandler ( "zkills", setPlayerZombieKills ) 

Link to comment
  • Recently Browsing   0 members

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