23.05.2011, 04:49
Nice one JaTochNietDan. I will use it
while(file_read("samp.ban",str)) { if(strfind(str,params) != -1) { print(str); } }
Just a thought, would it be possible to view files and folders from the GTA San Andreas directory?
pawn Код:
|
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... |
It should handle it like the filesystem of the Operating System would handle it. |
It only crashed cause there was file_delete and the file didn't exist. Should build in a check or sth... |
#define file_delete(%1) if(file_exists(%1) { file_delete(%1); }
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); |
file_delete("gamemodes\filename.amx")
file_delete("gamemodes/filename.amx");
public createFolder(string[])
{
new dir[];
format(dir, sizeof(dir), "folders/custom/%s",string);
if(!dir_exists(dir))
{
dir_create(dir);
}
return 1;
}