Raised This Month: $ Target: $400
 0% 

Player disconnected - HUD message for Admins only


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 04-12-2022 , 10:45   Re: Player disconnected - HUD message for Admins only
Reply With Quote #8

I thought it, It's not possible to create a loop inside 'client disconnected' function, Try this:
PHP Code:
#include <amxmodx>
#include <amxmisc>

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

new g_szName32 ];

public 
plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
set_task1.0"OnTaskDisconnected", .flags "b" )
}

public 
client_disconnectid )
{    
    
get_user_nameidg_szNamecharsmaxg_szName ) );


public 
OnTaskDisconnected( )
{
    if( 
g_szName] != EOS )
    {
        new 
iPlayer32 ], iNum;
        
get_playersiPlayeriNum"ch" )
    
        for( new 
iiAdminiNumi++ )
        {
            if( 
is_user_admin( ( iAdmin iPlayer] ) ) )
            {
                
set_hudmessage02550, -1.0, -1.0 )
                
show_hudmessageiAdmin"Player %s has disconnected"g_szName )
            }
        }
        
g_szName] = EOS
    
}

__________________
Youtube.com/Supremache

Bank System [Nvault - SQL Support]
VIP System
  • If you think it's that simple, then do it yourself.

Last edited by Supremache; 04-15-2022 at 00:05.
Supremache 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 10:33.


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