Raised This Month: $ Target: $400
 0% 

deleting file


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
hyphen
Senior Member
Join Date: Aug 2011
Old 06-22-2012 , 13:17   deleting file
Reply With Quote #1

Want to clear all banned file ie: listip.cfg & banned.cfg by one admin command. Tried with following code but didn't work.

PHP Code:
if(!cmd_access(idlevelcid1))
    return 
PLUGIN_HANDLED

new file fopen("listip.cfg""wt")
if(
file)
{
    
fwrite_blocks (file""1BLOCK_CHAR)
}
fclose(file
hyphen is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 06-22-2012 , 13:41   Re: deleting file
Reply With Quote #2

Just delete the file. It should be re-created. If not, simply delete + recreate it yourself.
__________________
Arkshine is offline
hyphen
Senior Member
Join Date: Aug 2011
Old 06-22-2012 , 15:04   Re: deleting file
Reply With Quote #3

Oh LOL. I just removed register_concmd() line from plugin_init(), so delete_file() didn't work.
hyphen 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 06:19.


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