i have an ini file { minus the stars u know why there in there ) like so
Code:
#include <amxmodx>
#include <amxmisc>
#include <file>
#include <cstrike>
new Sarray[3][300]
new inifile[101]
new arg[192]
new readdata[401] // the data on the line it is reading
new linelength = 0 // how long the line is
new currline=0
stock explode( output[][], input[], delimiter, textlen, maxMatches )
{
new nIdx = 0
new nLen = (1 + copyc( output[nIdx], textlen, input, delimiter ))
new len = strlen(input)
while( nLen < len && nIdx < maxMatches )
nLen += (1 + copyc( output[++nIdx], textlen, input[nLen], delimiter ))
return nIdx + 1
}
public plugin_init() {
register_plugin("Speak English", "0.1a", "[DumB]SteamSucks")
register_clcmd("say", "cmd_say")
register_clcmd("say_team", "cmd_sayteam")
inifile ="words.txt"
}
public cmd_say(id)
{
new szFile[100]
get_configsdir( szFile , 99 )
format(szFile , 99 , "%s/%s", szFile, inifile)
read_args(arg, 191)
remove_quotes(arg) // Say Message are encase in Quotes
while(read_file(szFile,currline,readdata,400,linelength) != 0){ //checks every line in inifile, stores what it finds in readdata, and what line its on in currline
explode(Sarray,readdata,'|',linelength,3)
server_print("Badwords so far are: %s | %s | %s",Sarray[0],Sarray[1],Sarray[2])
server_print("words said are: %s",arg)
if( !containi(arg,Sarray[2]) || !containi(arg,Sarray[1]) || !containi(arg,Sarray[2])) {
currline = 0
return PLUGIN_CONTINUE
} else {
client_print(id, print_chat, "Speak english only on this server please!!!")
server_cmd("kick %d Speak english",id)
client_cmd(id , "disconnect")
return PLUGIN_HANDLED
}
currline++ //goes to the next line
}
currline = 0
return PLUGIN_HANDLED
when i say hi there in game in say it kicks me and i get this from console debug
none of the words i said where contained in any of the sarry items so why has it matched them any ideas any one ?