Author
|
Message
|
Veteran Member
Join Date: Jul 2006
Location: I|O wa
|
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.
|
|
|
|