Raised This Month: $12 Target: $400
 3% 

[STOCK] File copy/cut


Post New Thread Reply   
 
Thread Tools Display Modes
ot_207
Veteran Member
Join Date: Jan 2008
Location: Romania The Love Country
Old 06-22-2010 , 10:58   Re: [STOCK] File copy/cut
Reply With Quote #11

Quote:
Originally Posted by Arkshine View Post
Ok. Though the tutorial is not about how to determine the size and it should use the existing native for the simplicity. Just my opinion, don't kill me. ^^

By the way, you should open fp_write after the check or adding fclose() into, because if fp_read is null, fp_write won't be closed.
Correct! I won't kill you, I like when people show me optimizations!

Quote:
Originally Posted by joropito View Post
This is very useful. Another flag to avoid destination deletion will be nice.

I suggest to use this only at plugin_precache / init / cfg but not in-game because is a blocking function and with big files may cause problems.
Yeah, added that to the first post.
__________________
My approved plug-ins | Good for newbies! | Problems?

Back, will come around when I have time.
ot_207 is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 06-22-2010 , 11:11   Re: [STOCK] File copy/cut
Reply With Quote #12

Quote:
Originally Posted by ot_207 View Post
Correct! I won't kill you, I like when people show me optimizations! .
Sorry to be stubborn but that's not about optimization, it's a tutorial, therefore you should make simple when you can. But do what you want, it was just a suggestion. :p
__________________

Last edited by Arkshine; 06-22-2010 at 11:13.
Arkshine is offline
ot_207
Veteran Member
Join Date: Jan 2008
Location: Romania The Love Country
Old 06-22-2010 , 11:13   Re: [STOCK] File copy/cut
Reply With Quote #13

Quote:
Originally Posted by Arkshine View Post
Sorry to be stubborn but that's not about optimization, it's a tutorial, therefore you should make simple when you can.
You are not stubborn just objective. Done that filesize thing.
__________________
My approved plug-ins | Good for newbies! | Problems?

Back, will come around when I have time.
ot_207 is offline
Emp`
AMX Mod X Plugin Approver
Join Date: Aug 2005
Location: Decapod 10
Old 06-22-2010 , 13:21   Re: [STOCK] File copy/cut
Reply With Quote #14

You might want to just have this about file copying because the native rename_file is the same as cutting.
Emp` is offline
Send a message via AIM to Emp` Send a message via MSN to Emp` Send a message via Yahoo to Emp` Send a message via Skype™ to Emp`
AntiBots
Veteran Member
Join Date: May 2008
Location: Brazil
Old 06-23-2010 , 20:30   Re: [STOCK] File copy/cut
Reply With Quote #15

Just a little tip for performance, in the if where you use if( (file exist) && bitscheck )
First check the bits an then call the funcion --> if( bitscheck && (file exist) )

PD: I don't check all the code.
__________________
AntiBots is offline
Send a message via ICQ to AntiBots Send a message via MSN to AntiBots Send a message via Skype™ to AntiBots
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 06-24-2010 , 05:56   Re: [STOCK] File copy/cut
Reply With Quote #16

That's not something it will execute a looooot of times, it really doesn't matter, extremely trivial. ^^
__________________
Arkshine is offline
AntiBots
Veteran Member
Join Date: May 2008
Location: Brazil
Old 06-24-2010 , 20:52   Re: [STOCK] File copy/cut
Reply With Quote #17

Quote:
Originally Posted by Arkshine View Post
That's not something it will execute a looooot of times, it really doesn't matter, extremely trivial. ^^
Yes now, but months ago, all most spoke about optimization
__________________
AntiBots is offline
Send a message via ICQ to AntiBots Send a message via MSN to AntiBots Send a message via Skype™ to AntiBots
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 06-25-2010 , 06:57   Re: [STOCK] File copy/cut
Reply With Quote #18

Quote:
Originally Posted by AntiBots View Post
Yes now, but months ago, all most spoke about optimization
But not at that level anyway 0.o
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 17:59.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode