01.02.2013, 19:08
You aren't getting the person's ban information yet - you need to open the person's character file and assign something to PInfo[playerid][Banned] before you check it to see if they're banned or not.
I'll let you figure out the rest.
Код:
new filename[64], name[24];
GetPlayerName(playerid, name, sizeof(name));
format(filename, sizeof(fiilename), "/scriptfiles/players/%s.txt", name);
if(fexist(filename)) {
new lines_read = 0;
new File:f = fopen(filename, io_read); //open file
while(fread(f, line)) //read from file {
switch(lines_read) {
case 0: //This is the first line in the file, change it to whatever the line number the ban number is on. {
PInfo[playerid][Banned] =
}
}
}
fclose(f);
}
if(PInfo[playerid][Banned] == 1){
SendClientMessage(playerid, 0xFF444499, "You are banned from this server if this is a mistake appeal at our forums");
Kick(playerid);
}

