Raised This Month: $ Target: $400
 0% 

Example code how to do it ?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 10-17-2015 , 15:10   Re: Example code how to do it ?
Reply With Quote #8

Quote:
Originally Posted by Depresie View Post
so, you can get player's volume value ? :O
Replace "volume" with what you want to get.
PHP Code:
#include <amxmodx>

public plugin_init() 
{
    
register_concmd"getvol" "GetVolumeVal" );
}

public 
GetVolumeVal()
{
    new 
iPlayers32 ] , iNum szName32 ] , iPlayer;
    
    
get_playersiPlayers iNum "ch" );
    
    for ( new 
iNum i++ )
    {
        
iPlayer iPlayers];
        
        
get_user_nameiPlayer szName charsmaxszName ) );
    
        
query_client_cvariPlayer "volume" "CvarValCB" sizeofszName ) , szName );
    }
    
    return 
PLUGIN_HANDLED;
}

public 
CvarValCBid , const cvar[] , const value[] , const param[] )
{
    
server_print"Player id [%d] - %s - %s value is %s" id param cvar value );

__________________

Last edited by Bugsy; 10-17-2015 at 15:11.
Bugsy 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 22:08.


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