09.07.2015, 18:42
Quote:
I tested it, and it works fine.
Although I can only recommend changing this part: pawn Код:
All so, make sure the name in the file and the player's name are case sensitive. Otherwise, you can change the 'strfind' line to this: pawn Код:
|
here is the full rework of the code tell me why its not working :
Код:
if(GetPVarInt(playerid, "Denied") == 1 && PlayerInfo[playerid][pPosted] == 1) { new playerName[24], Reason[128]; new str[128], pname[24]; GetPlayerName(playerid, pname, MAX_PLAYER_NAME); // The name of the player format(str, sizeof(str), "%s\r\n", pname); // format new File:handle = fopen("passed.ini", io_append); if(handle) { while(fread(handle, str)) { if(strcmp(string, pname, false, strlen(pname))==0) { fremoveline("passed.ini", str); } } fclose(handle); } format(string, sizeof(string), "users/%s.ini", PlayerName(playerid)); DOF2_RemoveFile(string); KickEx(playerid); }