[Plugin] [REL] FileManager 1.4 (24th of June 2012)
#81

Nice one JaTochNietDan. I will use it
Reply
#82

how about a function to get the file's size?
would be useful...
Reply
#83

wow 10/10 keep it up
Reply
#84

A Litle Question here. I tried to make a command today that reads from samp.ban

However i noticed something:

file_read does not read from every single line, like the normal system does.

Examples:

Код:
  while(file_read("samp.ban",str))
    {
        if(strfind(str,params) != -1)
        {
          print(str);
        }
    }
With the normal file system, you can do that and i will print every different result.

With your plugin, i tried this command like

!bans 127.0.0.1

and it showed a ban, but it was the same ban like 10 times.

:/
Reply
#85

Quote:
Originally Posted by PinkFloydLover
Посмотреть сообщение
Just a thought, would it be possible to view files and folders from the GTA San Andreas directory?


pawn Код:
public OnPlayerConnect(playerid)
{
if(file_exists("Rockstar Games/GTA San Andreas/hacks")) return Kick(playerid)
It would be the #1 anti-cheat
Breaking the rules of privacy. this is illegal !

http://en.wikipedia.org/wiki/Internet_privacy

/\ from Wikipйdia.

nice joob,

more fast of Dini Or Fini ?



i hate you!.
Reply
#86

EDIT: Forget it
Reply
#87

Do you work on a version that is not limited to the scriptfiles folder?
Reply
#88

Quote:
Originally Posted by asdfgh98
Посмотреть сообщение
Do you work on a version that is not limited to the scriptfiles folder?
It's already not limited to the scriptfiles folder!
Reply
#89

Lol but you wrote in the first post:
Can't you just write files with the stand API?
Yes, but it's limited to the "/scriptfiles/" part of your server installation. FileManager will allow you to write files from the root directory of your SA-MP server, so you can write it into filterscripts, gamemodes, etc...
Reply
#90

Quote:
Originally Posted by asdfgh98
Посмотреть сообщение
Lol but you wrote in the first post:
Can't you just write files with the stand API?
Yes, but it's limited to the "/scriptfiles/" part of your server installation. FileManager will allow you to write files from the root directory of your SA-MP server, so you can write it into filterscripts, gamemodes, etc...
'Can't you just write files with the standard API?'

That was in reference to the standard API, as in the SA-MP file functions...
Reply
#91

Oh shit, sry i did not read this ._.
Reply
#92

Is there a way to delete a directory and all of it's containments without first needing to delete tons of files one by one? ;(
Reply
#93

on windows yes
Reply
#94

How?
Reply
#95

Quote:

It should handle it like the filesystem of the Operating System would handle it.

Perhaps creating a md5 hash of both files and compare them ?
Quote:

It only crashed cause there was file_delete and the file didn't exist. Should build in a check or sth...

Just put this on top of your script:
Код:
#define file_delete(%1) if(file_exists(%1) { file_delete(%1); }
And @:
Quote:

i use file_move for moving Bot.rec's to a folder after recording.
Код:
StopRecordingPlayerData(playerid);
SendClientMessageEx(playerid,COLOR_RED2, "Stopped recording");
new movedir[50];
format(string, sizeof(string), "scriptfiles/%s.rec", recording[playerid]); // <= REC MISSING
// string was defined at top of OnPlayerCommandText
// recording[playerid] is the filename of Bot-Recording file
format(movedir, sizeof(movedir), "scriptfiles/Bot-Records/%s", recording[playerid]); // <= REC MISSING
file_move(string,movedir);
Reply
#96

ty nice plug but i got a problem with fire writing... i quiet don't undarstand it:
file_write("foldername/subfoldername/filename.cfg","PingKick", *What do i type here 'cos i get errors... and i didn't undarstood it from test fs *)
Reply
#97

Could I do this with this system?

pawn Код:
file_delete("gamemodes\filename.amx")
EDIT: It only works if I do this:

pawn Код:
file_delete("gamemodes/filename.amx");
Will this not work on Linux due to there needing to be a forward slash, instead of a backwards slash?
Reply
#98

Does the plugin support subfolders?
I want to create a directory within a directory, but when I perform the code the server shuts down because it can't create a file within the directory because the directory doesn't exists, and hasn't been created.

So, would this peace of code work?
pawn Код:
public createFolder(string[])
    {
        new dir[];
        format(dir, sizeof(dir), "folders/custom/%s",string);
        if(!dir_exists(dir))
        {
            dir_create(dir);
        }
        return 1;
    }
Reply
#99

Cool
Reply

is this a fastes thing with file,, for creating and reading?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)