di3g0 Posted September 4, 2021 Share Posted September 4, 2021 Se como hacer una tabla con vehiculos y skines ,pero no tengo ni idea como hacer una tabla con animaciones por ejemplo quiero poner esta animaciones en una tabla : PLAYIDLES", "shift" Link to comment
alex17" Posted September 5, 2021 Share Posted September 5, 2021 (edited) 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 September 5, 2021 by alex17" Link to comment
di3g0 Posted September 5, 2021 Author Share Posted September 5, 2021 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
alex17" Posted September 6, 2021 Share Posted September 6, 2021 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 ? 1 Link to comment
di3g0 Posted September 6, 2021 Author Share Posted September 6, 2021 3 hours ago, alex17" 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now