@ symbol moved to a #define. say_team now checks if in a chat trigger.
--HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401522
This commit is contained in:
		
							parent
							
								
									ff280d6886
								
							
						
					
					
						commit
						af12ff000b
					
				@ -44,6 +44,8 @@ public Plugin:myinfo =
 | 
				
			|||||||
	url = "http://www.sourcemod.net/"
 | 
						url = "http://www.sourcemod.net/"
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#define CHAT_SYMBOL '@'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
new String:g_ColorNames[13][10] = {"White", "Red", "Green", "Blue", "Yellow", "Purple", "Cyan", "Orange", "Pink", "Olive", "Lime", "Violet", "Lightblue"};
 | 
					new String:g_ColorNames[13][10] = {"White", "Red", "Green", "Blue", "Yellow", "Purple", "Cyan", "Orange", "Pink", "Olive", "Lime", "Violet", "Lightblue"};
 | 
				
			||||||
new g_Colors[13][3] = {{255,255,255},{255,0,0},{0,255,0},{0,0,255},{255,255,0},{255,0,255},{0,255,255},{255,128,0},{255,0,128},{128,255,0},{0,255,128},{128,0,255},{0,128,255}};
 | 
					new g_Colors[13][3] = {{255,255,255},{255,0,0},{0,255,0},{0,0,255},{255,255,0},{255,0,255},{0,255,255},{255,128,0},{255,0,128},{128,255,0},{0,255,128},{128,0,255},{0,128,255}};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -93,16 +95,16 @@ public Action:Command_SayChat(client, args)
 | 
				
			|||||||
		startidx = 1;
 | 
							startidx = 1;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	
 | 
						
 | 
				
			||||||
	if (text[startidx] != '@')
 | 
						if (text[startidx] != CHAT_SYMBOL)
 | 
				
			||||||
		return Plugin_Continue;
 | 
							return Plugin_Continue;
 | 
				
			||||||
	
 | 
						
 | 
				
			||||||
	new msgStart = 1;
 | 
						new msgStart = 1;
 | 
				
			||||||
	
 | 
						
 | 
				
			||||||
	if (text[startidx+1] == '@')
 | 
						if (text[startidx+1] == CHAT_SYMBOL)
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		msgStart = 2;
 | 
							msgStart = 2;
 | 
				
			||||||
		
 | 
							
 | 
				
			||||||
		if (text[startidx+2] == '@')
 | 
							if (text[startidx+2] == CHAT_SYMBOL)
 | 
				
			||||||
			msgStart = 3;
 | 
								msgStart = 3;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	
 | 
						
 | 
				
			||||||
@ -162,7 +164,7 @@ public Action:Command_SayAdmin(client, args)
 | 
				
			|||||||
	}
 | 
						}
 | 
				
			||||||
	
 | 
						
 | 
				
			||||||
	decl String:text[192];
 | 
						decl String:text[192];
 | 
				
			||||||
	if (GetCmdArgString(text, sizeof(text)) < 1)
 | 
						if (IsChatTrigger() || GetCmdArgString(text, sizeof(text)) < 1)
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		return Plugin_Continue;
 | 
							return Plugin_Continue;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
@ -174,7 +176,7 @@ public Action:Command_SayAdmin(client, args)
 | 
				
			|||||||
		startidx = 1;
 | 
							startidx = 1;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	
 | 
						
 | 
				
			||||||
	if (text[startidx] != '@')
 | 
						if (text[startidx] != CHAT_SYMBOL)
 | 
				
			||||||
		return Plugin_Continue;
 | 
							return Plugin_Continue;
 | 
				
			||||||
	
 | 
						
 | 
				
			||||||
	decl String:message[192];
 | 
						decl String:message[192];
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user