Deleting anoying trees ...

Halvhjearne

Valued Member!
this took me a bit to figure out how to even find trees at all ...

but i figured it out in the end and now i have a working script to cut down an area of trees instantly ...
however, for some reason i cannot delete the stumps and the trees just fall randomly ... i have tried multiple things and i just cant seem to get rid of these stupid trees

also for some reason the server will not do this for me either and if you relog after cutting down a buch of trees, they will be stading again when you log back in.

i suspect this is coursed by the trees beeing drawn by the client, but ofc i could just exec this on each client instead

if anyone could help me figure out how to actually remove the trees?
... that would be awsome!

so far i tried:
deletevehicle _x; (obviusly)
_x setPos [0,0,0]; (thought id try moving them if they couldnt be deleted)
_x hideObject true; (tried hide, since they arent actually in the way it wouldnt matter if they was just invisible, but nope)
[nil, nil, rSPAWN, _x, { _this hideObject true; }] call RE; (diffrent variant of above)
[nil, _x, rHideObject, true] call RE; (yet another diffrent variant of above)

none of that works ... :confused:

edit: oops, forgot to add the script:
http://pastebin.com/Vattq2KL
 
i found an awsome way to use this for players ...

add this in fn_selfactions below pack tent:
Code:
    // allow player to free aircraft in woods
    _hasAxe =    ("ItemHatchet" in items player || "ItemHatchet_DZE" in items player);
    if ((cursorTarget isKindOf "Air") and _hasAxe) then {
        if (s_Player_ClearTrees < 0) then {
            s_Player_ClearTrees = player addAction [("<t color=""#dddd00"">" + ("Cut trees around aircraft") + "</t>"),"scripts\player_freeaircraft.sqf",_cursorTarget, 0, false, true, "", "vehicle _this == player"];
        };
    } else {
        player removeAction s_Player_ClearTrees;
        s_Player_ClearTrees = -1;
    };
and below this:
Code:
    player removeAction s_player_packtent;
    s_player_packtent = -1;
add this:
Code:
    player removeAction s_Player_ClearTrees;
    s_Player_ClearTrees = -1;

now make a txt file called player_freeaircraft.sqf and add the following paste:
http://pastebin.com/UnLZcW8s
into it and put it into scripts folder ...

now you wont have to go and move aircrafts stuck in woods anymore, players can do this themself (required that they have an axe ofc)

this is just a quick something i threw toghether from the last one, and script might change ... just wanted to post it if someone would want this

edit:
after further testing it seems this will not work propper with antihacks ... ill figure it out after i get some sleep
 
Back
Top