SA-MP Forums

Go Back   SA-MP Forums > Non-English > Languages > Español/Spanish

 
 
Thread Tools Display Modes
Old 19/05/2017, 01:45 AM   #1
CHEO96
Big Clucker
 
Join Date: Oct 2012
Posts: 52
Reputation: 1
Default Problemas con Keys

Hola tengo un pequeño problema, tengo 2 menus con Keys, osea...
Si presiono "Y" se abre un menu y si presiono "H" se abre otro pero quisiera que se abran los menus diferentes en la misma tecla tengo la funcion asi.
Ejemplo: Quisiera que Al presionar la tecla "Y" en una parte Cerca de un Actor se abra el menu de drogas y si estoy cerca de un Actor en Ammu se abra el menu de armas.

intente ponerlo pero me quedo asi

Quote:
if(!IsPlayerInAnyVehicle(playerid) && (newkeys & KEY_YES))
{
if(!IsAtDrogas(playerid)) return 1;
viewing_cmds_p1[playerid] = 1;
TextDrawShowForPlayer(playerid, Textdraw0);
TextDrawShowForPlayer(playerid, Textdraw1);
TextDrawShowForPlayer(playerid, Textdraw2);
TextDrawShowForPlayer(playerid, Textdraw3);
TextDrawShowForPlayer(playerid, Textdraw4);
}
if(newkeys == KEY_YES)
{
if(!IsAmmu(playerid)) return 1;
}
CHEO96 is offline  
Old 19/05/2017, 01:57 PM   #2
Tirael
Huge Clucker
 
Join Date: Sep 2013
Location: En un lugar llamado mundo.
Posts: 244
Reputation: 52
Default Respuesta: Problemas con Keys

Code:
if(!IsPlayerInAnyVehicle(playerid) && (newkeys & KEY_YES))
{
if(IsAtDrogas(playerid))
{
viewing_cmds_p1[playerid] = 1;
TextDrawShowForPlayer(playerid, Textdraw0);
TextDrawShowForPlayer(playerid, Textdraw1);
TextDrawShowForPlayer(playerid, Textdraw2);
TextDrawShowForPlayer(playerid, Textdraw3);
TextDrawShowForPlayer(playerid, Textdraw4);
}
else
{
if(IsAmmu(playerid)) 
{
//código
}
}
Tirael is offline  
Old 20/05/2017, 03:49 AM   #3
CHEO96
Big Clucker
 
Join Date: Oct 2012
Posts: 52
Reputation: 1
Default Respuesta: Problemas con Keys

si lo pongo asi el de Ammu se abre fuera del Ammu
CHEO96 is offline  
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
All keys ScIrUsna Scripting Help 1 23/04/2016 02:50 PM
[Ajuda] Keys ipsLuan Português/Portuguese 4 11/07/2014 01:36 AM
[Ajuda] Problemas com Keys VenoN Português/Portuguese 4 18/02/2014 04:00 PM
Plugin Keys Search? Fuck keys playerid. Manowar Scripting Help 16 21/10/2012 07:04 AM


All times are GMT. The time now is 04:59 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.