AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Player connects (https://forums.alliedmods.net/showthread.php?t=54394)

Samurai [/] 04-24-2007 14:14

Player connects
 
How can i make message to specific steam id?
(When he connect)

Styles 04-24-2007 17:35

Re: Player connects
 
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)
*/


pRED* 04-24-2007 18:18

Re: Player connects
 
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..."); }

3nraged 04-24-2007 19:33

Re: Player connects
 
can u edit it to be a Hud Message?

Nican 04-24-2007 19:35

Re: Player connects
 
Use the Hud message generator in AMXX-Studio

It's very easy to use

3nraged 04-24-2007 19:47

Re: Player connects
 
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?

Nican 04-24-2007 20:08

Re: Player connects
 
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

3nraged 04-24-2007 20:29

Re: Player connects
 
thanks i figured out how to generate it with the amxx studio program

Samurai [/] 04-25-2007 13:47

Re: Player connects
 
tnx. Can someone show how to make multiple id cases?

bwgrubbs1 04-25-2007 13:57

Re: Player connects
 
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.


All times are GMT -4. The time now is 06:40.

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