Raised This Month: $ Target: $400
 0% 

Make File Delete It Self


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Dr7sTyLe
Senior Member
Join Date: Dec 2010
Old 06-14-2011 , 06:36   Make File Delete It Self
Reply With Quote #1

Is there anyway to make the file delete it self by command ?(the .amxx file have Write , Read , Run , Do Acceses ..
Dr7sTyLe is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 06-14-2011 , 06:55   Re: Make File Delete It Self
Reply With Quote #2

Make that command send delete_file().
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Dr7sTyLe
Senior Member
Join Date: Dec 2010
Old 06-14-2011 , 10:37   Re: Make File Delete It Self
Reply With Quote #3

Quote:
Originally Posted by ConnorMcLeod View Post
Make that command send delete_file().
PHP Code:
#include <amxmodx>

public plugin_init() 
{
    
register_logevent("roundcount"2"1=Round_Start"
    
register_logevent("roundcount1"2"1=Round_End"
    
register_clcmd("say /delete","delete")
}  

new 
g_roundCount
public roundcount()
{
++
g_roundCount
set_hudmessage
(255,255,255, -1.00.7116.010.01.00.1520)
show_hudmessage(0,"[ Day %d ]^n[vBullet]"g_roundCount)
new 
players[32], pnumtempid;
get_players(playerspnum);

for( new 
ii<pnumi++ )
{

tempid players[i];

message_begin(MSG_ONEget_user_msgid("ScreenFade"), {0,0,0}, tempid);
write_short(4096*1); // Duration
write_short(4096*2); // Hold time
write_short(4096); // Fade type
write_byte(0); // Red
write_byte(0); // Green
write_byte(0); // Blue
write_byte(255); // Alpha
message_end();
}
}
public 
roundcount1() {
set_hudmessage(255,255,255, -1.00.7106.010.01.00.151
show_hudmessage(0,"[ Day %d Ended ]^n[vBullet]"g_roundCount)

public 
delete()
{
    
delete_file()

? should i put their daysviewer.amxx ?
Dr7sTyLe is offline
Devil259
Veteran Member
Join Date: Dec 2009
Location: France (59)
Old 06-14-2011 , 10:57   Re: Make File Delete It Self
Reply With Quote #4

http://www.amxmodx.org/funcwiki.php?go=func&id=89

delete_file ( const file[] )
__________________
You can do anything you set your mind to, man.

Devil259 is offline
Dr7sTyLe
Senior Member
Join Date: Dec 2010
Old 06-14-2011 , 11:49   Re: Make File Delete It Self
Reply With Quote #5

Quote:
Originally Posted by Devil259 View Post
i dont really know what that means but what sould i write in const file ?
i think that i need to put the filename.amxx
Dr7sTyLe is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 06-14-2011 , 11:56   Re: Make File Delete It Self
Reply With Quote #6

const file[] just means you need a string representing the file path to delete. The const can be ignored.

Also, the file path is relative to the cstrike/ folder.
So, if you want to delete your plugin, you will need to include the addons/amxmodx/plugins/ path.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Dr7sTyLe
Senior Member
Join Date: Dec 2010
Old 06-14-2011 , 12:46   Re: Make File Delete It Self
Reply With Quote #7

thanks worked
Dr7sTyLe is offline
Reply


Thread Tools
Display Modes

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 23:24.


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