Help!!![Delete File][YINI]
#1

Is there a way to delete a file with Y_INI?I mean I've read the tutorial,but I only saw functions like Load,Parse,Create,etc. but not Delete!?
Reply
#2

ALex,I want to delete a file wich contains infos related to a player's house,when the player sets the house for sell,and some1 else buys it,then the file it should destroy as the previous player doesn't own a house anymore :P
Reply
#3

So, you saved the house info into PlayerName.ini?

If that's the case, do something like:
pawn Код:
new pName[MAX_PLAYER_NAME], str[50];
GetPlayerName(playerid, pName, sizeof pName);
format(str, sizeof str, "%s.ini", pName);
fremove(str);

// Of course, this is just an example. If you saved the info into "House" folder, you'd have to format the str otherway:
format(str, sizeof str, "/Houses/%s.ini", pName);
fremove(str)
Hope that helped you get an idea of how to do it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)