Narutimmy

[Ayuda] Script - Timers

Recommended Posts

Hola bueno amm ise este Script la idea es que cuando entre a la ColShape si tienes el Skin 260 no pase nada, pero si tienes cualquier otro Te aumentel a Mutacion de 10 en 10 cada 10 segundos.

Pero nose que pasa que aonque tenga el 260 igual me la aumenta... o en ocaciones mueres y la sigue aumentando :S

CLiente

local Area = createColCircle ( 1481.2875976563,-1655.6435546875, 1000 ) 
  
  
  
  
  
  
function Mutacion (pHitElement) 
local ID = (getElementModel(pHitElement)) 
local Mutta = getElementData(pHitElement,"Mutacion") or 0 
  
if getElementType( pHitElement ) == 'player' then 
Muta = setTimer(Mutacion,10000,0) 
if ID == 260 then 
return 
else 
setElementData(pHitElement,"Mutacion", Mutta + 10) 
if Mutta >= 100 then 
---setElementData(localPlayer,"blood",5) 
setElementData(pHitElement,"bleeding",500) 
elseif Mutta >= 50 then 
setElementData(pHitElement,"bleeding",200) 
---setElementData(localPlayer,"pain",true) 
end 
end 
end 
end 
addEventHandler('onClientColShapeHit', Area, Mutacion) 
  
  
  
  
  
  
  
addEventHandler('onClientColShapeLeave', Area, 
function (pHitElement) 
if getElementType( pHitElement ) == 'player' then 
if Muta then 
killTimer(Muta) 
end 
end 
end 
) 
  
  
  
addEventHandler('onClientPlayerWasted', root, 
function () 
killTimer(Muta) 
  
setElementData(localPlayer,"Mutacion",0) 
end 
) 

Share this post


Link to post

Prueba esto:

local Area = createColCircle ( 1481.2875976563,-1655.6435546875, 1000 ) 
  
  
  
function Mutacion (pHitElement) 
local ID = getElementModel(pHitElement) 
local Mutta = getElementData(pHitElement,"Mutacion") or 0 
  
if getElementType(pHitElement) == 'player' then 
Muta = setTimer(Mutacion,10000,0) 
if ID == 260 then 
return 
else 
setElementData(pHitElement,"Mutacion", Mutta + 10) 
if Mutta >= 100 then 
---setElementData(localPlayer,"blood",5) 
setElementData(pHitElement,"bleeding",500) 
elseif Mutta >= 50 then 
setElementData(pHitElement,"bleeding",200) 
---setElementData(localPlayer,"pain",true) 
end 
end 
end 
end 
addEventHandler('onClientColShapeHit', Area, Mutacion) 
  
  
  
  
  
  
  
addEventHandler('onClientColShapeLeave', Area, 
function (pHitElement) 
if getElementType( pHitElement ) == 'player' then 
if Muta then 
killTimer(Muta) 
end 
end 
end 
) 
  
  
  
addEventHandler('onClientPlayerWasted', root, 
function () 
killTimer(Muta) 
setElementData(localPlayer,"Mutacion",0) 
end 
) 

Share this post


Link to post

Que modificastes o.O? no noto cambio...

EDIT: Elimine todo y lo ise de otra forma y listo Funcionando

Share this post


Link to post

  • Recently Browsing   0 members

    No registered users viewing this page.