24.02.2013, 14:20
Reread your code step by step. Look what do you see. Now do it again. And again. And one more time to be sure. Now you know that loop is fired up once. But why doesn't it work further?
What does fclose do? What does return do? You should know that by now.
Have fun
pawn Код:
while(fread(example, string2212))
{
if(!strcmp(playerip, string2212, true, 16)) {
format(str123,sizeof(str123),"{00FF40}Your IP has been banned from this server\nOutput: %s\n{FF8000}To request a unban, visit http://www.gta-zombies.net and take a screen shot of this!",string2212);
ShowPlayerDialog(playerid,9781,DIALOG_STYLE_MSGBOX,"{FF0000}You're banned from this server.",str123,"Okay","");
SetTimerEx("KickPlayer",1000,0,"i",playerid);
}
fclose(example); //This line
return 0; //This line
}
pawn Код:
while(fread(example, string2212))
{
if(!strcmp(playerip, string2212, true, 16)) {
format(str123,sizeof(str123),"{00FF40}Your IP has been banned from this server\nOutput: %s\n{FF8000}To request a unban, visit http://www.gta-zombies.net and take a screen shot of this!",string2212);
ShowPlayerDialog(playerid,9781,DIALOG_STYLE_MSGBOX,"{FF0000}You're banned from this server.",str123,"Okay","");
SetTimerEx("KickPlayer",1000,0,"i",playerid);
break;
}
}
fclose(example);
return 0;