CCTV

I used the following code in my fn_selfactions
Code:
//CCTV
    if(cursorTarget isKindOf "Notebook" and _canDo) then {
            if (s_player_Laptop < 0) then {
            s_player_Laptop = player addAction ["Activate Laptop Surveillance","cctv\init.sqf",cursorTarget, 0, false, true, "",""];
        };
    } else {
        player removeAction s_player_Laptop;
        s_player_Laptop = -1;
    };
  //End

Class Names are Notebook and Loudspeaker

So far I have 64 cameras ....works great. When you init cameras for first time it takes a few but after that its fine.What I want to do know is be able to separate cameras by location. Not really sure how I will do that yet.

For instance.....
Airstrips
Electro
Cherno
 
Wow, this works so well. I got it going on my Chernarus server really easily. I placed my cameras around the map in the editor and then boosted the range in the script so I can view the whole grid from my command center. Neat. I can't wait to spy on people with them.
 
Can someone up put up a detailed instruction? Very interested in using this. Thanks!

Github was down when I tried it, not sure if its been updated with the working files or not.
 
Add the following in your fn_selfactions.....

Code:
//CCTV
    if(cursorTarget isKindOf "Notebook" and _canDo) then {
            if (s_player_Laptop < 0) then {
            s_player_Laptop = player addAction ["Activate Laptop Surveillance","cctv\init.sqf",cursorTarget, 0, false, true, "",""];
        };
    } else {
        player removeAction s_player_Laptop;
        s_player_Laptop = -1;
    };
//End

Once your done with that make a folder called cctv and add the 2 included files (found here: www.zombiebattalion.net/CCTV.rar )into that folder.

Once all this is done you need to go into your editor and place cameras wherever you want them.You also need to add a Laptop somewhere on map to interact with. Classnames are (Notebook) and (Loudspeaker) .
In the editor they are found at Object (small) -> Notebook , Loudspeaker


Depending on how many cameras you place and how for apart they are you may need to adjust the following line to a larger radius.

Found in cctv/init.sqf "CCTV_radius = 500; // Radius which notebooks detect cameras"


Hope this helps...and again this is not my script/code. Credit goes to https://github.com/maca134/dayz-cctv
 
If you want to add sound when the surveillance is activated just add this line at the bottom of the cctv/ init file...
"playSound "cctv"

And then add the below code to your description.ext

Code:
class CfgSounds
{
    sounds[] =
    {
    cctv
    };
    class cctv
    {
    name="cctv";
    sound[]={cctv.ogg,0.9,1};
    titles[] = {};
    };
};

Just above "class RscTitles"

Ive included a file I use....you can make whatever u like though :)

http://www.zombiebattalion.net/cctv.rar
 
You should re-design that bike unpack crap to work with the notebook. I would, but to lazy to go designing pictures and stuff.

That's a good idea! I thinking about instead of having defined CCTV cameras in the script they should have to build it instead and then attached it to the lamp post, and keep it there by writing it to the database.

Agh ideas ideas ideas
 
Problem is the bike unpack is a mod level change, so everyone who plays needs the mod'ed files first.
I have been trying to come up with a way that works and doesn't use action menus
 
Problem is the bike unpack is a mod level change, so everyone who plays needs the mod'ed files first.
I have been trying to come up with a way that works and doesn't use action menus

You could write an fn_selfActions that requires a toolbox and find an item that is 'unused' in dayz and make it the 'bike' or 'camera' and use createVehicle etc etc in the script (I believe Player2 said something along these lines as well, in the original bike thread)

You would also have to include something like _bike = player cursorTarget "bike" / "Notebook";

deleteVehicle _bike; etc etc
 
Ye, i just didnt want to have to add another action tbh. There are far to many as it is.
I have just finished a huge overhaul to my epoch server (single currency, trader dialogs and banks) and I will be looking into re-creating a new building mod (i want to make it so anyone can add new recipes easily and im making sure its coded as efficiently as possible).
Im just so busy with it at the moment lol
 
Ye, i just didnt want to have to add another action tbh. There are far to many as it is.
I have just finished a huge overhaul to my epoch server (single currency, trader dialogs and banks) and I will be looking into re-creating a new building mod (i want to make it so anyone can add new recipes easily and im making sure its coded as efficiently as possible).
Im just so busy with it at the moment lol

I'm sure Retra might mess with it. & if he doesn't I might try to throw something together at some point.
 
So I had a look at that deplorable bike crap...

I think it would make more sense to just have it so that a player can build the camera at the post and not have it in the inventory. But with the laptop I'm not to sure... Maybe another system similar to R3F
 
So I had a look at that deplorable bike crap...

I think it would make more sense to just have it so that a player can build the camera at the post and not have it in the inventory. But with the laptop I'm not to sure... Maybe another system similar to R3F

That would be sick.
 
So I had a look at that deplorable bike crap...

I think it would make more sense to just have it so that a player can build the camera at the post and not have it in the inventory. But with the laptop I'm not to sure... Maybe another system similar to R3F

well, if you do it the way I described up top you could 'delete' te laptop and have it put into your inventory, but since it wouldn't save to db (unless you did some hive writing or whatnot) you'd also have to write a script to create the laptop. Wouldn't be too hard.

For the nearby post thing you would have to do some fancy reading for nearestObjects...Would have to find out the classname of the posts used in the map...or just have people place their own 'posts'
 
Back
Top