SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 02/05/2010, 06:46 PM   #1
Adoniiz
Gangsta
 
Join Date: Mar 2010
Posts: 743
Reputation: 45
Default [Ayuda] Menu No Me Funciona

Hola, que tal?..
bueno quiero que me puedan solucionar esto: cuando abro server todo esta bn entro al server y cuando pongo /armas (es un menu) se me cierra el server (como que se callera)

Miren Como es el Comando:

el "New":
Quote:
new Menu:Armas ;
El AddMenuItem
Quote:
public OnFilterScriptInit()
{
print("\n---------------------------------------------------");
print("-----------------ahhahaah no se puede ver-----------");
print("---------------------------------------------------\n");

Armas = CreateMenu("Armas", 1, 18.0, 102.0, 165.0, 165.0);
AddMenuItem(Armas, 0, "Pistola");
AddMenuItem(Armas, 0, "Pistola Silenciador");
AddMenuItem(Armas, 0, "Escopeta");
AddMenuItem(Armas, 0, "MP5");
AddMenuItem(Armas, 0, "Tec-9");
AddMenuItem(Armas, 0, "Uzi");
AddMenuItem(Armas, 0, "Ak47");
AddMenuItem(Armas, 0, "M4");
AddMenuItem(Armas, 0, "Francotirador");

return 1;
}
El Comando:

Quote:
if(strcmp(cmdtext, "/armas", true) == 0)
{
ShowMenuForPlayer(Armas, playerid);
TogglePlayerControllable(playerid, 0);
return 1;
}
y Por Ultimo OnPlayerSelectedMenuRow y OnPlayerExitedMenu

Quote:
public OnPlayerSelectedMenuRow(playerid, row)
{
new Menu:CurrentMenu = GetPlayerMenu(playerid);

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

if(CurrentMenu == Armas)
{
switch(row)
{
case 0:
{
GivePlayerWeapon(playerid, 22, 500);
new name[256];
GetPlayerName(playerid, name, sizeof(name));
TogglePlayerControllable(playerid,1);

}
case 1:
{
GivePlayerWeapon(playerid, 23, 500);
new name[256];
GetPlayerName(playerid, name, sizeof(name));
TogglePlayerControllable(playerid,1);
}
case 2:
{
GivePlayerWeapon(playerid, 25, 500);
new name[256];
GetPlayerName(playerid, name, sizeof(name));
TogglePlayerControllable(playerid,1);
}
case 3:
{
GivePlayerWeapon(playerid, 29, 500);
new name[256];
GetPlayerName(playerid, name, sizeof(name));
TogglePlayerControllable(playerid,1);
}
case 4:
{
GivePlayerWeapon(playerid, 32, 500);
new name[256];
GetPlayerName(playerid, name, sizeof(name));
TogglePlayerControllable(playerid,1);
}
case 5:
{
GivePlayerWeapon(playerid, 28, 500);
new name[256];
GetPlayerName(playerid, name, sizeof(name));
TogglePlayerControllable(playerid,1);
}
case 6:
{
GivePlayerWeapon(playerid, 30, 500);
new name[256];
GetPlayerName(playerid, name, sizeof(name));
TogglePlayerControllable(playerid,1);
}
case 7:
{
GivePlayerWeapon(playerid, 31, 500);
new name[256];
GetPlayerName(playerid, name, sizeof(name));
TogglePlayerControllable(playerid,1);
}
case 8:
{
GivePlayerWeapon(playerid, 34, 500);
new name[256];
GetPlayerName(playerid, name, sizeof(name));
TogglePlayerControllable(playerid,1);
}
}
}
return 1;
}
public OnPlayerExitedMenu(playerid)
{
new Menu:CurrentMenu = GetPlayerMenu(playerid);
if(Menu:CurrentMenu == Armas)
{
TogglePlayerControllable(playerid, 1);
}
return 1;
}
__________________
Adoniiz is offline   Reply With Quote
Old 02/05/2010, 07:56 PM   #2
Cesar_Biker
Gangsta
 
Cesar_Biker's Avatar
 
Join Date: Nov 2009
Location: Linux Kernel
Posts: 678
Reputation: 0
Default Re: [Ayuda] Menu No Me Funciona

pawn Code:
new name[256];
GetPlayerName(playerid, name, sizeof(name));
Esto para que sirve?
Por lo demás, no se, prueba a cambiar "Armas" por un numero, como por ejemplo "1324".
__________________
Cesar_Biker is offline   Reply With Quote
Old 03/05/2010, 10:04 AM   #3
CristianTdj
High-roller
 
CristianTdj's Avatar
 
Join Date: Jul 2009
Location: Andalucía, Spain.
Posts: 1,321
Reputation: 3
Default Re: [Ayuda] Menu No Me Funciona

Sí, eso del nombre no te sirve para nada, además, te recomiendo que hagas un dialog.
__________________

CristianTdj is offline   Reply With Quote
Old 03/05/2010, 02:45 PM   #4
Adoniiz
Gangsta
 
Join Date: Mar 2010
Posts: 743
Reputation: 45
Default Re: [Ayuda] Menu No Me Funciona

ya lo solucione lo tenia que poner en ongamemodeinit ;X gracias igualemente
__________________
Adoniiz is offline   Reply With Quote
Reply

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
[FilterScript] [FS]Weapon Menu + Player Menu + Vehicle Menu! [Good For Stunt Server] AlexHitman Filterscripts 4 27/07/2014 08:34 PM
Ayuda mi server no funciona. vict0r Español/Spanish 12 13/05/2010 09:36 PM
Ayuda con un Menu Master[Pro] Español/Spanish 3 02/05/2010 02:30 PM
{DUV] funciona? hitachi_uchila Português/Portuguese 1 02/03/2010 01:09 AM
[AYUDA]Como instalo y como veo si funciona este Fs? Karkanos Español/Spanish 1 15/01/2010 09:32 PM


All times are GMT. The time now is 06:17 AM.


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