Raised This Month: $51 Target: $400
 12% 

Duda con el codigo


  
 
 
Thread Tools Display Modes
Author Message
mashinata619
Member
Join Date: Aug 2010
Old 03-28-2013 , 08:41   Duda con el codigo
#1

Me gustaria hacer que cuando aprete el menu principal y luego seleccione el menu 4 por ejemplo, escriba por si solo /items! Solo me falta hacer el ultimo paso y es el public clcmd_items, pero no se que escribir dentro! Aqui os dejo el codigo

PHP Code:
// Some Commands
    
register_clcmd("nightvision""cmd_nightvision")
    
register_clcmd("jointeam""cmd_jointeam")
    
register_clcmd("joinclass""cmd_joinclass")
    
register_clcmd("chooseteam""cmd_jointeam")
    
register_clcmd("say /items""clcmd_items")
    
register_clcmd("say items""clcmd_items")

public 
clcmd_items(id)
{
    if(!
is_user_alive(id) || g_zombie[id])
        return 
PLUGIN_HANDLED
}

public 
open_game_menu(id)
{
    static 
menustring[128]
    
    
formatex(stringsizeof(string), "%L"OFFICIAL_LANG"GAME_MENU_NAME")
    
menu menu_create(string"gamem_handle")
    
    
// Enable Equipment Menu
    
formatex(stringsizeof(string), "%L"OFFICIAL_LANG"EQUIPMENT_NAME")
    
menu_additem(menustring"1"0)
    
    
// Game Infomation
    
formatex(stringsizeof(string), "%L"OFFICIAL_LANG"GAMEINFO_NAME")
    
menu_additem(menustring"2"0)
    
    
// Game Infomation
    
formatex(stringsizeof(string), "%L"OFFICIAL_LANG"PCONFIG_NAME")
    
menu_additem(menustring"3"0)
    
    
// Game Menu Items
    
formatex(stringsizeof(string), "%L"OFFICIAL_LANG"GAME_MENU_ITEMS")
    
menu_additem(menustring"4"0)
    
    
menu_setprop(menuMPROP_EXITMEXIT_ALL)
    
menu_display(idmenu0)
    

mashinata619 is offline
baneado
Veteran Member
Join Date: Dec 2012
Location: amxmodx-es.com
Old 03-28-2013 , 08:49   Re: Duda con el codigo
#2

PHP Code:
public clcmd_items(id)
{
    if (!
is_user_alive(id) || g_zombie[id]) return;

    
open_game_menu(id)

baneado is offline
mashinata619
Member
Join Date: Aug 2010
Old 03-28-2013 , 12:34   Re: Duda con el codigo
#3

Lo he puesto pero no funciona! No escribe "/items" cuando apreto el menu 4
mashinata619 is offline
baneado
Veteran Member
Join Date: Dec 2012
Location: amxmodx-es.com
Old 03-28-2013 , 14:56   Re: Duda con el codigo
#4

Quote:
Originally Posted by mashinata619 View Post
Lo he puesto pero no funciona! No escribe "/items" cuando apreto el menu 4
Ahh! Ahora entendí bien lo que quieres...

Es una pelotudez que cuando abres un menú te escriba algo en chat, pero bueno...

Donde abres el menú ańádele:
PHP Code:
client_cmd(id"say /items"
baneado is offline
mashinata619
Member
Join Date: Aug 2010
Old 03-29-2013 , 07:59   Re: Duda con el codigo
#5

Me podrias poner justo en que sitio poner el
PHP Code:
client_cmd(id"say /items"
Porque no entiendo nada de programacion!

Last edited by mashinata619; 03-29-2013 at 07:59.
mashinata619 is offline
baneado
Veteran Member
Join Date: Dec 2012
Location: amxmodx-es.com
Old 03-29-2013 , 10:22   Re: Duda con el codigo
#6

Quote:
Originally Posted by mashinata619 View Post
Me podrias poner justo en que sitio poner el
PHP Code:
client_cmd(id"say /items"
Porque no entiendo nada de programacion!
dentro de open_game_menu(id)
baneado is offline
arslan
BANNED
Join Date: Feb 2013
Location: En mi CASA jjejejejej
Old 03-29-2013 , 10:42   Re: Duda con el codigo
#7

Yo tengo un menu que no es de ZP pero yo tambien lo tengo asin:

PHP Code:
client_cmd(id"say /item"
Ami me sale perfecto!

Last edited by arslan; 03-29-2013 at 10:57. Reason: Puesto en [PHP]
arslan is offline
Send a message via MSN to arslan Send a message via Yahoo to arslan Send a message via Skype™ to arslan
baneado
Veteran Member
Join Date: Dec 2012
Location: amxmodx-es.com
Old 03-29-2013 , 10:46   Re: Duda con el codigo
#8

Quote:
Originally Posted by arslan View Post
Yo tengo un menu que no es de ZP pero yo tambien lo tengo asin:

PHP Code:
clien_cmd(id"say /item"
Ami me sale perfecto!
client
baneado is offline
arslan
BANNED
Join Date: Feb 2013
Location: En mi CASA jjejejejej
Old 03-29-2013 , 10:57   Re: Duda con el codigo
#9

Ya esta arreglado gracias.
arslan is offline
Send a message via MSN to arslan Send a message via Yahoo to arslan Send a message via Skype™ to arslan
rak
Veteran Member
Join Date: Oct 2011
Location: banned country
Old 03-29-2013 , 18:24   Re: Duda con el codigo
#10

pone un titulo descriptivo
__________________

www.amxmodx-es.com

Steam: Luchokoldo
rak is offline
Send a message via MSN to rak Send a message via Skype™ to rak
 



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

Forum Jump


All times are GMT -4. The time now is 09:48.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode