Raised This Month: $32 Target: $400
 8% 

Want a small help.


Post New Thread Reply   
 
Thread Tools Display Modes
abhishek_deshkar
Senior Member
Join Date: Jun 2013
Location: Earth
Old 07-26-2014 , 01:39   Re: Want a small help.
Reply With Quote #11

It's returning the server name lol.
abhishek_deshkar is offline
Eagle07
Veteran Member
Join Date: May 2014
Location: Morocco :D
Old 07-26-2014 , 01:48   Re: Want a small help.
Reply With Quote #12

xD
PHP Code:
new szName[32]
get_user_name(idszName 31)
set_hudmessage(25500, -1.00.7906.012.0)
show_hudmessage(id"Your are spectating %",szName
and now ?
__________________
Eagle07 is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 07-26-2014 , 05:55   Re: Want a small help.
Reply With Quote #13

You need to use pev_iuser2, if I get what he want.

PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <fakemeta>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"

new g_iHudSync


public plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
g_iHudSync CreateHudSyncObj( )
    
set_task1.0"DisplayPlayerInfo", .flags "b" )
}

public 
DisplayPlayerInfo( ) 
{
    new 
iPlayers32 ], iPlayersNumid,  iSpectatedPlayer,szSpectatedPlayerName33 ]
    
get_playersiPlayersiPlayersNum ,"bc" )
    
    if ( ! 
iPlayersNum )
        return;
    
    for ( new 
0iPlayersNum i++ )
    {
        
id iPlayers];
        
iSpectatedPlayer pev(idpev_iuser2)  
        
get_user_name(iSpectatedPlayerszSpectatedPlayerNamesizeof szSpectatedPlayerName -1)
        
set_hudmessage(25500, -1.00.7906.012.0)
        
ShowSyncHudMsg(id,g_iHudSync,"Your are spectating %",szSpectatedPlayerName
    }


Last edited by HamletEagle; 07-26-2014 at 05:56.
HamletEagle is offline
abhishek_deshkar
Senior Member
Join Date: Jun 2013
Location: Earth
Old 07-26-2014 , 07:19   Re: Want a small help.
Reply With Quote #14

Quote:
Originally Posted by HamletEagle View Post
You need to use pev_iuser2, if I get what he want.

PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <fakemeta>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"

new g_iHudSync


public plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
g_iHudSync CreateHudSyncObj( )
    
set_task1.0"DisplayPlayerInfo", .flags "b" )
}

public 
DisplayPlayerInfo( ) 
{
    new 
iPlayers32 ], iPlayersNumid,  iSpectatedPlayer,szSpectatedPlayerName33 ]
    
get_playersiPlayersiPlayersNum ,"bc" )
    
    if ( ! 
iPlayersNum )
        return;
    
    for ( new 
0iPlayersNum i++ )
    {
        
id iPlayers];
        
iSpectatedPlayer pev(idpev_iuser2)  
        
get_user_name(iSpectatedPlayerszSpectatedPlayerNamesizeof szSpectatedPlayerName -1)
        
set_hudmessage(25500, -1.00.7906.012.0)
        
ShowSyncHudMsg(id,g_iHudSync,"Your are spectating %",szSpectatedPlayerName
    }

Thanks mate ! Worked perfectly +karma
abhishek_deshkar is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 07-26-2014 , 08:17   Re: Want a small help.
Reply With Quote #15

You are welcome
HamletEagle is offline
EthicalHacker007
Veteran Member
Join Date: May 2014
Old 07-27-2014 , 03:45   Re: Want a small help.
Reply With Quote #16

eh?
Quote:
Originally Posted by abhishek_deshkar View Post
+karma
__________________
EthicalHacker007 is offline
VarmaRitik
Senior Member
Join Date: Jul 2014
Location: India
Old 07-27-2014 , 06:07   Re: Want a small help.
Reply With Quote #17

abhishek_deshkar,
try this
https://forums.alliedmods.net/showthread.php?p=484967
VarmaRitik is offline
Reply


Thread Tools
Display Modes

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 05:02.


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