Mr_Moose Posted August 6, 2014 Share Posted August 6, 2014 A complete law and wanted level system in BETA state, it has been running on the AC servers for many months and has been available for a long time as well. The reason for this topic is because of a leak to the community before the official release which got a large amount of downloads and then removed for obvious reasons. The conclusion remains, it seems to bee too popular to be unknown for the world, so let's take the full details: Download link: (BETA) http://code.albonius.com/?action=download&id=8523e282173778cc46739ae4405d3784 Features: Contains GUI with skin selection for the police officer job Commands to join SAPD, Army, SWAT and FBI (same as the names with lowercase) A wanted level system that trigger on most kinds of crimes, everything from killing to hitting a mailbox or crashing your car. Hit a wanted player with your nightstick to arrest. Markers in every jail cell (Inside LSPD, SFPD and LVPD) to deliver the arrested player Ability to transport your arrested player in a car without the ability for the suspect to escape. Tazer which forces the suspect down on the floor when getting hit from a short distance Kill arrest on violent suspects (otherwise they'll respawn at the hospital) Data file for easier configuration Exported functions to set trigger a crime and set wanted level, getting distance to nearest cop or criminal etc. to implement your own tracking system. Installation: (Hard) The system itself are ready for use but it's dependent on many other resources, alternatively you need to create an extra script file that set's up the rest. See the below list for known configuration requirements, in order to make this work you need some scripting skills as well. That's why it's set to BETA currently. Replace: 'exports["AC_message"]:outputTopBar' with 'outputChatBox' or download our top bar messages resource: https://community.multitheftauto.com/index.php?p=resources&s=details&id=8620 Add the following teams: "SAPD", "SWAT", "FBI" and "Army". (see law-job.lua) Make sure the element data "Wanted" is set on every player. (Fixed in the most recent version) Download AC vehicle spawn system to get spawners for police vehicles at any police station. Start the resource "interiors" (applies to those servers that doesn't have a way to get inside interiors). For support and bug reports see: http://games.albonius.com Link to comment
Johnny Killstone Posted August 7, 2014 Share Posted August 7, 2014 Damn it was hard to install, but I did make it to work after a while, nice resource, thanks. Link to comment
Mr_Moose Posted August 17, 2014 Author Share Posted August 17, 2014 Damn it was hard to install, but I did make it to work after a while, nice resource, thanks.It's fully depending on your own scripting skills, you need be able to understand eventual errors, if you do then it's easy to install. Most stuff in this works out of the box as well and other stuff are easy to reuse if you want to make a new system but not from scratch. Link to comment
xeon17 Posted August 27, 2014 Share Posted August 27, 2014 Add the following teams: "SAPD", "SWAT", "FBI" and "Army". (see law-job.lua) I need to create these teams? Link to comment
Nighttrain Posted August 27, 2014 Share Posted August 27, 2014 i know that if you Create Police that it is good but where i can find the Army,FBI and Swat? do you know? maybe we can i help and you me sorry i am new Link to comment
MannPro Posted August 27, 2014 Share Posted August 27, 2014 i know that if you Create Police that it is good but where i can find the Army,FBI and Swat? do you know?maybe we can i help and you me sorry i am new You must add them in the teams list. Use your admin panel for that. Link to comment
Nighttrain Posted August 27, 2014 Share Posted August 27, 2014 already did but where is the FBI? SWAT? Army? Link to comment
Mr_Moose Posted August 27, 2014 Author Share Posted August 27, 2014 function addTeamData ( ) -- Uncomment these to show information in the scoreboard -- call( getResourceFromName( "scoreboard" ), "scoreboardAddColumn", "Occupation", getRootElement(), 110 ) -- call( getResourceFromName( "scoreboard" ), "scoreboardAddColumn", "Wanted", getRootElement(), 55 ) -- call( getResourceFromName( "scoreboard" ), "scoreboardAddColumn", "Jailed", getRootElement(), 35 ) -- Create teams createTeam( "Police", 110, 110, 110 ) createTeam( "SAPD", 110, 110, 110 ) createTeam( "SWAT", 110, 110, 110 ) createTeam( "FBI", 110, 110, 110 ) createTeam( "ArmedForces", 110, 110, 110 ) end addEventHandler( "onResourceStart", getResourceRootElement(), addTeamData ) This is one of the details that has to be fixed, it's handled by an external system in those servers it was built for which isn't published as open source currently, anyway to solve this, all you need to do is to add the above code in any of the server side files, law_job.lua for example within this resource, it will create the included teams (and optionally add some more columns to the scoreboard showing wanted level, if a player is jailed and the occupation) . That will add the teams when the resource is started, It should be changed within future versions though but until then the above event is the "official" temporary solution to the problem. Link to comment
Nighttrain Posted August 27, 2014 Share Posted August 27, 2014 can you maybe tell me how to join Army? and FBI/SWAT? because LAPD can you join by Interior sorry for my questions i am new so do not know much about your Script, but ist nice Link to comment
xeon17 Posted August 27, 2014 Share Posted August 27, 2014 (edited) There are some errors that flood my debugscript3 . by the way , can you please explain how the police & wanted system work because i have problems , example a player have wanted level i'm try to arrest or to kill him but i'm getting killed. Edited August 27, 2014 by Guest Link to comment
Nighttrain Posted August 27, 2014 Share Posted August 27, 2014 only what i need is Location from SWAT,FBI and Army marker other stuff works perfect now after the Teamstuff Link to comment
Nighttrain Posted August 27, 2014 Share Posted August 27, 2014 if you can Mark locations on a map that will be awesome Link to comment
Mr_Moose Posted August 27, 2014 Author Share Posted August 27, 2014 @Nighttrain All other teams than 'Police' can be accessed by command if you are in a specific group provided by a proper group system, all you need to have is the element data "Group" set to the team with the same name, it's still like that in the newer versions. @XeoN- It's a complex system so it's either a bug in the tazer or in the vehicle damage control which also causes wanted levels and make people loosing health when crashing their cars. If there are errors flooding your debug script it's most likely in police_client.lua at the bottom where a "onClientRender" event is used to show the distance, might be some missing data in there, try stopping the resource and see what errors you get. Link to comment
Nighttrain Posted August 27, 2014 Share Posted August 27, 2014 MrBrutus you have skype? so i can add you that you can show/send the file's for a good group and stuff, because i do not get it its failing because the LAPD have a marker and the other not, but how to JOIN army? swat? fbi? command? Link to comment
Mr_Moose Posted August 27, 2014 Author Share Posted August 27, 2014 It's not that hard to make it work actually, let's take it step by step shall we. First you need a way to manage the lawgroups, i.e a group system, I recomend this one: https://forum.multitheftauto.com/viewtopic.php?f=108&t=67832 Secondly when that is added you need to create a group named SAPD, SWAT, FBI or ArmedForces, and be a member of any of those groups, after that you can use the commands /sapd /swat /fbi or /army to join the law team you wish, now there is also a specific staff group built into this which has access to any of these law groups, and it can simply be changed in the law_job.lua file as well. If you want markers to all the jobs you need to create them by yourself. Only the team 'police' has markers to take the job and a GUI to select skin. Markers are located inside. Link to comment
Nighttrain Posted August 27, 2014 Share Posted August 27, 2014 realy bad sorry do you have a basic script for a Vehicle system for groups? or? Link to comment
Mr_Moose Posted August 27, 2014 Author Share Posted August 27, 2014 This one: https://community.multitheftauto.com/index.php?p=resources&s=details&id=8338 has all the vehicles and are actually made to work with this wanted level system. Link to comment
Mr_Moose Posted August 28, 2014 Author Share Posted August 28, 2014 that is not working What part isn't working for you? Try /debugscript 3 and check the output. Link to comment
Nighttrain Posted August 28, 2014 Share Posted August 28, 2014 that is not working What part isn't working for you? Try /debugscript 3 and check the output. hmm debugscript 3? i can see the mrkers, but cant take cars from it Link to comment
Mr_Moose Posted August 28, 2014 Author Share Posted August 28, 2014 Then it does work, it checks for team and occupation (element data) before it allows usage of a marker, that need to be set in the veh_data.lua file. Link to comment
Nighttrain Posted August 28, 2014 Share Posted August 28, 2014 in the Data is this -- Table over vehicle rights, to spawn vehRights1 = { -- occupation, team, wanted-level [1]={ "", "", 50 }, [2]={ "Taxi Driver", "Civilians", 2 }, [3]={ "Trucker", "Civilians", 1 }, [4]={ "", "Police", 0 }, [5]={ "Fireman", "Emergency service", 0 }, [6]={ "", "Army", 0 }, [7]={ "Paramedic", "Emergency service", 0 }, [8]={ "Bus Driver", "Civilians", 1 }, [9]={ "Mechanic", "Civilians", 3 }, [10]={ "", "SWAT", 0 }, [11]={ "", "SAPD", 0 }, [12]={ "", "Staff", 0 }, [13]={ "Pilot", "Civilians", 0 }, [14]={ "Tram Driver", "Civilians", 0 }, [15]={ "Train Driver", "Civilians", 0 }, [16]={ "Pilot", "Civilians", 0 }, [17]={ "", "Police", 0 }, [18]={ "", "FBI", 0 }, [19]={ "", "Staff", 0 }, what do i need to change? Link to comment
Mr_Moose Posted August 28, 2014 Author Share Posted August 28, 2014 Every line is connected to a set of markers in where you can spawn vehicles, first one is occupation setElementData(thePlayer, "Occupation", "OCCUPATION_HERE") Leave that field blank if you're not using occupation, second column is team, change it to whatever team name you want to give access to the vehicles, and the last one is the highest allowed wanted level, that uses the built in wanted level system. Link to comment
Nighttrain Posted August 28, 2014 Share Posted August 28, 2014 i am on your TS3 because cant enter IRC why dunno Link to comment
Nighttrain Posted August 28, 2014 Share Posted August 28, 2014 i am in your IRC #main Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now