Jump to content

Elemento 'player'


Alexs

Recommended Posts

Posted

Hola a Todos, Queria saber como consigo la vida de un jugador con un setTimer sin usar eventos que lo tengan en source,

Quiza no me explico bien, quiero saber como hacer esto:

  
function infectando ( ) 
setElementData(thePlayer, "nivel.infeccion", 0 ) 
    end      
  
setTimer ( infectando, 30000, 0) 

Ya que asi me dice que "thePlayer" es nil :?

Developer @ MYVAL

Posted
function infectando ( ) 
    for index, thePlayer in ipairs ( getElementsByType ( "player" ) ) do 
        setElementData ( thePlayer, "nivel.infeccion", 0 ) 
    end 
end 
setTimer ( infectando, 30000, 0 ) 

Eso querias decir?

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

Si no me equivoco eso los afectaria a todos, para eso se que puedo usar esa funcion, pero si lo que deseo es afectar a un solo jugador especificamente?

Developer @ MYVAL

Posted

Si no tenes un elemento, nunca va a funcionar.

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

mm... algun consejo para conseguirlo como elemento?? pensaba en usar su IP o su Serial con onPlayerJoin, pero pensaba en que esta puede variar :S

Developer @ MYVAL

Posted

El serial?

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

Si, es que es lo que no puede variar, pero veo que solo se podria con "getPlayerFromName" pero este se puede cambiar, alguna otra manera de conseguir un elemento de jugador que no varie?

Developer @ MYVAL

Posted

Es que no entiendo que queres hacer, podrias especificar?

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

Cierto, dejame expresarme lo mejor que pueda:

Quiero conseguir un elemento de jugador que no sea una variable del evento como "source", ya que no uso un evento si no un setTimer, usaria getElementsByType pero solo quiero afectar a un jugador, Que utilizo para eso?

Developer @ MYVAL

Posted

Podes hacerlo client side.

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

Mientras esperaba tu respuesta se me ocurrio usar

getPlayerAccount --Para conseguir la cuenta al loggear 
getAccountPlayer --Para conseguir al jugador en el Timer 

Deberia resultar si lo intento, verdad?

Developer @ MYVAL

Posted
getAccount + getAccountPlayer 

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

Necesitas el nombre de la cuenta, si cambia, bueno... te jodes.

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

getPlayerAccount se usa para obtener la cuenta de UN JUGADOR, no para obtener UNA CUENTA que es lo que necesitas claro.

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

El problema con getAccount esta en el cambio de nombre, asi que usare

getPlayerName + getPlayerFromName 

y pondre un Anti Cambio de Nick.

Developer @ MYVAL

  • Recently Browsing   0 members

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