di3g0 Posted September 6, 2021 Share Posted September 6, 2021 Hola linces tengo un script con getControlState si tienes el skin de cj ,estas parado tantos segundos y no apretas ninguna tecla tal cosa... if ( CJ[getElementModel ( player )] ) and (getPlayerIdleTime(player) > 100 ) and (not getControlState ( player, key ) ) then y me da error , el error es el siguiente: Bad argument @ 'getControlState' [Expected string at argument 2, got nil] el argumento 2 se supone que es key , asi que hice una de esas tablas de la wiki mta con todos los controles pero no se como llamarla, ya intenté de todo xd mira ese asterisco papu ni que fuera bash and (not getControlState ( player, key(*)) ) Link to comment
alex17" Posted September 11, 2021 Share Posted September 11, 2021 key = {"lctrl", "f1", "f2" } for n, k in ipairs(keys) then if getControlState(player, k) then outputChatBox("Has presionado "..k) end end ahi te dejo un ejemplo de como puede recorrer tu tabla 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