Raised This Month: $ Target: $400
 0% 

Request menu


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
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
 



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