Raised This Month: $ Target: $400
 0% 

Optimizing


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Storas1337
Senior Member
Join Date: Apr 2009
Location: Lithuania
Old 05-25-2014 , 14:40   Optimizing
Reply With Quote #1

Hey guys anybody can give me an example how to optimize these part of code (with switch statement)

Code:
else if(equali(arg_cmd, "slay")) 
	{ 
		if(!(get_user_flags(id) & ADMIN_SLAY)) 
		{ 
			ColorChat(id, NORMAL, "^4Only ADMINS can use the command!^4", Prefix) 
			return 
		} 
		
		if(equali(arg2, "")) 
		{ 
			ColorChat(id, NORMAL, "^4You should enter some name!^4", Prefix) 
			return 
		} 
		
		if(!target) 
		{ 
			ColorChat(id, NORMAL, "^4There is not a player wit this name!^4", Prefix, arg2) 
			return 
		} 
		
		client_cmd(id, "amx_slay ^"%s^"", arg2) 
	}
Storas1337 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 15:32.


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