Jump to content

Que hay mal aca? (Zombie Kills + Comando)


Alexs

Recommended Posts

Posted

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

Developer @ MYVAL

Posted

Ese script no tiene mucho sentido para mi.

Como ejecutas la funcion?

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
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)

Developer @ MYVAL

Posted
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 ) 

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

Ok, me alegro que lo hayas podido resolver solo.

De nada.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

  • Recently Browsing   0 members

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