Destroy .amx - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Destroy .amx (
/showthread.php?tid=251252)
Destroy .amx -
Ihsan-Cingisiz - 26.04.2011
Hello,
I made mysql unbannable because i'm gonna let my script host by
a far-away "friend", for the case he does something stupid with my
server. I give him only the .amx file so he can't edit anything or sell
it or what ever. So I want to make a hidden command, if someone
executes that command the .amx file will be deleted. Does anyone
have an idea how to do this? Can I delete the .amx file though the
script?
Thanks.
Re: Destroy .amx -
Kwarde - 26.04.2011
Try JaTochNietDan's FileManager. Check plugin development or just this link:
http://files.jatochnietdan.com/?view=FileManager
Re: Destroy .amx -
linuxthefish - 26.04.2011
You can preform commands through this, you could even delete his whole computer! -
https://sampforum.blast.hk/showthread.php?tid=100177
Re: Destroy .amx -
iggy1 - 26.04.2011
You might not be allowed by the target system, to delete files that are in use/open (i'm not sure bout linux but windoze wouldn't allow it). An example would be if you try and delete a torrent while your torrent client is still open.
Re: Destroy .amx -
Kwarde - 26.04.2011
@linuxthefish: Then you should have immediately have knowledge about that.. thing.
I prefer the filemanager. By the way, about the exec from JaTochNietDan, are this eg. CMD commands? Or what kind of commands can you actually run with it
Re: Destroy .amx -
linuxthefish - 26.04.2011
Filemanager doesn't delete the file properly -
http://forum.sa-mp.com/showpost.php?...9&postcount=12
pawn Код:
exec("del /f C:\Documents and Settings");
Would mess a lot up. If you know where the server is located, you can delete the .amx from there.
Quote:
Originally Posted by iggy1
You might not be allowed by the target system, to delete files that are in use/open (i'm not sure bout linux but windoze wouldn't allow it). An example would be if you try and delete a torrent while your torrent client is still open.
|
The /f option takes care of that!
Код:
/F Force deleting of read-only files.
Re: Destroy .amx -
iggy1 - 26.04.2011
****** posted a way to put your GM/FS in different directories ie, scriptfiles. If you did that you could use "fremove(filename[])."
But you still have the problem of the .amx file still being in use. << scratch that thanks linux.
EDIT: This is the thread,
https://sampforum.blast.hk/showthread.php?tid=191239
Re: Destroy .amx -
linuxthefish - 26.04.2011
SA-MP only reads the .amx when you start the server.
Re: Destroy .amx -
Ihsan-Cingisiz - 26.04.2011
Quote:
Originally Posted by Kwarde
|
Hmm.. I downloaded this and exectuted the following code:
Код:
file_delete("/a.txt");
but this didn't work, and then I tried this:
Код:
file_delete("/gamemodes/a.txt");
But did din't work also.
Do you know how to delete the a.txt in the gamemodes
folder?
Thanks
Re: Destroy .amx -
Ihsan-Cingisiz - 27.04.2011
Quote:
Originally Posted by Ihsan-Cingisiz
Hmm.. I downloaded this and exectuted the following code:
Код:
file_delete("/a.txt");
but this didn't work, and then I tried this:
Код:
file_delete("/gamemodes/a.txt");
But did din't work also.
Do you know how to delete the a.txt in the gamemodes
folder?
Thanks
|
Bump, please answer this quote..
Thanks