Coder Social home page Coder Social logo

esx_securitycam's Introduction

esx_securitycam

Requirements

Download & Installation

Download

Configuration

    • Look at the WIKI and you will get all the information you need!

Original Code

Thanks to xander1998 for the original code (Non ESX).

Legal

License

[Please read the license before using this.]

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.

esx_securitycam's People

Contributors

elpumpo avatar lifegoal avatar nearbyplayer avatar qalle-git avatar rex2630 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

esx_securitycam's Issues

Error _U

Error loading script config.lua in resource esx_securitycam: config.lua:57: attempt to call a nil value (global '_U')
stack traceback:
config.lua:57: in main chunk

Restart resource

When I spawn for first time after srv rr, gotta restart the resource manually.
After using one of the cameras, gotta restart the resource again to be usable. ->Won't let me log into system again.

Add to police menu ?

hey, nice work !
How could I add it to police ? I know for the menu side but cant find what function I have to register and trigger :/

Thx u for any help and for your awesome work @LifeGoal !

Trying to add in new cameras

I am trying to add in new camera systems. In the config, I made a new table called shopCameras, and went into the code and copied the policecam code and changed it to match the shopcameras stuff. The shop cameras show up in the menu now, and can be viewed, but once you get to the start or end of the cameras, or randomly when scrolling through the shop cameras, it gets stuck in the camera ui, and I get an index error trying to reference a line that relates to the bank cameras. I can't find any places in code where the new cameras are referencing bank cameras.

I've attached the configuration I am using

bankCamLabel = {label = _U('pacific_standard_bank')},
		bankCameras = {
			{label = _U('bcam'), x = 232.86, y = 221.46, z = 107.83, r = {x = -25.0, y = 0.0, z = -140.91}, canRotate = true},
			{label = _U('bcam2'), x = 257.45, y = 210.07, z = 109.08, r = {x = -25.0, y = 0.0, z = 28.05}, canRotate = true},
			{label = _U('bcam3'), x = 261.50, y = 218.08, z = 107.95, r = {x = -25.0, y = 0.0, z = -149.49}, canRotate = true},
			{label = _U('bcam4'), x = 241.64, y = 233.83, z = 111.48, r = {x = -35.0, y = 0.0, z = 120.46}, canRotate = true},
			{label = _U('bcam5'), x = 269.66, y = 223.67, z = 113.23, r = {x = -30.0, y = 0.0, z = 111.29}, canRotate = true},
			{label = _U('bcam6'), x = 261.98, y = 217.92, z = 113.25, r = {x = -40.0, y = 0.0, z = -159.49}, canRotate = true},
			{label = _U('bcam7'), x = 258.44, y = 204.97, z = 113.25, r = {x = -30.0, y = 0.0, z = 10.50}, canRotate = true},
			{label = _U('bcam8'), x = 235.53, y = 227.37, z = 113.23, r = {x = -35.0, y = 0.0, z = -160.29}, canRotate = true},
			{label = _U('bcam9'), x = 254.72, y = 206.06, z = 113.28, r = {x = -35.0, y = 0.0, z = 44.70}, canRotate = true},
			{label = _U('bcam10'), x = 269.89, y = 223.76, z = 106.48, r = {x = -35.0, y = 0.0, z = 112.62}, canRotate = true},
			{label = _U('bcam11'), x = 252.27, y = 225.52, z = 103.99, r = {x = -35.0, y = 0.0, z = -74.87}, canRotate = true},
			{label = _U('bcam12'), x = 251.65, y = 218.66, z = 104.5, r = {x = -28.0, y = 0.0, z = -20.0}, canRotate = true},
			{label = "Harmony", x = 1179.21, y = 2705.77, z = 39.5, r = {x = -28.0, y = 0.0, z = -20.0}, canRotate = true},
            {label = "Great Ocean Highway", x = -2963.98, y = 478.80, z = 16.9, r = {x = -28.0, y = 0.0, z = -20.0}, canRotate = true},
            {label = "Del Perro Blvd", x = -1216.84, y = -331.57, z = 39.1, r = {x = -28.0, y = 0.0, z = -20.0}, canRotate = true}
		},

	policeCamLabel = {label = _U('police_station')},
		policeCameras = {
			{label = _U('pcam'), x = 416.744, y = -1009.270, z = 34.08, r = {x = -25.0, y = 0.0, z = 28.05}, canRotate = true},
			{label = _U('pcam2'), x = 465.151, y = -994.266, z = 27.23, r = {x = -30.0, y = 0.0, z = 100.29}, canRotate = true},
			{label = _U('pcam3'), x = 465.631, y = -997.777, z = 27.48, r = {x = -35.0, y = 0.0, z = 90.46}, canRotate = true},
			{label = _U('pcam4'), x = 465.544, y = -1001.583, z = 27.1, r = {x = -25.0, y = 0.0, z = 90.01}, canRotate = true},
			{label = _U('pcam5'), x = 420.241, y = -1009.010, z = 34.95, r = {x = -25.0, y = 0.0, z = 230.95}, canRotate = true},
			{label = _U('pcam6'), x = 433.249, y = -977.786, z = 33.456, r = {x = -40.0, y = 0.0, z = 100.49}, canRotate = true},
			{label = _U('pcam7'), x = 449.440, y = -987.639, z = 33.25, r = {x = -30.0, y = 0.0, z = 50.50}, canRotate = true}
		},

	storeCamLabel = {label = _U('stores')},
		storeCameras = {
			{label = "Vinewood", x = 373.80, y = 331.05, z = 105.0, r = {x = -25.0, y = 0.0, z = 200.0}, canRotate = false},
            {label = "Innocence Blvd", x = 24.45, y = -1342.25, z = 31.0, r = {x = -25.0, y = 0.0, z = 210.0}, canRotate = false},
            {label = "Grove St", x = -43.15, y = -1755.09, z = 31.0, r = {x = -25.0, y = 0.0, z = 90.0}, canRotate = false},
            {label = "Murrieta Heights", x = 1133.22, y = -979.14, z = 48.5, r = {x = -28.0, y = 0.0, z = 230.0}, canRotate = false},
            {label = "Mirror Park", x = 1164.91, y = -317.88, z = 71.0, r = {x = -28.0, y = 0.0, z = 140.0}, canRotate = false},
            {label = "San Andreas Ave", x = -1224.42, y = -910.82, z = 14.0, r = {x = -28.0, y = 0.0, z = 340.0}, canRotate = false},
            {label = "Prosperity", x = -1483.36, y = -379.98, z = 42.0, r = {x = -28.0, y = 0.0, z = 80.0}, canRotate = false},
            {label = "Banham Canyom GOH", x = -2965.96, y = 387.47, z = 17.0, r = {x = -28.0, y = 0.0, z = 40.0}, canRotate = false},
            {label = "Ineseno Rd GOH", x = -3043.75, y = 582.99, z = 9.5, r = {x = -28.0, y = 0.0, z = 330.0}, canRotate = false},
            {label = "Barbareno Rd Chumash", x = -3247.05, y = 1000.38, z = 15.0, r = {x = -28.0, y = 0.0, z = 300.0}, canRotate = false},
            {label = "North Rockford Dr", x = -1822.66, y = 797.82, z = 140.0, r = {x = -28.0, y = 0.0, z = 180.0}, canRotate = false},
            {label = "68 West", x = 549.66, y = 2666.61, z = 44.0, r = {x = -28.0, y = 0.0, z = 40.0}, canRotate = false},
            {label = "68 East", x = 1169.39, y = 2711.55, z = 40.0, r = {x = -28.0, y = 0.0, z = 130.0}, canRotate = false},
            {label = "Palomino Freeway", x = 2552.40, y = 381.20, z = 110.0, r = {x = -28.0, y = 0.0, z = 300.0}, canRotate = false},
            {label = "Senora Freeway", x = 2673.58, y = 3281.85, z = 57.0, r = {x = -28.0, y = 0.0, z = 280.0}, canRotate = false},
            {label = "Alhambra Drive Sandy Shores", x = 1957.71, y = 3744.28, z = 34.0, r = {x = -28.0, y = 0.0, z = 250.0}, canRotate = false},
            {label = "Grapeseed", x = 1701.36, y = 4919.52, z = 44.0, r = {x = -28.0, y = 0.0, z = 20.0}, canRotate = false},
            {label = "Mount Chiliad GOH", x = 1730.09, y = 6419.63, z = 37.0, r = {x = -28.0, y = 0.0, z = 190.0}, canRotate = false}			
		}		
	},
```

inside of main.lua I also duplicated the elseif's for policeCamera stuff and changed it all to storeCamera. I can't seem to find where else I am missing code that would cause the UI to break only on the newly added camera group.

Can't re-open menu

When I look at the camera's and press backspace I exit the menu. But when I want to look into the cameras again The option to press 'e' doesn't pop up.

No HUD

HUD stays off after using cameras

Test on latest release

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.