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

[L4D2] Player Joined Notifier


Post New Thread Reply   
 
Thread Tools Display Modes
Blakeocity
Senior Member
Join Date: Nov 2009
Old 12-03-2009 , 01:02   Re: [L4D2] Player Joined Notifier
Reply With Quote #11

Thanks for the plugin. Works fine.
Blakeocity is offline
egor1908
Veteran Member
Join Date: Sep 2009
Old 12-03-2009 , 03:14   Re: [L4D2] Player Joined Notifier
Reply With Quote #12

Quote:
Originally Posted by Vance View Post
Not in Versus, that I can guarantee you.
Sometimes it shows the message, sometimes not.
egor1908 is offline
xbatista
Veteran Member
Join Date: Mar 2008
Location: Lithuania
Old 12-03-2009 , 08:42   Re: [L4D2] Player Joined Notifier
Reply With Quote #13

isn't sizeof(name) - 1 ? Stupid question, I just want to ask ,becouse I want to emigrate from cs 1.6 to SM games and in cs 1.6 is sizeof(name) - 1
__________________

Last edited by xbatista; 12-03-2009 at 09:12.
xbatista is offline
Send a message via Skype™ to xbatista
egor1908
Veteran Member
Join Date: Sep 2009
Old 12-03-2009 , 15:10   Re: [L4D2] Player Joined Notifier
Reply With Quote #14

Quote:
Originally Posted by Vance View Post
Uh, I honestly couldn't tell you. Are you changing the code at all?
What i do is, i am adding
Quote:
#include <topmenus>
#include <menus>
#include <timers>
into the top, where these includes belong to.


2nd step, i add this into the bottom of the plugin (because i have no OnClientConnected section anywhere)
Code:
// Player Joined Notifyer
public OnClientConnected(client)
{
	new String:name[64]
	GetClientName(client, name, sizeof(name))
	PrintToChatAll("%s has joined the game.", name)
}
I also tried moving new String:name[64]; to the top where all other "new" are located, i tried setting ; at the end of both lines.. Nothing worked, the plugin simply wont compile so i decided to separate it..
egor1908 is offline
DieTeetasse
Senior Member
Join Date: Jul 2009
Old 12-03-2009 , 18:31   Re: [L4D2] Player Joined Notifier
Reply With Quote #15

Just post the code her or as private message to me. Or what does the compiler say?

Btw: You can short these three lines into one.
PHP Code:
public OnClientConnected(client)
{
    new 
String:name[64]
    
GetClientName(clientnamesizeof(name))
    
PrintToChatAll("%s has joined the game."name)

to
PHP Code:
public OnClientConnected(client)
{
    
PrintToChatAll("%N has joined the game."client);

Just learned that from pvtschlag.
DieTeetasse is offline
dacomb
Senior Member
Join Date: Oct 2009
Old 12-03-2009 , 22:43   Re: [L4D2] Player Joined Notifier
Reply With Quote #16

Just tested this out tonight and it worked flawlessly with the bebop 20 player mod (although I only have 8 slots on my server)
nevertheless, Thanks!!
dacomb is offline
Zuko
SourceMod Donor
Join Date: Sep 2006
Location: Poland
Old 12-04-2009 , 03:11   Re: [L4D2] Player Joined Notifier
Reply With Quote #17

Code:
#include <topmenus>
#include <menus>
#include <timers>
it's not needed, also you could add translation support
__________________
Zuko is offline
Send a message via ICQ to Zuko
egor1908
Veteran Member
Join Date: Sep 2009
Old 12-04-2009 , 04:51   Re: [L4D2] Player Joined Notifier
Reply With Quote #18

Quote:
Originally Posted by Zuko View Post
it's not needed, also you could add translation support
Yes, translation support would be fine.


Quote:
Originally Posted by DieTeetasse View Post
PHP Code:
public OnClientConnected(client)
{
    
PrintToChatAll("%N has joined the game."client);

Thanks alot, i will try this out. If it doesnt work i will send you the code.
egor1908 is offline
yuenwf1216
New Member
Join Date: Dec 2009
Old 12-23-2009 , 09:53   Re: [L4D2] Player Joined Notifier
Reply With Quote #19

public OnClientConnected(client)
{
if(!IsFakeClient(client))
{
PrintToChatAll("%N has joined the game.",client)
}
}
Is this the same?
yuenwf1216 is offline
biguiep
New Member
Join Date: Jan 2010
Old 01-18-2010 , 11:11   Re: [L4D2] Player Joined Notifier
Reply With Quote #20

Thank you for that simple but efficient code !

But now, i'd like to have the message in top or bottom center of the screen, how can i do that ?

And can i add some color in the text ??

thank you.
biguiep 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 04:05.


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