-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
123 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
## Terms of Use | ||
|
||
(Below the term "product" is used to describe the script / modification) | ||
|
||
This script is freeware and is not to be exploited for personal, financial or commercial gain. This product is provided without any form of warranty. | ||
Therefore, responsibility for any damages caused by this product or its misuse rest solely with the user, as the author(s) will accept no liability. | ||
|
||
- This copy of terms must remain in its original state and must not be modified in anyway | ||
|
||
- These terms must be alongside the product at all times | ||
|
||
- Do not re-release with out permission (just ask for permission) | ||
|
||
- Do not redistribute to any other sites. This script is only to be published on verified sites by FAXES | ||
|
||
- Editing / abusing these terms will result in action | ||
|
||
### Summery | ||
So basically you can edit anything with the product (except the terms), but you can not release the product nor release the edited version without written permission from FAXES. | ||
|
||
Terms are also available at | ||
[www.faxes.zone/scripts/terms](http://faxes.zone/scripts/terms) | ||
|
||
|
||
![alt text](http://faxes.zone/files/logos/FAXES%20ToUSML.png "FAXES ToU Icon") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
------------------------------------ | ||
--- Police Backup, Made by FAXES --- | ||
------------------------------------ | ||
|
||
resource_manifest_version '05cfa83c-a124-4cfa-a768-c24a5811d8f9' | ||
|
||
client_script "client.lua" | ||
|
||
server_script "server.lua" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
------------------------------------ | ||
--- Police Backup, Made by FAXES --- | ||
------------------------------------ | ||
|
||
--- CONFIG --- | ||
local leoPeds = { | ||
"s_m_y_cop_01", | ||
} | ||
|
||
-------------------------------------------------------------------------------------------------------- | ||
function checkPed(ped, PedList) | ||
for i = 1, #PedList do | ||
if GetHashKey(PedList[i]) == GetEntityModel(ped) then | ||
return true | ||
end | ||
end | ||
return false | ||
end | ||
|
||
function ShowInfo(text) | ||
SetNotificationTextEntry("STRING") | ||
AddTextComponentString(text) | ||
DrawNotification(false, false) | ||
end | ||
|
||
function playCode99Sound() | ||
PlaySoundFrontend(-1, "TIMER_STOP", "HUD_MINI_GAME_SOUNDSET", 1) | ||
Wait(900) | ||
PlaySoundFrontend(-1, "TIMER_STOP", "HUD_MINI_GAME_SOUNDSET", 1) | ||
Wait(900) | ||
PlaySoundFrontend(-1, "TIMER_STOP", "HUD_MINI_GAME_SOUNDSET", 1) | ||
end | ||
|
||
RegisterNetEvent('Fax:ShowInfo') | ||
AddEventHandler('Fax:ShowInfo', function(notetext) | ||
ShowInfo(notetext) | ||
end) | ||
|
||
RegisterNetEvent('Fax:BackupReq') | ||
AddEventHandler('Fax:BackupReq', function(bk, s) | ||
local src = s | ||
local bkLvl = bk | ||
local bkLvlTxt = "N/A" | ||
local coords = GetEntityCoords(GetPlayerPed(GetPlayerFromServerId(src))) | ||
local street1 = GetStreetNameAtCoord(coords.x, coords.y, coords.z, Citizen.ResultAsInteger(), Citizen.ResultAsInteger()) | ||
local streetName = (GetStreetNameFromHashKey(street1)) | ||
|
||
if checkPed(GetPlayerPed(PlayerId()), leoPeds) then | ||
if bkLvl == "1" then | ||
bkLvlTxt = "~b~code 1" | ||
elseif bkLvl == "2" then | ||
bkLvlTxt = "~y~code 2" | ||
elseif bkLvl == "3" then | ||
bkLvlTxt = "~r~CODE 3" | ||
PlaySoundFrontend(-1, "Mission_Pass_Notify", "DLC_HEISTS_GENERAL_FRONTEND_SOUNDS", 1) | ||
elseif bkLvl == "99" then | ||
bkLvlTxt = "~r~~h~CODE 99" | ||
end | ||
|
||
ShowInfo("An officer is in need of assistance " .. bkLvlTxt .. "~s~. ~o~Location: ~s~" .. streetName .. ".") | ||
SetNewWaypoint(coords.x, coords.y) | ||
|
||
if bkLvl == "99" then | ||
playCode99Sound() | ||
end | ||
end | ||
end) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
------------------------------------ | ||
--- Police Backup, Made by FAXES --- | ||
------------------------------------ | ||
|
||
RegisterCommand("bk", function(source, args, rawCommand) | ||
local s = source | ||
local bkLvl = args[1] | ||
|
||
if not bkLvl then | ||
TriggerClientEvent("Fax:ShowInfo", source, "~y~Please specify a code level ~n~~s~1, 2, 3") | ||
elseif bkLvl == "1" then | ||
TriggerClientEvent("Fax:BackupReq", -1, bkLvl, s) | ||
elseif bkLvl == "2" then | ||
TriggerClientEvent("Fax:BackupReq", -1, bkLvl, s) | ||
elseif bkLvl == "3" then | ||
TriggerClientEvent("Fax:BackupReq", -1, bkLvl, s) | ||
elseif bkLvl == "99" then | ||
TriggerClientEvent("Fax:BackupReq", -1, bkLvl, s) | ||
elseif bkLvl ~= "1" or bkLvl ~= "2" or bkLvl ~= "3" or bkLvl ~= "99" then | ||
TriggerClientEvent("Fax:ShowInfo", source, "~y~Invalid code level") | ||
end | ||
end) |