Raised This Month: $ Target: $400
 0% 

Hud message connect


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Unu
Senior Member
Join Date: Dec 2007
Old 05-23-2008 , 07:06   Hud message connect
Reply With Quote #1

Hy ... i want to appear a hud message in the center of the screen when a player connect to the server ( only that player to view the hud message )

Thx
__________________
connorr , X-olent , alka , SAMURAI16 , YamiKaitou , arkshine , styles , v3x , ZombieMan , hleV ... only the best here
Unu is offline
Fry!
Veteran Member
Join Date: Apr 2008
Location: Latvia
Old 05-23-2008 , 07:25   Re: Hud message connect
Reply With Quote #2

Here I think this is the one what you need > http://forums.alliedmods.net/showthread.php?p=48424

next time try search
__________________
Quote:
Originally Posted by wisam187
why all the great scriptors..... always.... leave and let their works go into oblivion ???
i miss your way in making outstanding plugins...
this forum needs lots of the likes of you..... and less of the idiots that spread right now.
Fry! is offline
dekken
Veteran Member
Join Date: Jul 2007
Old 05-23-2008 , 07:27   Re: Hud message connect
Reply With Quote #3

Quote:
Originally Posted by Unu View Post
Hy ... i want to appear a hud message in the center of the screen when a player connect to the server ( only that player to view the hud message )

Thx

PHP Code:
#include <amxmodx>
#include <amxmisc>

#define PLUGIN    "New Plugin"
#define AUTHOR    "Unknown"
#define VERSION    "1.0"

new name[32]

new const 
ConnectMessage[] = "Hey %s! Welcome To My Server!!!"

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
}

public 
client_putinserver(id)
{
    
get_user_name(idname31)
    
set_task(10.0"ShowTheHud"id)
}

public 
ShowTheHud(id)
{
    
set_hudmessage(25500, -1.00.3506.012,00.10.1, -1)
    
show_hudmessage(idConnectMessagename)

__________________
Signature Goes Here
dekken is offline
Unu
Senior Member
Join Date: Dec 2007
Old 05-23-2008 , 07:45   Re: Hud message connect
Reply With Quote #4

Quote:
Originally Posted by dekken View Post
PHP Code:
#include <amxmodx>
#include <amxmisc>

#define PLUGIN    "New Plugin"
#define AUTHOR    "Unknown"
#define VERSION    "1.0"

new name[32]

new const 
ConnectMessage[] = "Hey %s! Welcome To My Server!!!"

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
}

public 
client_putinserver(id)
{
    
get_user_name(idname31)
    
set_task(10.0"ShowTheHud"id)
}

public 
ShowTheHud(id)
{
    
set_hudmessage(25500, -1.00.3506.012,00.10.1, -1)
    
show_hudmessage(idConnectMessagename)

doesn't work to compile ....
__________________
connorr , X-olent , alka , SAMURAI16 , YamiKaitou , arkshine , styles , v3x , ZombieMan , hleV ... only the best here
Unu is offline
Old 05-23-2008, 07:46
dekken
This message has been deleted by dekken.
dekken
Veteran Member
Join Date: Jul 2007
Old 05-23-2008 , 07:48   Re: Hud message connect
Reply With Quote #5

lol i put , instead of .
Sorry

PHP Code:
#include <amxmodx>
#include <amxmisc>

#define PLUGIN    "New Plugin"
#define AUTHOR    "Unknown"
#define VERSION    "1.0"

new name[32]

new const 
ConnectMessage[] = "Hey %s! Welcome To My Server!!!"

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
}

public 
client_putinserver(id)
{
    
get_user_name(idname31)
    
set_task(10.0"ShowTheHud"id)
}

public 
ShowTheHud(id)
{
    
set_hudmessage(25500, -1.00.3506.012.00.10.1, -1)
    
show_hudmessage(idConnectMessagename)

__________________
Signature Goes Here
dekken is offline
ESTCOBS
Junior Member
Join Date: May 2008
Location: Kraków, Poland
Old 05-23-2008 , 07:53   Connecting & Disconnecting [VERSION FOR YOU]
Reply With Quote #6

Hi =)
It's my version Show text ONLY if player full connected (see menu Choose Team)

Code:
#include <amxmodx>
#include <amxmisc>

#define PLUGIN	"ESTCOBS"
#define AUTHOR	"Connecting and Disconnecting" // Lite version for Unu
#define VERSION	"1.0"

public plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR)
}

public client_putinserver(id) {
	if(is_user_connected(id)) {
		new NICK[33];
		get_user_name(id, NICK, 32)
		
		set_hudmessage(255, 255, 255, -1.0, 0.32, 0, 6.0, 5.0)
		show_hudmessage(0, "%s connected !!!",NICK)
	}
}
Regards
ESTCOBS

// If you wanna version with connect sound send PW
__________________
Róót ! xD

Last edited by ESTCOBS; 05-23-2008 at 07:55. Reason: Better code ... ;]
ESTCOBS is offline
dekken
Veteran Member
Join Date: Jul 2007
Old 05-23-2008 , 07:55   Re: Hud message connect
Reply With Quote #7

you dont need to check if hes connected...since if its applied in putinserver
hes OBVIOUSLY connected..
also set the hudmessage id as "id" and not 0
since he wanted to show it only for the connected player
__________________
Signature Goes Here
dekken is offline
Unu
Senior Member
Join Date: Dec 2007
Old 05-23-2008 , 07:59   Re: Hud message connect
Reply With Quote #8

thx it's working ... +karma for both
__________________
connorr , X-olent , alka , SAMURAI16 , YamiKaitou , arkshine , styles , v3x , ZombieMan , hleV ... only the best here
Unu 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 08:04.


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