Skip to content
This repository has been archived by the owner on May 13, 2021. It is now read-only.

Commit

Permalink
Update to 1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
t-valette committed Sep 23, 2017
1 parent a28a5cd commit f7fc315
Show file tree
Hide file tree
Showing 31 changed files with 643 additions and 3,014 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,11 @@
## 1.4.0 (No ETA)
* Add ranks
* Add chat police rank
* Add parameter in menu system
* Add bindings in config file
* Fix : Disconnection won't change the job id
* Fix : Heading for police vehicles

## 1.3.0 (07/07/2017)
* FXServer compatibility (drop mysql support on FXServer version)
* New en translation (thanks BCTB and BritishBrotherhood) and de translation (thanks SyfuxX)
Expand Down
65 changes: 14 additions & 51 deletions README.md
@@ -1,15 +1,14 @@
# Cops_FiveM v1.3.0
Thanks to FiveM Scripts for their help :
# Cops_FiveM v1.4.0

<a href="https://discord.gg/eNJraMf"><img alt="Discord Status" src="https://discordapp.com/api/guilds/285462938691567627/widget.png"></a>
## /!\ If you are upgrading Cops_FiveM to 1.4.0, please have a look to the Upgrade section. If it is the first installation of Cops_FiveM, you can ignore this message. /!\

# Description

Cops_FiveM is a script for RP server mainly. It let servers to have a cops system with loadout, vehicles, inventory check, ...

# Current Features

* support mysql, mysql-async and couchdb
* support mysql-async
* configurable (features and language)
* cops whitelist
* take/break service (positions with blips)
Expand All @@ -27,6 +26,7 @@ Cops_FiveM is a script for RP server mainly. It let servers to have a cops syste
* check vehicle plate
* cops can see each other blips : (thanks @Scammer -- https://forum.fivem.net/t/release-scammers-script-collection-09-03-17/3313)
* drag players (thanks @Frazzle and others : https://forum.fivem.net/t/release-drag-command/22174)
* ranks (example of use : cloackroom.lua line 12)
* so many other features ...

# Changelog
Expand All @@ -38,45 +38,29 @@ The contribution guide can be found [here](https://github.com/Kyominii/Cops_Five

(Readme, Contributing and Changelog files from by [FiveM Script](https://github.com/FiveM-Scripts/), thanks ^^)

# Support
This script works on few server, so if it doesn't work, please make an effort before posting your issue.
I won't provide support for people asking help without minimal details (logs are appreciated)

# FXServer

## Installation

* Install supported scripts you want
* Download police-fxserver folder from this [git](https://github.com/Kyominii/Cops_FiveM) and rename it police
* Download police folder from this [git](https://github.com/Kyominii/Cops_FiveM) and rename it police
* Put this folder to resources folder in your server
* Add police.sql in your database and uncomment the import line in __resource.lua if you are using mysql-async
* Edit config.lua as you want and config_db.lua
* Add police.sql in your database
* Edit [config file](https://github.com/Kyominii/Cops_FiveM/blob/master/config/config.lua) as you want
* Add "start police" in server.cfg (make sure you start this resource after all dependencies)

# Legacy (non FXServer)

/!\ Higher version supported by legacy version : 1.3 (no more update for legacy version after that version) /!\
# Upgrade

## Installation

* Install supported scripts you want
* Download police-legacy folder from this [git](https://github.com/Kyominii/Cops_FiveM) and rename it police
* Put this folder to resources folder in your server
* Add police.sql to your database if you are using mysql or mysql-async
* Edit config.lua as you want and config_db.lua
* Add police to your .yml file in AutoStartResource section
The database has changed with the v1.4.0, so you have to execute upgrade-1.3-to-1.4.sql file on your database to migrate to the new police database

# Supported scripts

* [Essentialmode](https://forum.fivem.net/t/release-essentialmode-base/3665)
* [mysql-async](https://forum.fivem.net/t/beta-mysql-async-library-v0-2-2/21881)
* [fs_core](https://github.com/FiveM-Scripts/fs_core)
* [fs_freemode](https://github.com/FiveM-Scripts/fs_freemode)
* [Vdk_inventory](https://forum.fivem.net/t/release-inventory-system-v1-4/14477)
* [Simple Banking](https://forum.fivem.net/t/release-simple-banking-2-0-now-with-gui/13896)

If you are using this script, add this piece of code in server.lua (banking)

### SQL version

```lua
RegisterServerEvent('bank:withdrawAmende')
Expand All @@ -100,28 +84,6 @@ AddEventHandler('bank:withdrawAmende', function(amount)
end)
```

### CouchDB version

```lua
RegisterServerEvent('bank:withdrawAmende')
AddEventHandler('bank:withdrawAmende', function(amount)
TriggerEvent('es:getPlayerFromId', source, function(user)
local rounded = round(tonumber(amount), 0)
if(string.len(rounded) >= 9) then
TriggerClientEvent('chatMessage', source, "", {0, 0, 200}, "^1Input too high^0")
CancelEvent()
else
withdraw(source, rounded)
local new_balance = user.bank
TriggerClientEvent("fs_core:notify", source, "CHAR_BANK_MAZE", 1, "Maze Bank", false, "Withdrew: ~g~$".. rounded .." ~n~~s~New Balance: ~g~$" .. new_balance)
TriggerClientEvent("banking:updateBalance", source, new_balance)
TriggerClientEvent("banking:removeBalance", source, rounded)
CancelEvent()
end
end)
end)
```

* [JobSystem](https://forum.fivem.net/t/release-jobs-system-v1-0-and-paycheck-v2-0/14054)
* [Skin Customization](https://forum.fivem.net/t/release-skin-customization-v1-0/16491)
* [Player in db](https://forum.fivem.net/t/release-nameofplayers-v-1-get-name-of-players-in-database/17983)
Expand All @@ -135,6 +97,7 @@ If you are using this script, add this piece of code in cl_healthplayer.lua (lin
TriggerEvent("es_em:cl_ResPlayer")
```

* [Heli Script](https://forum.fivem.net/t/release-heli-script/24094) : it is not really "supported" because it's working without anything, but I recommand this script for the cop helicopter
* [gc_identity](https://github.com/Gannon001/gcidentity)

If you are using this script, add this event in server.lua (gc_identity)
Expand All @@ -155,9 +118,9 @@ AddEventHandler('gc:copOpenIdentity',function(other)
end)
```

## Commands
## Commands (you have to have a rank >= minRankSetRank from config file)
* /copadd ID : to add a policeman in the database
* /coprem ID : to remove a policeman from the database
* /coprank ID Rank : To change the rank of a police officer

## Thanks to the whole community of FiveM which help to improve this script (credits are in source code)
## Thanks to Cops testers too : `<Oskarr/> (or Oskr)` and `BritishBrotherhood`
## Thanks to the whole community of FiveM which help to improve this script
29 changes: 0 additions & 29 deletions police-fxserver/__resource.lua

This file was deleted.

102 changes: 0 additions & 102 deletions police-fxserver/client/armory.lua

This file was deleted.

0 comments on commit f7fc315

Please sign in to comment.