Raised This Month: $ Target: $400
 0% 

very simple modding


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
llustig
Senior Member
Join Date: Oct 2004
Old 12-12-2006 , 17:52   very simple modding
Reply With Quote #1

Code:
#include <amxmodx>

#define	PLUGIN	"Connect Announce"
#define	VERSION	"0.2"
#define	AUTHOR	"v3x"

new g_iMsgSayText, g_szSoundFile[] = "buttons/blip1.wav";

public plugin_init()
{
	register_plugin(PLUGIN, VERSION, AUTHOR);
	g_iMsgSayText = get_user_msgid("SayText");
}

public plugin_precache()
{
	precache_sound(g_szSoundFile);
}

public client_authorized(id)
{
	if(is_user_bot(id)) return PLUGIN_CONTINUE;

	new szUserName[33];
	get_user_name(id, szUserName, 32);

	new szAuthID[33];
	get_user_authid(id , szAuthID , 32);

	new iPlayers[32], iNum, i;
	get_players(iPlayers, iNum);

	for(i = 0; i <= iNum; i++)
	{
		new x = iPlayers[i];

		if(!is_user_connected(x) || is_user_bot(x)) continue;

		
		new szMessage[164];
		format(szMessage, 163, "^x04%s (^x01%s^x04) connected", szUserName , szAuthID);

		message_begin( MSG_ONE, g_iMsgSayText, {0,0,0}, x );
		write_byte  ( x );
		write_string( szMessage );
		message_end ();
	}

	return PLUGIN_CONTINUE;
}
how can i switch it to where it will announce it when the player has actually connected to the server instead of while connecting.
__________________
llustig is offline
Send a message via AIM to llustig
 



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:19.


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