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

Leave Messages 1.4


Post New Thread Reply   
 
Thread Tools Display Modes
Jon
Veteran Member
Join Date: Dec 2007
Old 07-22-2009 , 17:31   Re: Custom Leave Messages by Jon
Reply With Quote #11

Quote:
Originally Posted by ConnorMcLeod View Post
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.
Jon is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 07-23-2009 , 05:14   Re: Custom Leave Messages by Jon
Reply With Quote #12

Quote:
Originally Posted by Jon View Post
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.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Jon
Veteran Member
Join Date: Dec 2007
Old 07-23-2009 , 07:36   Re: Custom Leave Messages by Jon
Reply With Quote #13

Quote:
Originally Posted by ConnorMcLeod View Post
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.
Jon is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 07-23-2009 , 08:27   Re: Custom Leave Messages by Jon
Reply With Quote #14

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.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Jon
Veteran Member
Join Date: Dec 2007
Old 07-23-2009 , 08:54   Re: Custom Leave Messages by Jon
Reply With Quote #15

Quote:
Originally Posted by ConnorMcLeod View Post
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.
Jon is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 07-23-2009 , 09:30   Re: Custom Leave Messages by Jon
Reply With Quote #16

Now you could add the ML, Jon.
__________________
Arkshine is offline
Jon
Veteran Member
Join Date: Dec 2007
Old 07-23-2009 , 11:37   Re: Custom Leave Messages by Jon
Reply With Quote #17

Quote:
Originally Posted by Arkshine View Post
Now you could add the ML, Jon.
Will do.
Jon is offline
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 08-14-2009 , 16:05   Re: Custom Leave Messages by Jon
Reply With Quote #18

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.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
Jon
Veteran Member
Join Date: Dec 2007
Old 08-14-2009 , 16:33   Re: Custom Leave Messages by Jon
Reply With Quote #19

Quote:
Originally Posted by Hawk552 View Post
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.
Jon is offline
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 08-14-2009 , 18:38   Re: Custom Leave Messages by Jon
Reply With Quote #20

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.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
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 04:08.


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