Ok, lets show a more detailed explanation on what im trying to do then. First, the script!
Note: not the actuall script, but I tried this and the file wont get deleted.
NPC Code:
function onActionServerSide()
{
if (params[0] == "deletefile") {
echo( "Deleting file...");
deletefile( "levels/items/Weapons/phantombane.txt");
}
}
//#CLIENTSIDE
function onCreated()
{
triggeraction( 0, 0, "serverside", name, "deletefile");
}
Then, lets /find the file on RC!
PHP Code:
/find phantombane.txt
......
items/Weapons/phantombane.txt: downloadable, 45 byte, 2006-05-21 18:44:57
Ok, next step: lets add the NPC to myself and check if it gets deleted!
PHP Code:
xXziroXx loaded attributes of player xXziroXx
xXziroXx set attributes of player xXziroXx
Deleting file...
Ah, now the file should be deleted, right? But.. its still in the folders! Lets check with /find..
PHP Code:
/find phantombane.txt
......
items/Weapons/phantombane.txt: downloadable, 45 byte, 2006-05-21 18:45:31
So, does anyone have a clue what im doing wrong if anything?