MaRcell Posted January 26, 2015 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 )
n3wage Posted January 26, 2015 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)
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