Raised This Month: $ Target: $400
 0% 

Specific ads for admin only


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
tonykaram1993
Senior Member
Join Date: Mar 2013
Location: This World
Old 01-06-2014 , 06:51   Re: Specific ads for admin only
Reply With Quote #1

In ad_manager.sma, go to line 271 and change the following:
PHP Code:
//Display the message to everyone
        
new plist[32], playernumplayer;
        
        
get_players(plistplayernum"c");
    
        for(new 
0playernumi++)
        {
            
player plist[i];
            
            
message_begin(MSG_ONEgmsgSayText, {0,0,0}, player);
            
write_byte(player);
            
write_string(message);
            
message_end();
        } 
->
PHP Code:
//Display the message to everyone
        
new plist[32], playernumplayer;
        
        
get_players(plistplayernum"c");
    
        for(new 
0playernumi++)
        {
            
player plist[i];

            if( !
is_user_adminplayer ) ) continue;
            
            
message_begin(MSG_ONEgmsgSayText, {0,0,0}, player);
            
write_byte(player);
            
write_string(message);
            
message_end();
        } 
Then compile and you have what you want.
__________________
My Plugins:
UltimatePlugin
UltimateSurf
UltimateAdmin
Code:
rcon version | rcon amxx version | rcon meta version
rcon amxx plugins | rcon meta list | rcon status
I AM INACTIVE ON THIS FORUM - For direct contact: [email protected]

Last edited by tonykaram1993; 01-06-2014 at 07:20.
tonykaram1993 is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 01-06-2014 , 06:57   Re: Specific ads for admin only
Reply With Quote #2

@tonykaram1993, that will do the opposite of what he asked. You need to continue if not admin. So, you can simply put a ! in front of is_user_admin(player).
__________________
fysiks is offline
Reply



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 20:39.


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