SA-MP Forums Archive
Deleting files from scriptfiles - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Deleting files from scriptfiles (/showthread.php?tid=530902)



Deleting files from scriptfiles - jackx3rx - 09.08.2014

I'm making a house system which saves in scriptfiles/houses.

I've made a createhouse command, but now I want to make a deletehouse command, but how do I delete the file from scriptfiles/houses?

Example: /deletehouse 14

It should delete scriptfiles/houses/14


Re: Deleting files from scriptfiles - Don_Cage - 09.08.2014

Define in strtok or sscanf id house you wish to delete, define destroy of label and pickup simple as that...

And then
define string,
format(string, sizeof(string), YourHouses, houseid);
fremove(string);


Re: Deleting files from scriptfiles - jackx3rx - 09.08.2014

I'm still confused, how would that delete the file which holds all the info?


Re: Deleting files from scriptfiles - Don_Cage - 09.08.2014

fremove will actualy remove the file of house id with all the data