Jump to content

[Ayuda] Script


Narutimmy

Recommended Posts

Hola bueno ise este script la idea es al morir te transporta a la misma posision pero 500m en el aire con un paracaidas... pero no funciona :/

local R, T, Y = getElementPosition(thePlayer)
function Restart ( thePlayer ) 

setElementData(thePlayer,"AAutoS",0)
setElementData(thePlayer,"Iitemss",0)



setTimer (
   function (thePlayer)

       setElementPosition ( thePlayer, R, T, Y + 500 )
       giveWeapon ( thePlayer, 46, 1 )

   end
   , 5000, 1
)


end
addEventHandler ( "onPlayerWasted", getRootElement(), Restart )

Link to comment
1º 'thePlayer' no esta definido, usa 'source'.

2º getElementPosition esta fuera de la funcion "Restart".

si lo intente con source pero no me funciono tambien el get lo tenia dentro de la funcion y nada me daba error en el argumento 1, o error al obtener la "Y"

EDIT: Porque no funciona el "


" ?¿

Link to comment

Con el setTimer no me dejó...

addEventHandler( "onPlayerWasted", getRootElement( ), 
function ()      
setElementData(source,"AAutoS",0) 
setElementData(source,"Iitemss",0) 
local a,b,c = getElementPosition(source) 
        spawnPlayer(source, a,b,c +500) 
        giveWeapon ( source, 46, 1 ) 
                end 
        ) 
  

Link to comment
Con el setTimer no me dejó...
addEventHandler( "onPlayerWasted", getRootElement( ), 
function ()      
setElementData(source,"AAutoS",0) 
setElementData(source,"Iitemss",0) 
local a,b,c = getElementPosition(source) 
        spawnPlayer(source, a,b,c +500) 
        giveWeapon ( source, 46, 1 ) 
                end 
        ) 
  

Listo Gracias.

Link to comment
  • Recently Browsing   0 members

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