Raised This Month: $ Target: $400
 0% 

Player connects


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Samurai [/]
Member
Join Date: Sep 2006
Old 04-24-2007 , 14:14   Player connects
Reply With Quote #1

How can i make message to specific steam id?
(When he connect)
__________________
Samurai [/] is offline
Styles
Veteran Member
Join Date: Jul 2004
Location: California
Old 04-24-2007 , 17:35   Re: Player connects
Reply With Quote #2

K here is what I Have it works but read the comments. It will explain more.

+karma please

Code:
#include <amxmodx>

#define PLUGIN_NAME "Person Connect" 
#define PLUGIN_VERSION "1.00" 
#define PLUGIN_AUTHOR "who ever" 

public plugin_init()
{
	register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR);
}

public client_connect(id) /* called when they connect */
{
	new authid[33];
	get_user_authid(id, authid, 32);

	if(equali(authid, "STEAMIDOFPLAYER"))
		client_print(id, print_chat, "[AMXX] My message was fun to make.");
}

/* 
notes: That client_connect(id) is going to try and show them a message when they CONNECT.
if you want it when they first spawn in game so they have time to see it change it
then the correct function should be client_putinserver(id)
*/
Styles is offline
Send a message via AIM to Styles
pRED*
Join Date: Dec 2006
Old 04-24-2007 , 18:18   Re: Player connects
Reply With Quote #3

As kind of explained in the notes this will never actually be displayed..

You need to change it to client_putinserver and then set a task of at least a few seconds before displaying the message..

Code:
#include <amxmodx> #define PLUGIN_NAME "Person Connect" #define PLUGIN_VERSION "1.00" #define PLUGIN_AUTHOR "who ever" public plugin_init() {     register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR); } public client_putinserver(id) {     new authid[33];     get_user_authid(id, authid, 32);     if(equali(authid, "STEAMIDOFPLAYER"))         set_task(5.0,"message") } public message(id) {     client_print(id, print_chat, "[AMXX] I guess you just connected or something..."); }
pRED* is offline
3nraged
Junior Member
Join Date: Apr 2007
Old 04-24-2007 , 19:33   Re: Player connects
Reply With Quote #4

can u edit it to be a Hud Message?
3nraged is offline
Nican
Veteran Member
Join Date: Jan 2006
Location: NY
Old 04-24-2007 , 19:35   Re: Player connects
Reply With Quote #5

Use the Hud message generator in AMXX-Studio

It's very easy to use
__________________
http://www.nican132.com
I require reputation!
Nican is offline
Send a message via ICQ to Nican Send a message via MSN to Nican
3nraged
Junior Member
Join Date: Apr 2007
Old 04-24-2007 , 19:47   Re: Player connects
Reply With Quote #6

well i have no idea how to use it can u make that code so that when person joins its a hud message instead of chat for me?
3nraged is offline
Nican
Veteran Member
Join Date: Jan 2006
Location: NY
Old 04-24-2007 , 20:08   Re: Player connects
Reply With Quote #7

set_hudmessage(255, 0, 0, 0.01, 0.15, 0, 6.0, 12.0, 0.0, 0.0, -1)
show_hudmessage(id, "[AMXX] I guess you just connected or something...")

But you gotta make sure the user is in-server
__________________
http://www.nican132.com
I require reputation!
Nican is offline
Send a message via ICQ to Nican Send a message via MSN to Nican
3nraged
Junior Member
Join Date: Apr 2007
Old 04-24-2007 , 20:29   Re: Player connects
Reply With Quote #8

thanks i figured out how to generate it with the amxx studio program
3nraged is offline
Samurai [/]
Member
Join Date: Sep 2006
Old 04-25-2007 , 13:47   Re: Player connects
Reply With Quote #9

tnx. Can someone show how to make multiple id cases?
__________________
Samurai [/] is offline
bwgrubbs1
Senior Member
Join Date: Sep 2006
Old 04-25-2007 , 13:57   Re: Player connects
Reply With Quote #10

http://forums.alliedmods.net/showthread.php?p=359316

Just remove all the sounds from playing and you can have this display a message for SPECIFIC Steam ID's, and if u want HUD display...use amxx-studio and edit the source...this is your quickest route.
bwgrubbs1 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 06:40.


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