Raised This Month: $ Target: $400
 0% 

[ANY] MuteCheck


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Dr. McKay
Sir Dr. SourceMod Plugin Approver Esq. Ltd. M.D. PhD
Join Date: Aug 2011
Location: Atlantis
Old 08-23-2011 , 17:44   Re: [ANY] MuteCheck
Reply With Quote #11

Quote:
Originally Posted by Peace-Maker View Post
Nice idea. Some notes:
The boolean tag is lowercase in sourcepawn. "bool:" instead of "Bool:".
When using #tryinclude, make sure to mark the autoupdate natives as optional in askpluginload2 to have the plugin compile if the include fails.

PHP Code:
if(StrEqual(buffer"@all") || StrEqual(buffer"@red") || StrEqual(buffer"@blue") || StrEqual(buffer"@alive") || StrEqual(buffer"@dead") || StrEqual(buffer"@humans") || StrEqual(buffer"@bots") || StrEqual(buffer"@ct") || StrEqual(buffer"@t")) {
    
ReplyToCommand(client"[SM] Usage: sm_mutecheck [target]");
    return 
Plugin_Handled;

You don't want those group targeting features?
Consider using FindTarget to allow a single target only.

For performance reasons, don't declare new variables in a loop, but do it beforehand.
Thanks for the help! As you can probably tell, I'm just learning SourcePawn.

I've updated it with the stuff you said.
__________________
Dr. McKay is offline
 



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 21:23.


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