14.11.2009, 00:15
I would use strfind instead of strcmp:
EDIT:
Just a little question: how does it seek through the file?
Does it store the whole string the first time?
Does it save the position it is up to? If I wanna return to the start of the file, how do I do it?
I understand the way sa-mp's original system works, but this one...
thx
Code:
IsNameBanned(name[]) { new string[256];//it's a file, might be long... while (file_read("samp.ban", string)) if (strfind(string, name, true) != -1) return 1; return 0; }
Just a little question: how does it seek through the file?
Does it store the whole string the first time?
Does it save the position it is up to? If I wanna return to the start of the file, how do I do it?
I understand the way sa-mp's original system works, but this one...
thx