Raised This Month: $ Target: $400
 0% 

How to get victim name?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 04-28-2018 , 11:47   Re: How to get victim name?
Reply With Quote #7

@Relaxing that will not work. get_user_name() expects a 1-32 client id.

PHP Code:

#include <amxmodx>
#include <amxmisc>

public plugin_init() 
{
    
register_concmd"vote" "VoteConCmd" );
}

public 
VoteConCmdid )
{
    new 
szArg32 ] , iVictim szVoter32 ];
    
    
read_argvszArg charsmaxszArg ) );
    
iVictim cmd_targetid szArg );
    
    if ( 
iVictim )
    {
        
get_user_nameid szVoter charsmaxszVoter ) );
        
get_user_nameiVictim szArg charsmaxszArg ) );
        
        
console_printid "%s voted %s" szVoter szArg);
    }

__________________
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 04:43.


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