Jump to content

Verificacion de pj Muerto


Recommended Posts

function hola(jugador,_)
  if(isPedDead(jugador))then
      outputChatBox("¡Estás muerto!",jugador,255,0,0)
  else
      outputChatBox("¡Estás vivo!",jugador,0,255,0)
  end
end
addCommandHandler("meme",hola)

 

Edited by _SAXI_
Link to comment
  • 4 months later...

Simplemente.
Primero, en el evento onPedWasted puedes darle el dato al source source:setData("Muerto",true)

Cuando reaparezcan el HP o cuando hagas el spawnPlayer usas un source:setData("Muerto",false)

Para verificar simplemente usas un if source:getData("Muerto") == true then return outputchatBox("Estás muerto",source,255,0,0) end y listo.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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