11.03.2014, 19:52
(
Последний раз редактировалось Semo; 11.03.2014 в 20:50.
)
Solved, thanks
new p_IP[ 16 ];
GetPlayerIp(playerid, p_IP, 16 );
new File:gFile2 = fopen("BanIP.txt", io_read);
if(gFile2)
{
new string[50];
while(fread(gFile2, string))
{
printf("%s %s",string,p_IP);// and look at the server log
if(strcmp(string, p_IP, true) == 0)
{
SendClientMessage(playerid, COLOR_RED, "TEST");
}
}
fclose(gFile2);
}
|
Код:
new p_IP[ 16 ];
GetPlayerIp(playerid, p_IP, 16 );
new File:gFile2 = fopen("BanIP.txt", io_read);
if(gFile2)
{
new string[50];
while(fread(gFile2, string))
{
printf("%s %s",string,p_IP);// and look at the server log
if(strcmp(string, p_IP, true) == 0)
{
SendClientMessage(playerid, COLOR_RED, "TEST");
}
}
fclose(gFile2);
}
|
if(strfind(string, p_IP, true) != -1)
|
Or you can try this:
pawn Код:
86.99.185.53 86.99.185.53//this form or 86.99.185.53 86.99.185.53 //this form? if the first one than you have space in string or something like "\n" |