Jump to content

[AYUDA]Como hacer una tabla con animaciones


di3g0

Recommended Posts

local animaciones = 
{
  { block = "PLAYIDLES", anim = "shift" }, 
    { block = "123", anim = "123" }, 
}

addCommandHandler( "anim",
   function(player)
       setPedAnimation(player, animaciones[1].block, animaciones[1].anim) 
   end 
 )

addCommandHandler( "anim2",
   function(player)
       setPedAnimation(player, animaciones[2].block, animaciones[2].anim) 
   end 
 )

no entendi que quieres hacer, algo asi como el ejemplo ?

 

Edited by alex17"
Link to comment
17 hours ago, alex17" said:
local animaciones = 
{
  { block = "PLAYIDLES", anim = "shift" }, 
    { block = "123", anim = "123" }, 
}

addCommandHandler( "anim",
   function(player)
       setPedAnimation(player, animaciones[1].block, animaciones[1].anim) 
   end 
 )

addCommandHandler( "anim2",
   function(player)
       setPedAnimation(player, animaciones[2].block, animaciones[2].anim) 
   end 
 )

no entendi que quieres hacer, algo asi como el ejemplo ?

 

Quiero que el cj despues de un rato haga sus animaciones idle random ,ya puse la tabla pero no se como llamarlo xd

excepto con el openchatbox

outputChatBox("< "..table.random(randomGeT).." >")
 if  ( not getControlState ( player, key ) ) and (  CJ[getElementModel ( player )] )  and (getPlayerIdleTime(player) > 100 ) then 
  -- Player hasn't moved for 300,000ms (5 minutes)
            
            outputChatBox(">",source, 255, 87, 51)

           setPedAnimation(player, ANIMS[2].block, ANIMS[2].anim, -1, false, false, false, false)

 

Link to comment
4 hours ago, di3g0 said:

Quiero que el cj despues de un rato haga sus animaciones idle random ,ya puse la tabla pero no se como llamarlo xd

excepto con el openchatbox

outputChatBox("< "..table.random(randomGeT).." >")
 if  ( not getControlState ( player, key ) ) and (  CJ[getElementModel ( player )] )  and (getPlayerIdleTime(player) > 100 ) then 
  -- Player hasn't moved for 300,000ms (5 minutes)
            
            outputChatBox(">",source, 255, 87, 51)

           setPedAnimation(player, ANIMS[2].block, ANIMS[2].anim, -1, false, false, false, false)

 

local ANIMS =
{
    { block = "PLAYIDLES", anim = "shift" }, 
    { block = "123", anim = "123" }, 
}

local random = math.random(1, #ANIMS)
setPedAnimation(player, ANIMS[random].block, ANIMS[random].anim, ......)

algo asi ?

  • Thanks 1
Link to comment
3 hours ago, alex17&quot; said:
local ANIMS =
{
    { block = "PLAYIDLES", anim = "shift" }, 
    { block = "123", anim = "123" }, 
}

local random = math.random(1, #ANIMS)
setPedAnimation(player, ANIMS[random].block, ANIMS[random].anim, ......)

algo asi ?

genial me anduvo de una muchas gracias man anda excelentisimo ??

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