Raised This Month: $95 Target: $400
 23% 

Leave Messages 1.4


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Event Related        Approver:   Hawk552 (427)
Jon
Veteran Member
Join Date: Dec 2007
Old 07-22-2009 , 13:48   Leave Messages 1.4
Reply With Quote #1

Leave Messages


Description

This plugin allows players to set a leave message (with a say commmand) that will be printed to all players when they leave the server. The message is stored by vaults so you don't have to set the message each time you connect. Plugin features can also be set to admin only.

[IMG]http://img525.**************/img525/3568/51996331.png[/IMG]


Cvars (with default values)

lm_adminonly 0 - If set, only admins can use the features of this plugin


Commands

/leavemsg <message> - Sets leave message

/leavemsg remove - Removes your current leave message

.
Attached Files
File Type: sma Get Plugin or Get Source (leave_messages.sma - 1759 views - 2.5 KB)

Last edited by Jon; 11-09-2009 at 15:43.
Jon is offline
DaKo
Junior Member
Join Date: May 2008
Location: Romania, Hunedoara
Old 07-22-2009 , 13:52   Re: Leave Messages by Jon
Reply With Quote #2

Good job Jon.
My sentence is so cool. =)
DaKo is offline
Send a message via MSN to DaKo Send a message via Yahoo to DaKo
meTaLiCroSS
Gaze Upon My Hat
Join Date: Feb 2009
Location: Viņa del Mar, Chile
Old 07-22-2009 , 14:19   Re: Custom Leave Messages by Jon
Reply With Quote #3

Nice dude, i will use it

gj
__________________
Quote:
Originally Posted by joropito View Post
You're right Metalicross
meTaLiCroSS is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 07-22-2009 , 15:27   Re: Custom Leave Messages by Jon
Reply With Quote #4

Nice plugin. Simple, but nice.

Any reason you use fvault and not nvault ?
__________________
- tired and retired -
ConnorMcLeod is offline
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 07-22-2009 , 15:32   Re: Custom Leave Messages by Jon
Reply With Quote #5

Quote:
Originally Posted by ConnorMcLeod View Post
Nice plugin. Simple, but nice.

Any reason you use fvault and not nvault ?
fvault is more sexy
__________________
xPaw is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 07-22-2009 , 15:37   Re: Custom Leave Messages by Jon
Reply With Quote #6

Quote:
Originally Posted by xPaw View Post
fvault is more sexy
When you only use Xvault_get and Xvault_set, nvault is by far more efficient.
__________________
- tired and retired -
ConnorMcLeod is offline
Jon
Veteran Member
Join Date: Dec 2007
Old 07-22-2009 , 15:37   Re: Custom Leave Messages by Jon
Reply With Quote #7

Quote:
Originally Posted by ConnorMcLeod View Post
Nice plugin. Simple, but nice.

Any reason you use fvault and not nvault ?
The first time I ever used vaults was with fvault and I've used it ever since. I could convert to nvault to avoid custom includes, but don't you have to open the vault each time you use save?
Jon is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 07-22-2009 , 15:40   Re: Custom Leave Messages by Jon
Reply With Quote #8

Quote:
Originally Posted by Jon View Post
The first time I ever used vaults was with fvault and I've used it ever since. I could convert to nvault to avoid custom includes, but don't you have to open the vault each time you use save?
Your custom include also open the file each time (+ lot of stuff).
Anyway, you can open the vaut at plugin_init, and close it at plugin_end.

Another improvement you can do is send a MSG_BORADCAST msg instead of loop through all players.
__________________
- tired and retired -
ConnorMcLeod is offline
Jon
Veteran Member
Join Date: Dec 2007
Old 07-22-2009 , 15:51   Re: Custom Leave Messages by Jon
Reply With Quote #9

Updated to avoid custom includes, I'll fix the msg_broadcast soon. Thanks for suggestions.

Edit:

Done. Hope this is what you meant:

PHP Code:
message_begin(id MSG_ONE MSG_BROADCAST g_MsgSayText_id);
write_byte(id);
write_string(szMsg);
message_end(); 
Also fixed a bug with empty vaultkeys that could cause servercrash

Last edited by Jon; 07-22-2009 at 16:46.
Jon is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 07-22-2009 , 18:26   Re: Custom Leave Messages by Jon
Reply With Quote #10

Quote:
Originally Posted by Jon View Post
Done. Hope this is what you meant
Exactly
__________________
- tired and retired -
ConnorMcLeod is offline
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 02:00.


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