Jump to content

Sign in to follow this  
paranoid_giraffe

Remove Items By Class

Recommended Posts

I am trying to remove all items by class. I have an array with class names, but I am not sure how to check an items class via config files. I read the wiki, but it doesn't really explain it. I have also searched how and haven't found anything. So without any further ado, here is my code:


cfgclasses[]={ } // I'll fill it with my classes

{
_x2=_x;
{
if (_x2 isClass (configFile >> _x2) then { // This is the line that I am not sure about
deleteVehicle _x2;
};
} foreach cfgclasses;
} foreach allunits;

hint "Object removal succeeded";
[/Code]

[color=Silver]

[size=1]---------- Post added at 16:27 ---------- Previous post was at 15:32 ----------[/size]

[/color]Crap I didn't realize this was in the AddOns section! [b]Please disregard this post![/b]

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×