MaRcell Posted January 26, 2015 Share Posted January 26, 2015 Bom eu queria saber se tem alguma funçao para que as animaçao mostra-se para os outros players essa anim akie so mostra pra min e pro outro player eu to parado. addCommandHandler("dançar", function() local category, anim = getPedAnimation(localPlayer) if category == "dancing" and anim == "dance_loop" then setPedAnimation(localPlayer, false) else setPedAnimation(localPlayer, "dancing", "dance_loop", -1, true, false) end end ) Link to comment
n3wage Posted January 26, 2015 Share Posted January 26, 2015 Isso é porque as coisas feitas do lado client só serão vistas pelo client (o jogador que digitou o comando, no caso), Use esse codigo: ServerSide: FazendoAnim = {} -- criamos a tabela 'FazendoAnim' addCommandHandler( "dançar", function(thePlayer) if FazendoAnim[thePlayer] then -- se o jogador estiver na tabela 'FazendoAnim' parar a animacao. setPedAnimation( thePlayer, false ) FazendoAnim[thePlayer] = nil -- retiramos o jogador da tabela else setPedAnimation( thePlayer, "dancing", "dance_loop", -1, true, false ) FazendoAnim[thePlayer] = true -- colocamos o jogador na tabela end end) Link to comment
MaRcell Posted January 26, 2015 Author Share Posted January 26, 2015 vai ser serve side? Link to comment
n3wage Posted January 26, 2015 Share Posted January 26, 2015 vai ser serve side? sim. Link to comment
MaRcell Posted January 27, 2015 Author Share Posted January 27, 2015 Vlw mas 1 vez ae fusion pego akie vlw 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