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

[REQ] adminchat / amx_tsay suggestion


  
 
 
Thread Tools Display Modes
Author Message
Vet
Veteran Member
Join Date: Jul 2006
Location: I|O wa
Old 10-10-2006 , 21:58   [REQ] adminchat / amx_tsay suggestion
#1

This is more of a convenience improvement than anything. And I can't see where it would hurt anything.

I suggest reducing the 'num' parameter in the access check routine from 3 to 2.
Code:
if (!cmd_access(id, level, cid, 3))
return PLUGIN_HANDLED
Reason: Since the t/csay colors will default to 'white' if none is specified, there's really no need to check for 3 parameters in the access routine. So if you enter amx_tsay Hi There, you'll get 'Hi there' in white. So far so good.

BUT, if you only enter amx_tsay Hi, the routine will error out because there aren't enough parameters. If the parameter was dropped to 2, you could type single word t/csay messages in default the white color. Of course you could still enter a color option if desired.

Another reason I reduced the parameter and recompiled the routine for our server is because I bind a key to 'messagemode amx_tsay'. Then all I have to do is hit a key and enter whatever I want to tsay. When doing this, the standard routine errors out because the message is sent as a single string in quotes. Thus being treated as a single parameter. But reducing the parameter to 2 allows it work.

Last edited by Vet; 10-10-2006 at 22:01.
Vet is offline
Send a message via MSN to Vet
 



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 01:05.


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