Raised This Month: $ Target: $400
 0% 

Solved Passing arguments to messagemode


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 08-17-2018 , 18:21   Re: Passing arguments to messagemode
Reply With Quote #3

Quote:
Originally Posted by OciXCrom View Post
Save the name in a variable and add it to the string later.
I can't, there would be no information on who the command will be executed upon.
PHP Code:
#define MAX_PLAYERS 32
#define MAX_NAME_LENGTH 31

new g_szNameHolderMAX_PLAYERS ][ MAX_NAME_LENGTH ];

public 
plugin_init( ) 

    
register_clcmd"suspendTime""OnSuspendTime" ); 


public 
OnSuspend_HandleridiMenuiItem 

    new 
szPlayerId], iAccessiItemCallback
     
    
menu_item_getinfoiMenuiItemiAccessszPlayerIdcharsmaxszPlayerId ), __iItemCallback ); 
    
menu_destroyiMenu ); 
     
    new 
iTarget str_to_numszPlayerId ); 
          
    if( ! 
is_user_connectediTarget ) ) 
    return 
PLUGIN_HANDLED
          
    new 
szName32 ]; 
    
get_user_nameiTargetszNamecharsmaxszName ) ); 
         
    
copyg_szNameHolderiTarget ], charsmaxg_szNameHolder ), szName );
    
client_cmdid"messagemode suspendTime" );
    
    return 
PLUGIN_CONTINUE
}

public 
OnSuspendTimeid 
{
    new 
szArgs192 ];
    
read_argsszArgscharsmaxszArgs ) ); 
    
remove_quotesszArgs ); 
     
    
// we got no ID to identify the person

__________________

Last edited by edon1337; 08-17-2018 at 18:31.
edon1337 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 17:32.


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