Raised This Month: $ Target: $400
 0% 

Move 3 almost same functions to one


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
lazarev
Veteran Member
Join Date: Sep 2008
Old 08-24-2010 , 07:12   Move 3 almost same functions to one
Reply With Quote #1

Hi, I need you to move those functions to client_command.
PHP Code:
// =========== the commands are ============
register_clcmd"__SETKILLS""CMD_SETKILLS"ADMIN_LEVEL );
register_clcmd"__SETHEADSHOTS""CMD_SETHEADSHOTS"ADMIN_LEVEL );
register_clcmd"__SETSURVIVES""CMD_SETSURVIVES"ADMIN_LEVEL );
// ======================================

public CMD_SETKILLSidlevelcid )
{
    if ( !
cmd_accessidlevelcid) )
        return 
PLUGIN_HANDLED;
        
    new 
szArg33 ];
    
read_argv1szArg32 );
    
    if( !
equalszArg"" ) )
    
g_GlobalScoreKILLS ] = str_to_numszArg );
    
ShowEventMenuid );
    
    return 
PLUGIN_HANDLED;
}

public 
CMD_SETHEADSHOTSidlevelcid )
{
    if ( !
cmd_accessidlevelcid) )
        return 
PLUGIN_HANDLED;
    
    new 
szArg33 ];
    
read_argv1szArg32 );
    if( !
equalszArg"" ) )
    
g_GlobalScoreHEADSHOTS ] = str_to_numszArg );
    
ShowEventMenuid );
    
    return 
PLUGIN_HANDLED;
}

public 
CMD_SETSURVIVESidlevelcid )
{
    if ( !
cmd_accessidlevelcid) )
        return 
PLUGIN_HANDLED;
        
    new 
szArg33 ];
    
read_argv1szArg32 );
    
    if( !
equalszArg"" ) )
    
g_GlobalScoreSURVIVES ] = str_to_numszArg );
    
ShowEventMenuid );
    
    return 
PLUGIN_HANDLED;

lazarev 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 21:52.


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