AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Approved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=8)
-   -   Leave Messages 1.4 (https://forums.alliedmods.net/showthread.php?t=98081)

Jon 07-22-2009 17:31

Re: Custom Leave Messages by Jon
 
Quote:

Originally Posted by ConnorMcLeod (Post 879076)
Exactly :)

Yeah, but I found out that I have to do find a random sender ID when im sending to everyone, else the color won't work.

ConnorMcLeod 07-23-2009 05:14

Re: Custom Leave Messages by Jon
 
Quote:

Originally Posted by Jon (Post 879084)
Yeah, but I found out that I have to do find a random sender ID when im sending to everyone, else the color won't work.

Try to pass as extra character the id of the disconnecting player.

Jon 07-23-2009 07:36

Re: Custom Leave Messages by Jon
 
Quote:

Originally Posted by ConnorMcLeod (Post 879489)
Try to pass as extra character the id of the disconnecting player.

Yeah thought about that too, but that would give me an extra parameter in the function and I would have to pass the id twice in all other cases but that one.

ConnorMcLeod 07-23-2009 08:27

Re: Custom Leave Messages by Jon
 
Just found that you don't need to pass a connected player id, so you can hardcode it to a number between 1 and maxplayer, even send a teaminfo of a not connected player works to print team color.

Tests made on a listenserver, so you need to check again on a dedicated server.

Jon 07-23-2009 08:54

Re: Custom Leave Messages by Jon
 
Quote:

Originally Posted by ConnorMcLeod (Post 879584)
Just found that you don't need to pass a connected player id, so you can hardcode it to a number between 1 and maxplayer, even send a teaminfo of a not connected player works to print team color.

Tests made on a listenserver, so you need to check again on a dedicated server.

Yeah, your right. Tested it on a dedicated, nice work. :)

Arkshine 07-23-2009 09:30

Re: Custom Leave Messages by Jon
 
Now you could add the ML, Jon.

Jon 07-23-2009 11:37

Re: Custom Leave Messages by Jon
 
Quote:

Originally Posted by Arkshine (Post 879606)
Now you could add the ML, Jon.

Will do.

Hawk552 08-14-2009 16:05

Re: Custom Leave Messages by Jon
 
This plugin is well done.

If you would like any information regarding possible adjustments you could make or things you could do to make this better, please feel free to post here or PM me.

Approved.

Jon 08-14-2009 16:33

Re: Custom Leave Messages by Jon
 
Quote:

Originally Posted by Hawk552 (Post 900052)
This plugin is well done.

If you would like any information regarding possible adjustments you could make or things you could do to make this better, please feel free to post here or PM me.

Approved.

Thanks. This is a rather small plugin, but if there's anything I could do to improve it tell me.

Hawk552 08-14-2009 18:38

Re: Custom Leave Messages by Jon
 
PHP Code:

if( strlen(g_Message[id]) ) 

It would be better to just check whether or not the first character is null.

PHP Code:

vformat(szMsg[len], 191 lenszText3); 

This should be 190.

PHP Code:

message_begin(id MSG_ONE MSG_BROADCASTg_MsgSayText_id); 

This should be either:

PHP Code:

message_begin(id MSG_ONE_UNRELIABLE MSG_BROADCASTg_MsgSayText_id); 

... or ...

PHP Code:

message_begin(id MSG_ONE MSG_ALLg_MsgSayText_id); 

The former is preferable.


All times are GMT -4. The time now is 19:09.

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