Destroy .amx
#1

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.
Reply
#2

Try JaTochNietDan's FileManager. Check plugin development or just this link: http://files.jatochnietdan.com/?view=FileManager
Reply
#3

You can preform commands through this, you could even delete his whole computer! - https://sampforum.blast.hk/showthread.php?tid=100177
Reply
#4

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.
Reply
#5

@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
Reply
#6

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.
Reply
#7

****** 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
Reply
#8

SA-MP only reads the .amx when you start the server.
Reply
#9

Quote:
Originally Posted by Kwarde
Посмотреть сообщение
Try JaTochNietDan's FileManager. Check plugin development or just this link: http://files.jatochnietdan.com/?view=FileManager
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
Reply
#10

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)