26.07.2013, 09:25
Hello. I've made a Player Kill FS, what it does that if a player is killed in a roleplay, he gets kicked and his name is saved in the log. Now, OnPlayerConnect(), if the player comes with a name which is killed, it must kick him, but it doesn't work. It saves the name in the log, but it doesn't kick if someone comes with the name which is killed [the name in the log]. What to do?
CODE:
CODE:
pawn Код:
public OnPlayerConnect(playerid)
{
new Gpd[MAX_PLAYER_NAME];
GetPlayerName(playerid, Gpd, sizeof Gpd);
fopen("PK_list.txt", io_read);
if(fexist("PK_list.txt"))
{
fread(PK_Log, Gpd, sizeof Gpd);
if(strcmp(Gpd,Gpd,true))
{
Kick(playerid);
}
}
return 1;
}