Raised This Month: $51 Target: $400
 12% 

adminvip_announce


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
TRUE RED
Senior Member
Join Date: Mar 2012
Location: Ukraine
Old 04-08-2012 , 12:36   adminvip_announce
Reply With Quote #1

I want to replace hudmessage? I want this message in chat with different colors. For example: 'Team_color' [ 'Green' VIP 'Team_color' ] 'Green' %s 'Yellow' connected to the server
Attached Thumbnails
Click image for larger version

Name:	2012-04-07 00h49_37.jpg
Views:	123
Size:	8.3 KB
ID:	101798  
Attached Files
File Type: sma Get Plugin or Get Source (adminvip_announce.sma - 527 views - 755 Bytes)
TRUE RED is offline
Send a message via ICQ to TRUE RED Send a message via Skype™ to TRUE RED
kapzz
Member
Join Date: Mar 2012
Location: Mars
Old 04-08-2012 , 13:09   Re: adminvip_announce
Reply With Quote #2

PHP Code:
#include < amxmodx >
#include < amxmisc >
#include < colorchat >
 
#define PLUGIN "VIP/Admin Announce"
#define VERSION "1.0"
#define AUTHOR "bad_indentation"
 
public plugin_init() 
{
    
register_pluginPLUGINVERSIONAUTHOR )

}
 
public 
client_putinserverid //"client_connect" is to earlyer...
{
    new 
name32 ]
    if( (
get_user_flags(id) & ADMIN_LEVEL_B) )
    {
        
get_user_nameidnamesizeof name )
        
client_print(idprint_chat,"here")
        
ColorChat0TEAM_COLOR"^3[^4ADMIN^3] ^4%s ^1joined the server."name )
    }
    else if( (
get_user_flags(id) & ADMIN_LEVEL_C
    {
        
get_user_nameidnamesizeof name )
        
ColorChat0TEAM_COLOR"^3[^4VIP^3] ^4%s ^1joined the server."name )
    }


Last edited by kapzz; 04-09-2012 at 04:42. Reason: fix
kapzz is offline
TRUE RED
Senior Member
Join Date: Mar 2012
Location: Ukraine
Old 04-08-2012 , 13:48   Re: adminvip_announce
Reply With Quote #3

It does not work for me. Nothing at all
TRUE RED is offline
Send a message via ICQ to TRUE RED Send a message via Skype™ to TRUE RED
kapzz
Member
Join Date: Mar 2012
Location: Mars
Old 04-09-2012 , 04:41   Re: adminvip_announce
Reply With Quote #4

Check now tested and works , i tested with ADMIN_USER on the vip tag and all bots joined give the message.
Check your vip and admin flags.
And you will not see the message saying "you join the server" only the players connected

Last edited by kapzz; 04-09-2012 at 04:41.
kapzz is offline
TRUE RED
Senior Member
Join Date: Mar 2012
Location: Ukraine
Old 04-09-2012 , 09:38   Re: adminvip_announce
Reply With Quote #5

Thank you so much Can you also add connect sound? Because I have some troubles. I add this line
and I have an error.
Code:
#include < amxmodx > 
#include < amxmisc > 
#include < colorchat > 
  
#define PLUGIN "VIP/Admin Announce" 
#define VERSION "1.0" 
#define AUTHOR "bad_indentation" 
  
public plugin_init()  
{ 
    register_plugin( PLUGIN, VERSION, AUTHOR ) 

} 
  
public client_putinserver( id ) //"client_connect" is to earlyer... 
{ 
    new name[ 32 ] 
    if( (get_user_flags(id) & ADMIN_LEVEL_B) ) 
    { 
        get_user_name( id, name, sizeof name - 1 ) 
        client_print(id, print_chat,"here") 
        ColorChat( 0, TEAM_COLOR, "^3[^4VIP^3] ^1На сервер зашёл VIP клиент ^4%s", name )
		client_cmd(0, "spk events/task_complete");
    } 
}
Attached Thumbnails
Click image for larger version

Name:	123.jpg
Views:	106
Size:	63.6 KB
ID:	101868  
TRUE RED is offline
Send a message via ICQ to TRUE RED Send a message via Skype™ to TRUE RED
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 04-09-2012 , 09:39   Re: adminvip_announce
Reply With Quote #6

That warning won't affect the plugin.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
TRUE RED
Senior Member
Join Date: Mar 2012
Location: Ukraine
Old 04-09-2012 , 09:45   Re: adminvip_announce
Reply With Quote #7

Yes but why this error occurred? Can you explain me please? What I should add to the code to avoid this error? I bet you know
TRUE RED is offline
Send a message via ICQ to TRUE RED Send a message via Skype™ to TRUE RED
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 04-09-2012 , 09:47   Re: adminvip_announce
Reply With Quote #8

Code should be indented properly and have the same indention throughout the plugin.

The error says that it doesn't do that, and you didn't get the error until you edited it.

Quote:
Originally Posted by TRUE RED View Post
Code:
        get_user_name( id, name, sizeof name - 1 ) 
        client_print(id, print_chat,"here") 
        ColorChat( 0, TEAM_COLOR, "^3[^4VIP^3] ^1На сервер зашёл VIP клиент ^4%s", name )
		client_cmd(0, "spk events/task_complete");
Do you see some indentions that don't match?
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
bazhenov93
Veteran Member
Join Date: Oct 2010
Old 04-09-2012 , 09:47   Re: adminvip_announce
Reply With Quote #9

Try compiling on web compiler or use AMXX Studio.
bazhenov93 is offline
TRUE RED
Senior Member
Join Date: Mar 2012
Location: Ukraine
Old 04-09-2012 , 10:28   Re: adminvip_announce
Reply With Quote #10

Yes, Exolent[jNr], you are right. Thank you for help I'm using notepad++ and it make the text incorrect. it shows the right form of text in notepad++ after saving i open it in standart notepad i have this
Code:
get_user_name( id, name, sizeof name - 1 ) 
        client_print(id, print_chat,"here") 
        ColorChat( 0, TEAM_COLOR, "^3[^4VIP^3] ^1На сервер зашёл VIP клиент ^4%s", name )
		client_cmd(0, "spk events/task_complete");
So notepad++ sucks! I am using now AkelPad

Hi, bazhenov93. Now I have no reason to use web compiler or AMXX Studio. Anyway thanks
TRUE RED is offline
Send a message via ICQ to TRUE RED Send a message via Skype™ to TRUE RED
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 19:26.


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