SA-MP Forums Archive
[Pregunta]; Keys. (Q - E) - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Español/Spanish (https://sampforum.blast.hk/forumdisplay.php?fid=29)
+---- Thread: [Pregunta]; Keys. (Q - E) (/showthread.php?tid=619931)



[Pregunta]; Keys. (Q - E) - Koblic - 23.10.2016

buenas tardes querнa preguntar sobre como podrнa utilizar dos keys (una serнa la letra Q y la otra la letra E)
las busquй en la lista de keys (https://sampwiki.blast.hk/wiki/Keys) y aparentan ser;

- La Q = KEY_LOOK_LEFT
- La E = KEY_LOOK_RIGHT

Al colocarlas en el pawno compila a la perfecciуn, pero a la hora de realizar el testeo no me funcionan.

Код HTML:
	if(newkeys == KEY_LOOK_LEFT).  /* Letra Q. */
	{
 /* funcion. */ 
	}

	if(newkeys == KEY_LOOK_RIGHT). /* Letra E. */
	{
 /* funcion. */ 
	}



Respuesta: [Pregunta]; Keys. (Q - E) - Swedky - 24.10.2016

Tъ quieres que se realice X funciуn al presionar ambas teclas al mismo tiempo? Tendrнa que ser asн:

pawn Код:
if(oldkeys == KEY_LOOK_LEFT && newkeys == KEY_LOOK_RIGHT)
Primero aprietas la Q, luego la E y me dices quй tal


Re: [Pregunta]; Keys. (Q - E) - Koblic - 25.10.2016

No, lo que yo quiero es que al tocar la Q haga una funciуn y al tocar la E haga otra, yo los tengo como los coloquй arriba y en el juego no me realizan ninguna funciуn.


Re: [Pregunta]; Keys. (Q - E) - BrianFaria - 25.10.2016

Es porque esas letras no se pueden usar.


Respuesta: Re: [Pregunta]; Keys. (Q - E) - Z0MBERTH - 25.10.2016

Quote:
Originally Posted by Speedpro
Посмотреть сообщение
Es porque esas letras no se pueden usar.
Sн pueden ser utilizada.


--
Coloca esta pequeсa funciуn en tъ KeyState.

Код:
new Keys[30]; format(Keys, sizeof(Keys), "Key: %i", newkeys);
SendClientMessage(playerid, -1, Keys);
Te dirб exactamente que botуn es tal, te lo harб por numeros, pero tiene la misma funciуn que KEY_NO, KEY_YES etc.


Re: [Pregunta]; Keys. (Q - E) - WalkingSleep - 25.10.2016

Creo que solo funcionan en vehнculos.


Respuesta: [Pregunta]; Keys. (Q - E) - Parka - 25.10.2016

Intenta hacerlo de esta manera:

pawn Код:
if(newkeys & KEY_LOOK_LEFT).  /* Letra Q. */
    {
 /* funcion. */
    }

    if(newkeys & KEY_LOOK_RIGHT). /* Letra E. */
    {
 /* funcion. */
    }
EDIT: se detecta en auto, a pie no lo hace, quizб es por mi configuraciуn o es general...


Respuesta: [Pregunta]; Keys. (Q - E) - Z0MBERTH - 25.10.2016

Quote:
Originally Posted by Parka
Посмотреть сообщение
Intenta hacerlo de esta manera:

pawn Код:
if(newkeys & KEY_LOOK_LEFT).  /* Letra Q. */
    {
 /* funcion. */
    }

    if(newkeys & KEY_LOOK_RIGHT). /* Letra E. */
    {
 /* funcion. */
    }
EDIT: se detecta en auto, a pie no lo hace, quizб es por mi configuraciуn o es general...
Es en general.


Re: [Pregunta]; Keys. (Q - E) - Koblic - 26.10.2016

їNo hay forma de que funcionen cuando estoy a pнe?

Ahora testeandolo montado en vehнculos si funciona, a pнe no.



Respuesta: [Pregunta]; Keys. (Q - E) - BrianFaria - 22.11.2016

Claro capo, pero funciona solo en vehiculos.