strfind problems
#1

I've just started using strfind for some functions which I'am trying to do.
When I ban someone it saves there IP in a file but when they connect it's "mean't" to say "Your banned....." but for some reason it's not reading the file and finding the ip. Summery, it's not finding the line of the match IPs.
pawn Код:
new File:BannedIPs;
    if ((BannedIPs = fopen( "BannedIPs.txt", ( fexist("BannedIPs.txt") ? io_append : io_read ) ))) {
        new aname3[MAX_PLAYER_NAME];
            GetPlayerName(playerid,aname3,MAX_PLAYER_NAME);
        if(strfind(pInfo[playerid][pIP],playerip, false)) {
Thanks in advance.
Reply
#2

try
pawn Код:
if(strfind(string, string) != 1)
to detect if they match
Reply
#3

Never worked.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)