Ok well i was wondering how i could like filter some text from one sentence like they did in amx. I saw that they used containi but it looks like sourcemod doesn't support that so i need to kinda find a replacement for it.
Anyone know what i can use instead?
amx code
Code:
if ( (containi(Speech, "ip") != -1) && ((containi(Speech, "serv") != -1) || (containi(Speech, "addr") != -1)) )
{
bla bla print info of server
}
I allready tryed
Code:
public Action:Command_OnSay(client, args)
{
decl String:text[192];
GetCmdArgString(text, sizeof(text));
new startidx;
if (text[strlen(text)-1] == '"')
{
text[strlen(text)-1] = '\0';
startidx = 1;
}
if ( strcmp(text[startidx], "ip", false) == 0 && strcmp(text[startidx], "serv", false) == 0 )
{
SendMsg_TextMsg(client,HUD_PRINTTALK, "<Server Auto-Response> Server IP: 127.0.0.1:27015");
}
}
But doesn't realy work because it needs to be exact that word and only that word in the sentence...
Thanks in advance