TadMad Posted October 1, 2016 Posted October 1, 2016 Bueno, yo hace no mucho que empecé a scriptear y he estado probando algunas cosas con paradise , haciendo scripts, etc, y necesito ayuda ya que al hacer un comando para revivir a alguien cuando está muerto, todo va bien menos que cuando reaparece le sigue saliendo lo de "Wait X Seconds for Respawn" necesito ayuda para quitar eso cuando le reviva, este es el código que tengo: addCommandHandler( "revivir", function( player, commandName, otherPlayer, ... ) local other, name = exports.players:getFromName( player, otherPlayer ) local isdead = isPedDead ( other ) local x, y, z = getElementPosition ( other ) if isdead then spawnPlayer( other, x, y, z ) setCameraTarget ( other ) else outputChatBox( "Este jugador esta vivo.", player, 0, 255, 153 ) end end ) perdón si sale un poco movido pero en el lua original todo esta bien alineado
aka Blue Posted October 1, 2016 Posted October 1, 2016 Debes eliminar el texto de render que tiene paradise. Para ello, edité un poco el código por mi mismo y me funcionó: Archivo: respawn_c.lua: addEvent ( "onBorrarTexto", true ) addEventHandler ( "onBorrarTexto", localPlayer, function ( ) respawnWait = false removeEventHandler( "onClientRender", root, drawRespawnText ) end ) Archivo: respawn.lua: addCommandHandler ( "reanimar", function ( player, commandName, otherPlayer ) local other, name = getFromName ( player, otherPlayer ) if hasObjectPermissionTo ( player, "command.kick", false ) or exports.factions:isPlayerInFaction ( player, 2 ) then if isElement ( other ) and isLoggedIn ( other ) and isPedDead ( other ) then if other == player then outputChatBox ( "No puedes reanimarte a ti mismo.", player, 255, 0, 0 ) else local x, y, z = getElementPosition ( player ) spawnPlayer ( other, x, y, z, 180, getElementModel ( other ), 0, 0 ) triggerClientEvent ( other, "onBorrarTexto", other ) fadeCamera ( other, true ) setCameraTarget ( other, other ) setCameraInterior ( other, 0 ) wastedTimes [ other ] = nil end end end end ) 2
aka Blue Posted October 1, 2016 Posted October 1, 2016 @TadMad De nada Dale like a la respuesta si te sirvió. PD: Suena muy YouTube eso, es para ganar los puntitos verdes xd.
Recommended Posts