Jump to content

[AJUDA]


Recommended Posts

--Funções: 
  
bindKey 
setPedAnimation 
  
--base: 
  
status = {} 
  
for _, v in pairs ( getElementsByType "player" ) do 
    bindKey ( v, "m", "down", function(player) setPedAnimation( player, status[player] and "ped" or "", status[player] and "WOMAN_walknorm" or "") status[player] = not status[player] end ) 
end 

Link to comment
[for _, v in pairs ( getElementsByType "player" ) do 
    bindKey ( v, "m", "down", function(player) setPedAnimation( player, status[player] and "casino" or "manwinb", status[player] and "manwinb" or "casino") status[player] = not status[player] end ) 
end 

entao eu modifiquei o script com meus anim mas nao vai da o possivel erro

ERROR :

ERROR:attempnt To index global (a niil value ) 

Link to comment

ficou um pouco confuso meu codigo :S, tente assim:

status = {} 
  
function anim ( player ) 
    if not status[player] then 
        setPedAnimation( player, "casino", "manwinb" ) 
    else 
        setPedAnimation ( player, "", "" ) 
    end 
    status[player] = not status[player] 
end 
  
for _, v in pairs ( getElementsByType "player" ) do 
    bindKey ( v, "m", "down", anim ) 
end 

( voce vai ter que 'bindar' a key dnv quando o player entrar no servidor (onPlayerJoin) )

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