Jump to content

help setTimer


LucasBaker

Recommended Posts

Hello because SetTimer not working?

is to stop the animation after 2 seconds

dMarker = createMarker(2251.50732, 2489.24927, 10.99080, 'cylinder', 2.0, 255, 0, 0, 150) 
  
function cDrogas(source) 
 if isElementWithinMarker(source, dMarker) then  
    outputChatBox("[sERVER] Você usou drogas ", source) 
    setPedAnimation ( source, "CRACK", "Bbalt_Idle_02") 
    setElementHealth ( source, getElementHealth(source) - 1 ) 
    setPedArmor ( source, getPedArmor(source)+4 ) 
    setTimer ( function() 
    setPedAnimation(source) 
    outputChatBox("[sERVER] Efeito das drogas passou", source) 
    end, 5000, 1 ) 
 else 
    outputChatBox("[sERVER] Você não está no marker", source) 
 end 
 end 
addCommandHandler("usardrogas", cDrogas) 

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...