Raised This Month: $ Target: $400
 0% 

Request menu


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 01-01-2010 , 08:06   Request menu
Reply With Quote #1

hi,

i'm working on my mp3 player plugin ( http://www.youtube.com/watch?v=pIb-kGtAGEs ) and want to add a new item for request albums/tracks.

now i have no idea how to add a item like :

1. request your track/album

after pressing 1, player has to say/write the message. after this, i want to send this in console. like plugins menu in admin menu, when u want to change a Cvar.
the output of say must be anything like :

console = request "text".
and not say: request "text".

the problem : i'm using new menu system
__________________
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
Xellath
Veteran Member
Join Date: Dec 2007
Location: Sweden
Old 01-01-2010 , 09:27   Re: Request menu
Reply With Quote #2

That's quite simple actually, just put them in messagemode when they press the button.

Something like this:

Code:
public plugin_init( ) {     register_clcmd( "requestsong", "MessageMode_Request" ); } public MenuHandler( iClient, hMenu, iItem ) {     if( iItem == ITEM_EXIT )     {         return PLUGIN_HANDLED;     }         new szInfo[ 3 ];     new iAccess, iCallback;     menu_item_getinfo( hMenu, iItem, iAccess, szInfo, 2, _, _, iCallback );         switch( str_to_num( szInfo ) )     {         case 1: client_cmd( iClient, "messagemode requestsong" );     }         return PLUGIN_HANDLED; } public MessageMode_Request( iClient ) {     new szRequest[ 64 ];     read_args( szRequest, charsmax( szRequest ) );         log_amx( szRequest );         // just as a side note; this can easily be spammed     // so i would suggest you to add a check, or limit the amount     // of requests that can be submitted. }
__________________
Achievements API - a simple way for you to create your OWN custom achievements!
Xellath is offline
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 01-01-2010 , 13:05   Re: Request menu
Reply With Quote #3

awesome. ty. for sure i limited the amount of requests. ( a player can send next request, first after 60 sec. ) i know its not a good limit but it's ok. then i'll save all requests in a file and i can delete the requests.
ty
__________________
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
Old 03-30-2010, 06:02
One
This message has been deleted by One.
Reply



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 04:05.


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