14.11.2009, 17:30
Quote:
|
Originally Posted by S!m
I would use strfind instead of strcmp:
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 |
So while is not required for this particular function.
I might add a function to store per a splitter character of your choice.

