21.01.2015, 08:13
hey there help me pls i have problem . when i type the command the dialogbox not open and the file didn't saved here's my code (the file like bannedplayers.txt is already exist)
thanks for the help
sorry for my bad english
Код:
CMD:test(playerid,parmas[]) { new Year, Month, Day; getdate(Year, Month, Day); printf("%02d/%02d/%d", Day, Month, Year); if(fexist(UserBanPath(playerid))) { INI_ParseFile(UserBanPath(playerid), "LoadBanUser_%s", .bExtra = true, .extra = playerid); { if(PlayerInfo[playerid][pBanPerm]==1)return SendClientMessage(playerid,-1,"{85BB65}You are Already banned in this date try tomorrow"); if(Month == 01 && Year == 2015 && Day == 22) { new tid,targetn[MAX_PLAYER_NAME]; GetPlayerName(tid,targetn,sizeof(targetn)); new INI:iFile = INI_Open(UserIPPath(tid)); INI_SetTag(iFile,"data"); INI_WriteInt(iFile,"BanPerm",1); INI_Close(iFile); new File:logg=fopen("BannedPlayers.txt",io_append); fwrite(logg, targetn); fwrite(logg,"\n"); fclose(logg); ShowPlayerDialog(playerid, DIALOG_WELCOME, DIALOG_STYLE_MSGBOX, "Notice", "You connected to the server", "Close", ""); } } } return 1; }
sorry for my bad english