forked from Simnation/Main
ed
This commit is contained in:
parent
48844d7321
commit
769454360e
72 changed files with 734 additions and 0 deletions
8
resources/[defaultmaps]/moreo_pharmacy/fxmanifest.lua
Normal file
8
resources/[defaultmaps]/moreo_pharmacy/fxmanifest.lua
Normal file
|
@ -0,0 +1,8 @@
|
|||
|
||||
fx_version "cerulean"
|
||||
games { 'gta5' }
|
||||
|
||||
author 'MoreoDesign'
|
||||
description 'Pharmacy'
|
||||
version '1.0.0'
|
||||
this_is_a_map 'yes'
|
BIN
resources/[defaultmaps]/moreo_pharmacy/stream/_manifest.ymf
Normal file
BIN
resources/[defaultmaps]/moreo_pharmacy/stream/_manifest.ymf
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
resources/[defaultmaps]/moreo_pharmacy/stream/hei_hw1_06_0.ybn
Normal file
BIN
resources/[defaultmaps]/moreo_pharmacy/stream/hei_hw1_06_0.ybn
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
resources/[defaultmaps]/moreo_pharmacy/stream/hi@hw1_06_0.ybn
Normal file
BIN
resources/[defaultmaps]/moreo_pharmacy/stream/hi@hw1_06_0.ybn
Normal file
Binary file not shown.
BIN
resources/[defaultmaps]/moreo_pharmacy/stream/hw1_06_0.ybn
Normal file
BIN
resources/[defaultmaps]/moreo_pharmacy/stream/hw1_06_0.ybn
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,40 @@
|
|||
<CodeWalkerProject>
|
||||
<Name>New CodeWalker Project</Name>
|
||||
<Version value="1" />
|
||||
<YmapFilenames>
|
||||
<Item>hei_hw1_occl_00.ymap</Item>
|
||||
<Item>moreo_pharmacy_milo.ymap</Item>
|
||||
<Item>map1.ymap</Item>
|
||||
<Item>hei_hw1_rd_strm_3.ymap</Item>
|
||||
</YmapFilenames>
|
||||
<YtypFilenames>
|
||||
<Item>moreo_pharmacy.ytyp</Item>
|
||||
</YtypFilenames>
|
||||
<YbnFilenames>
|
||||
<Item>hei_hw1_06_0.ybn</Item>
|
||||
<Item>hi@hei_hw1_06_0.ybn</Item>
|
||||
<Item>hi@hw1_06_0.ybn</Item>
|
||||
<Item>hw1_06_0.ybn</Item>
|
||||
<Item>moreo_pharmacy_col.ybn</Item>
|
||||
</YbnFilenames>
|
||||
<YndFilenames />
|
||||
<YnvFilenames />
|
||||
<TrainsFilenames />
|
||||
<ScenarioFilenames />
|
||||
<AudioRelFilenames />
|
||||
<YdrFilenames>
|
||||
<Item>hei_hw1_06_grnd_low2.ydr</Item>
|
||||
<Item>hw1_06_emissive_d.ydr</Item>
|
||||
<Item>hw1_06_pharmcy_01.ydr</Item>
|
||||
<Item>moreo_pharmacy_banners.ydr</Item>
|
||||
<Item>moreo_pharmacy_consultationdoor.ydr</Item>
|
||||
<Item>moreo_pharmacy_lights.ydr</Item>
|
||||
<Item>moreo_pharmacy_maindoor.ydr</Item>
|
||||
<Item>moreo_pharmacy_reflect.ydr</Item>
|
||||
<Item>moreo_pharmacy_shell.ydr</Item>
|
||||
<Item>moreo_pharmacy_storagedoor.ydr</Item>
|
||||
</YdrFilenames>
|
||||
<YddFilenames />
|
||||
<YftFilenames />
|
||||
<YtdFilenames />
|
||||
</CodeWalkerProject>
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
resources/[defaultmaps]/moreo_pharmacy/stream/v_53_till.ydr
Normal file
BIN
resources/[defaultmaps]/moreo_pharmacy/stream/v_53_till.ydr
Normal file
Binary file not shown.
Binary file not shown.
BIN
resources/[jobs]/[police]/cs_drunk/.fxap
Normal file
BIN
resources/[jobs]/[police]/cs_drunk/.fxap
Normal file
Binary file not shown.
70
resources/[jobs]/[police]/cs_drunk/config/config.lua
Normal file
70
resources/[jobs]/[police]/cs_drunk/config/config.lua
Normal file
|
@ -0,0 +1,70 @@
|
|||
Config = {}
|
||||
|
||||
-- 'QB' = For QBCore Framework
|
||||
-- 'ESX' = For ESX Framework
|
||||
-- false = For Standalone
|
||||
|
||||
Config.ServerType = 'QB' --['QB'|'ESX'|false]
|
||||
|
||||
Config.OpenUI = {
|
||||
useCommand = false,
|
||||
Command_Name = 'atest',
|
||||
|
||||
useItem = true, --Enable ServerType in sv_function.lua
|
||||
Item_Name = 'breathalyzer'
|
||||
}
|
||||
|
||||
Config.Wait_TIme = 2 --Blower Waiting Time in seconds
|
||||
|
||||
Config.Animations = {
|
||||
Enable = true,
|
||||
Tester_Prop = `prop_inhaler_01`,
|
||||
|
||||
Share_Anim = 'package_dropoff',
|
||||
Share_Dict = 'mp_safehouselost@',
|
||||
|
||||
Use_Anim = 'loop',
|
||||
Use_Dict = 'mp_player_inteat@pnq'
|
||||
}
|
||||
|
||||
Config.DrunkLevel = {
|
||||
[25] = 'green', --Low Value [25 means upto 25 is low value of drunk]
|
||||
[70] = 'yellow', --Mid Value
|
||||
[100] = 'red' --High Value
|
||||
}
|
||||
|
||||
Config.DrunkSettings = {
|
||||
Enable = true, --Enble/Disable Drunk Value Deductions after certain time
|
||||
Reduce_Interval = 0.5, --This will reduce alcholic level after certain minutes (In Minutes)
|
||||
Reduce_Level = 2 --Reduce Level
|
||||
}
|
||||
|
||||
Config.DrunkEffect = false --Enble/Disable Drunk Effect
|
||||
Config.Effect_Interval = {
|
||||
--You can add more stages if you want
|
||||
[10] = { --Drunk Level at which this Effect will occur
|
||||
Enable = true, --Enable/Disable Stage
|
||||
Animation = 'move_m@drunk@a' --WalkStyle
|
||||
},
|
||||
[40] = {
|
||||
Enable = true,
|
||||
Animation = 'move_m@drunk@moderatedrunk'
|
||||
},
|
||||
[80] = {
|
||||
Enable = true,
|
||||
Animation = 'move_m@drunk@slightlydrunk'
|
||||
},
|
||||
[95] = { --Heavy Drunk Max Stage
|
||||
Enable = true,
|
||||
Animation = 'move_m@drunk@verydrunk'
|
||||
},
|
||||
}
|
||||
|
||||
----Language Editor----
|
||||
|
||||
Config.Language = {
|
||||
wait_blow = 'WAIT',
|
||||
blow_txt = 'BLOW',
|
||||
tester_share = 'Alchohol Tester Given to Nearby Player',
|
||||
tester_smoke = 'Tell Nearest Player to Blow Air'
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
function Notificaton(msg)
|
||||
lib.notify({
|
||||
title = 'Drunk',
|
||||
description = msg
|
||||
})
|
||||
end
|
||||
|
||||
function RequestWalking(set)
|
||||
RequestAnimSet(set)
|
||||
while not HasAnimSetLoaded(set) do
|
||||
Wait(1)
|
||||
end
|
||||
end
|
||||
|
||||
function isDrunk()
|
||||
return isDrunk
|
||||
end
|
||||
exports('isDrunk', isDrunk)
|
||||
|
||||
function GetDrunkLevel()
|
||||
return lib.callback.await('cs:drunk:fetch', false, 'get')
|
||||
end
|
||||
exports('GetDrunkLevel', GetDrunkLevel)
|
||||
|
||||
function SetDrunkLevel(valueS)
|
||||
local valueS = type(valueS) == 'table' and valueS.client.value or valueS
|
||||
if not valueS then return 0 end
|
||||
return lib.callback.await('cs:drunk:fetch', false, 'set', valueS)
|
||||
end
|
||||
exports('SetDrunkLevel', SetDrunkLevel)
|
||||
|
||||
function AddDrunkLevel(valueS)
|
||||
local valueS = type(valueS) == 'table' and valueS.client.value or valueS
|
||||
if not valueS then return 0 end
|
||||
return lib.callback.await('cs:drunk:fetch', false, 'add', valueS)
|
||||
end
|
||||
exports('AddDrunkLevel', AddDrunkLevel)
|
||||
|
||||
function RemoveDrunkLevel(valueS)
|
||||
local valueS = type(valueS) == 'table' and valueS.client.value or valueS
|
||||
if not valueS then return 0 end
|
||||
return lib.callback.await('cs:drunk:fetch', false, 'remove', valueS)
|
||||
end
|
||||
exports('RemoveDrunkLevel', RemoveDrunkLevel)
|
|
@ -0,0 +1,27 @@
|
|||
if Config.ServerType == "QB" then
|
||||
QBCore = exports['qb-core']:GetCoreObject()
|
||||
elseif Config.ServerType == "ESX" then
|
||||
ESX = exports['es_extended']:getSharedObject()
|
||||
end
|
||||
|
||||
if Config.OpenUI.useCommand then
|
||||
lib.addCommand(Config.OpenUI.Command_Name, {
|
||||
help = 'Open Breathalyzer ',
|
||||
}, function(source)
|
||||
TriggerClientEvent('cs:drunk:openUI', source)
|
||||
end)
|
||||
end
|
||||
|
||||
if Config.OpenUI.useItem then
|
||||
if Config.ServerType == 'ESX' then
|
||||
ESX.RegisterUsableItem(Config.OpenUI.Item_Name, function(source)
|
||||
TriggerClientEvent('cs:drunk:openUI', source)
|
||||
end)
|
||||
elseif Config.ServerType == 'QB' then
|
||||
QBCore.Functions.CreateUseableItem(Config.OpenUI.Item_Name, function(source)
|
||||
TriggerClientEvent('cs:drunk:openUI', source)
|
||||
end)
|
||||
else
|
||||
--YOU CAN ADD YOUR CUSTOM EVENTS HERE
|
||||
end
|
||||
end
|
19
resources/[jobs]/[police]/cs_drunk/fxmanifest.lua
Normal file
19
resources/[jobs]/[police]/cs_drunk/fxmanifest.lua
Normal file
|
@ -0,0 +1,19 @@
|
|||
fx_version 'adamant'
|
||||
version '1.2'
|
||||
game 'gta5'
|
||||
description 'Drunk Test Analyzer'
|
||||
|
||||
ui_page 'ui/index.html'
|
||||
|
||||
shared_scripts {'@ox_lib/init.lua', 'config/config.lua'}
|
||||
client_scripts {'main/client.lua', 'config/functions/cl_function.lua'}
|
||||
server_scripts {'main/server.lua', 'config/functions/sv_function.lua'}
|
||||
|
||||
files {'ui/**'}
|
||||
|
||||
escrow_ignore {'config/**'}
|
||||
|
||||
dependencies {'ox_lib'}
|
||||
|
||||
lua54 'yes'
|
||||
dependency '/assetpacks'
|
BIN
resources/[jobs]/[police]/cs_drunk/main/client.lua
Normal file
BIN
resources/[jobs]/[police]/cs_drunk/main/client.lua
Normal file
Binary file not shown.
BIN
resources/[jobs]/[police]/cs_drunk/main/server.lua
Normal file
BIN
resources/[jobs]/[police]/cs_drunk/main/server.lua
Normal file
Binary file not shown.
BIN
resources/[jobs]/[police]/cs_drunk/ui/digital-7.ttf
Normal file
BIN
resources/[jobs]/[police]/cs_drunk/ui/digital-7.ttf
Normal file
Binary file not shown.
BIN
resources/[jobs]/[police]/cs_drunk/ui/image/inhaler.png
Normal file
BIN
resources/[jobs]/[police]/cs_drunk/ui/image/inhaler.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.7 KiB |
BIN
resources/[jobs]/[police]/cs_drunk/ui/image/power-on.png
Normal file
BIN
resources/[jobs]/[police]/cs_drunk/ui/image/power-on.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.8 KiB |
BIN
resources/[jobs]/[police]/cs_drunk/ui/image/reload.png
Normal file
BIN
resources/[jobs]/[police]/cs_drunk/ui/image/reload.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.8 KiB |
BIN
resources/[jobs]/[police]/cs_drunk/ui/image/tester.png
Normal file
BIN
resources/[jobs]/[police]/cs_drunk/ui/image/tester.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 64 KiB |
45
resources/[jobs]/[police]/cs_drunk/ui/index.html
Normal file
45
resources/[jobs]/[police]/cs_drunk/ui/index.html
Normal file
|
@ -0,0 +1,45 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<link rel="stylesheet" href="style.css" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<img src="image/tester.png" class="tester-img" />
|
||||
<div class="main-inside">
|
||||
<div class="wait-screen">
|
||||
<p class="wait-text wait-txt">Wait</p>
|
||||
<div id="progressBar">
|
||||
<span id="progressBar-value"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="blow-screen">
|
||||
<p class="wait-text blow-txt">Blow</p>
|
||||
<div style="display: flex; align-items: center; justify-content: space-evenly;">
|
||||
<p class="wait-text">Air</p>
|
||||
<img src="image/inhaler.png" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="result-screen" id="green">
|
||||
<p class="time-text">88%</p>
|
||||
<p class="bac-text">% BAC</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="buttons">
|
||||
<div class="button-1" id="power">
|
||||
<img src="image/power-on.png" class="power-button" />
|
||||
</div>
|
||||
<div class="button-1" id="reset">
|
||||
<img src="image/reload.png" class="power-button" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="blow-tip">
|
||||
<span class="tooltiptext blow-txt">BLOW</span>
|
||||
</div>
|
||||
</div>
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.1/jquery.min.js"></script>
|
||||
<script src="main.js"></script>
|
||||
</body>
|
||||
</html>
|
1
resources/[jobs]/[police]/cs_drunk/ui/main.js
Normal file
1
resources/[jobs]/[police]/cs_drunk/ui/main.js
Normal file
File diff suppressed because one or more lines are too long
BIN
resources/[jobs]/[police]/cs_drunk/ui/sounds/blow.wav
Normal file
BIN
resources/[jobs]/[police]/cs_drunk/ui/sounds/blow.wav
Normal file
Binary file not shown.
BIN
resources/[jobs]/[police]/cs_drunk/ui/sounds/click.wav
Normal file
BIN
resources/[jobs]/[police]/cs_drunk/ui/sounds/click.wav
Normal file
Binary file not shown.
BIN
resources/[jobs]/[police]/cs_drunk/ui/sounds/result.wav
Normal file
BIN
resources/[jobs]/[police]/cs_drunk/ui/sounds/result.wav
Normal file
Binary file not shown.
261
resources/[jobs]/[police]/cs_drunk/ui/style.css
Normal file
261
resources/[jobs]/[police]/cs_drunk/ui/style.css
Normal file
|
@ -0,0 +1,261 @@
|
|||
@font-face {
|
||||
font-family: Digital;
|
||||
src: url(digital-7.ttf);
|
||||
}
|
||||
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
body {
|
||||
user-select: none;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.container {
|
||||
display: none;
|
||||
position: absolute;
|
||||
top: 40vh;
|
||||
--animate-duration: 0.4s;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.tester-img {
|
||||
height: 550px;
|
||||
width: 550px;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.main-inside {
|
||||
height: 83px;
|
||||
width: 120px;
|
||||
position: absolute;
|
||||
top: 173px;
|
||||
right: 211px;
|
||||
border-radius: 5px;
|
||||
background-color: #3a3838;
|
||||
}
|
||||
|
||||
.start-effect {
|
||||
display: block;
|
||||
animation: theme 3s linear infinite;
|
||||
}
|
||||
|
||||
#red {
|
||||
background-color: #c5374f;
|
||||
}
|
||||
|
||||
#green {
|
||||
background-color: #50c25b;
|
||||
}
|
||||
|
||||
#yellow {
|
||||
background-color: #dbdd62;
|
||||
}
|
||||
|
||||
@keyframes theme {
|
||||
0% {
|
||||
background: #74c390;
|
||||
}
|
||||
16% {
|
||||
background: #5dbdb6;
|
||||
}
|
||||
33% {
|
||||
background: #59d4e1;
|
||||
}
|
||||
50% {
|
||||
background: #51bce8;
|
||||
}
|
||||
66% {
|
||||
background: #fa5374;
|
||||
}
|
||||
83% {
|
||||
background: #e46653;
|
||||
}
|
||||
100% {
|
||||
background: #74c390;
|
||||
}
|
||||
}
|
||||
@keyframes background {
|
||||
0% {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
100% {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
.wait-screen {
|
||||
height: 83px;
|
||||
width: 120px;
|
||||
border-radius: 5px;
|
||||
background-color: #b5b2b5;
|
||||
display: none;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: space-evenly;
|
||||
}
|
||||
|
||||
.blow-screen {
|
||||
display: none;
|
||||
height: 83px;
|
||||
width: 120px;
|
||||
border-radius: 5px;
|
||||
background-color: #b5b2b5;
|
||||
}
|
||||
|
||||
.wait-text {
|
||||
font-size: 30px;
|
||||
font-family: sans-serif;
|
||||
text-align: center;
|
||||
text-transform: uppercase;
|
||||
font-weight: 800;
|
||||
color: #2e2c2e;
|
||||
}
|
||||
|
||||
.time-text {
|
||||
padding-top: 15px;
|
||||
font-size: 50px;
|
||||
color: #111111;
|
||||
font-family: Digital;
|
||||
text-align: center;
|
||||
text-transform: uppercase;
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
.bac-text {
|
||||
font-family: sans-serif;
|
||||
font-weight: 900;
|
||||
font-size: 12px;
|
||||
text-align: end;
|
||||
padding-right: 5px;
|
||||
}
|
||||
#progressBar {
|
||||
border-radius: 10px;
|
||||
width: 100px;
|
||||
height: 10px;
|
||||
border: 1px solid #2e2c2e;
|
||||
position: relative;
|
||||
}
|
||||
#progressBar span {
|
||||
display: block;
|
||||
height: 100%;
|
||||
background-color: #2e2c2e;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
animation: progressBar 10s linear forwards;
|
||||
}
|
||||
@keyframes progressBar {
|
||||
0% {
|
||||
width: 0%;
|
||||
}
|
||||
100% {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.result-screen {
|
||||
display: none;
|
||||
height: 83px;
|
||||
width: 120px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.buttons {
|
||||
background-color: #111111;
|
||||
height: 36px;
|
||||
width: 130px;
|
||||
position: absolute;
|
||||
top: 286px;
|
||||
right: 205px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-around;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.button-1 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 35px;
|
||||
width: 35px;
|
||||
border-radius: 50px;
|
||||
background: rgb(254, 255, 255);
|
||||
background: radial-gradient(
|
||||
circle,
|
||||
rgba(254, 255, 255, 0.6558998599439776) 0%,
|
||||
rgba(0, 0, 0, 1) 100%
|
||||
);
|
||||
}
|
||||
|
||||
.power-button {
|
||||
height: 25px;
|
||||
width: 25px;
|
||||
}
|
||||
|
||||
.blow-tip {
|
||||
display: none;
|
||||
height: 53px;
|
||||
width: 110px;
|
||||
position: absolute;
|
||||
left: 87px;
|
||||
top: 31px;
|
||||
transform: rotate(17deg);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.blow-tip .tooltiptext {
|
||||
visibility: hidden;
|
||||
width: 120px;
|
||||
background-color: #000000a1;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
border-radius: 6px;
|
||||
padding: 2px 0;
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
top: -45px;
|
||||
font-weight: 900;
|
||||
font-family: sans-serif;
|
||||
height: 30px;
|
||||
transform: rotate(-16deg);
|
||||
}
|
||||
|
||||
.blow-tip:hover .tooltiptext {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
@keyframes slideUp {
|
||||
0% {
|
||||
transform: translateY(100%);
|
||||
opacity: 0;
|
||||
}
|
||||
100% {
|
||||
transform: translateY(0);
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.slide-up {
|
||||
animation: slideUp 0.5s ease-out forwards;
|
||||
}
|
||||
|
||||
@keyframes slideDown {
|
||||
0% {
|
||||
transform: translateY(0);
|
||||
opacity: 1;
|
||||
}
|
||||
100% {
|
||||
transform: translateY(100%);
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.slide-down {
|
||||
animation: slideDown 0.5s ease-out forwards;
|
||||
}
|
BIN
resources/[tools]/cfx_nteam_train_scenario/.fxap
Normal file
BIN
resources/[tools]/cfx_nteam_train_scenario/.fxap
Normal file
Binary file not shown.
BIN
resources/[tools]/cfx_nteam_train_scenario/client.lua
Normal file
BIN
resources/[tools]/cfx_nteam_train_scenario/client.lua
Normal file
Binary file not shown.
90
resources/[tools]/cfx_nteam_train_scenario/config.lua
Normal file
90
resources/[tools]/cfx_nteam_train_scenario/config.lua
Normal file
|
@ -0,0 +1,90 @@
|
|||
Config = {}
|
||||
|
||||
Config.BlackBarSize = 0.20
|
||||
|
||||
HideHud = function(status)
|
||||
|
||||
end
|
||||
|
||||
--===================================================================
|
||||
-- SCENARIOS
|
||||
--===================================================================
|
||||
|
||||
-- You can add as many scenarios you want ( like before going to jail, or to transfer player from city to paleto or sandy , or any other idea you have like scenario for something )
|
||||
|
||||
Config.Scenarios = {
|
||||
['Welcome'] = { -- this name must stay Welcome if you are using it for PostCharacterCreator
|
||||
StartWalkLocation = vector4(2628.1289, 2936.3772, 40.4228, 57.3484), -- location where player scenario starts
|
||||
StopWalkingLocation = vector4(2623.7268, 2938.6338, 40.4228, 64.0300), -- walking from coords to coords must be straight line
|
||||
-- Location where train will be spawned
|
||||
spawnLocation = vector4(2614.9763, 2944.1470, 40.1375, 140.1980),
|
||||
-- Final Destination where train will stop and player gets out
|
||||
targetLocation = vector3(324.7359, -1796.8044, 28.1226),
|
||||
TrainModel = 24,
|
||||
TrainDirection = false, -- its true/false
|
||||
PlayerInCarriage = true,
|
||||
DriverModel = 'u_m_m_edtoh',
|
||||
-- location where player will be teleported after train stopes at station
|
||||
StationCoords = vector4(313.8152, -1784.0806, 28.1811, 236.6900),
|
||||
PostScenario = function()
|
||||
-- this is client side function
|
||||
-- You can trigger any client or server event here / or any client export
|
||||
end,
|
||||
},
|
||||
|
||||
-- this is our example for video you can edit it or use it ( here we replaced train with another model but you can use any model you want )
|
||||
['Jail'] = {
|
||||
StartWalkLocation = vector4(184.5892, -1908.8032, 22.8594, 227.5445), -- location where player scenario starts
|
||||
StopWalkingLocation = vector4(206.6665, -1933.1744, 22.3089, 216.1803), -- walking from coords to coords must be straight line
|
||||
-- Location where train will be spawned
|
||||
spawnLocation = vector4(212.1824, -1931.2069, 22.7389, 318.9960),
|
||||
-- Final Destination where train will stop and player gets out
|
||||
targetLocation = vector3(1965.6018, 2419.7219, 60.2874),
|
||||
TrainModel = 20,
|
||||
TrainDirection = true, -- its true/false
|
||||
PlayerInCarriage = true,
|
||||
DriverModel = 'u_m_m_edtoh',
|
||||
-- location where player will be teleported after train stopes at station
|
||||
StationCoords = vector4(1851.5878, 2585.7178, 45.6719, 85.5455),
|
||||
PostScenario = function()
|
||||
-- this is client side function
|
||||
-- You can trigger any client or server event here / or any client export
|
||||
-- for example here add your jail logic ( to send player to jail )
|
||||
end,
|
||||
},
|
||||
|
||||
['Paleto'] = {
|
||||
StartWalkLocation = vector4(-459.9373, 5368.5127, 81.2990, 251.0909), -- location where player scenario starts
|
||||
StopWalkingLocation = vector4(-453.2338, 5366.6680, 81.2989, 253.9655), -- walking from coords to coords must be straight line
|
||||
-- Location where train will be spawned
|
||||
spawnLocation = vector4(-447.7654, 5358.0933, 81.9381, 181.3557),
|
||||
-- Final Destination where train will stop and player gets out
|
||||
targetLocation = vector3(1810.5146, 3510.3872, 38.7271),
|
||||
TrainModel = 24,
|
||||
TrainDirection = false, -- its true/false
|
||||
PlayerInCarriage = true,
|
||||
DriverModel = 'u_m_m_edtoh',
|
||||
-- location where player will be teleported after train stopes at station
|
||||
StationCoords = vector4(1825.2296, 3508.4880, 38.3468, 28.0931),
|
||||
PostScenario = function()
|
||||
-- this is client side function
|
||||
-- You can trigger any client or server event here / or any client export
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
--=======================================================================
|
||||
-- HOW TO USE THIS RESOUCE
|
||||
--=======================================================================
|
||||
|
||||
--[[
|
||||
If you want to use This Resource Scenarios you can call it from Client using event :
|
||||
|
||||
--@ type is 'Welcome','Jail' or any other scenario you created
|
||||
TriggerEvent('train:startscenario',type)
|
||||
|
||||
If you want to use it from server call it like this :
|
||||
|
||||
TriggerClientEvent('train:startscenario', source, type)
|
||||
]]
|
32
resources/[tools]/cfx_nteam_train_scenario/fxmanifest.lua
Normal file
32
resources/[tools]/cfx_nteam_train_scenario/fxmanifest.lua
Normal file
|
@ -0,0 +1,32 @@
|
|||
fx_version 'cerulean'
|
||||
|
||||
author "NTeam Development"
|
||||
version '1.0.0'
|
||||
description 'NTeam Train Scenario'
|
||||
|
||||
games { 'gta5' }
|
||||
lua54 'yes'
|
||||
|
||||
ui_page 'html/index.html'
|
||||
|
||||
files {
|
||||
'html/index.html',
|
||||
'html/sounds/*.mp3',
|
||||
}
|
||||
|
||||
shared_scripts {
|
||||
'config.lua',
|
||||
}
|
||||
|
||||
client_scripts {
|
||||
'client.lua',
|
||||
}
|
||||
|
||||
server_scripts {
|
||||
'server.lua',
|
||||
}
|
||||
|
||||
escrow_ignore {
|
||||
'config.lua',
|
||||
}
|
||||
dependency '/assetpacks'
|
97
resources/[tools]/cfx_nteam_train_scenario/html/index.html
Normal file
97
resources/[tools]/cfx_nteam_train_scenario/html/index.html
Normal file
|
@ -0,0 +1,97 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>NTeam Train Scenario</title>
|
||||
<style>
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
.button-container, .welcome-container {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
background: rgba(0, 0, 0, 0.7);
|
||||
color: white;
|
||||
padding: 10px 20px;
|
||||
border-radius: 5px;
|
||||
font-family: Arial, sans-serif;
|
||||
font-size: 18px;
|
||||
text-align: center;
|
||||
display: none;
|
||||
}
|
||||
.button-container {
|
||||
bottom: 50px;
|
||||
}
|
||||
.welcome-container {
|
||||
top: 30%;
|
||||
width: 100%;
|
||||
height: 300px;
|
||||
font-size: 50px;
|
||||
display: none;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
opacity: 1;
|
||||
transition: opacity 1s ease-out; /* Fade-out transition */
|
||||
}
|
||||
.welcome-container.fade-out {
|
||||
opacity: 0;
|
||||
}
|
||||
.welcome-container div {
|
||||
flex-grow: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.welcome-container span {
|
||||
color: turquoise;
|
||||
}
|
||||
.button-container span {
|
||||
color: red;
|
||||
}
|
||||
.logo {
|
||||
display: block;
|
||||
margin: 10px auto;
|
||||
width: 300px;
|
||||
height: 300px;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
window.addEventListener('message', function(event) {
|
||||
if (event.data.action === 'showUI') {
|
||||
document.querySelector('.button-container').style.display = 'block';
|
||||
} else if (event.data.action === 'hideUI') {
|
||||
document.querySelector('.button-container').style.display = 'none';
|
||||
} else if (event.data.action === 'showWelcome') {
|
||||
document.querySelector('.welcome-container').style.display = 'flex';
|
||||
document.querySelector('.welcome-container').classList.remove('fade-out');
|
||||
playWelcomeSound();
|
||||
} else if (event.data.action === 'hideWelcome') {
|
||||
const welcomeContainer = document.querySelector('.welcome-container');
|
||||
welcomeContainer.classList.add('fade-out');
|
||||
setTimeout(function() {
|
||||
welcomeContainer.style.display = 'none';
|
||||
}, 2000);
|
||||
}
|
||||
|
||||
function playWelcomeSound() {
|
||||
let audio = new Audio(`nui://${GetParentResourceName()}/html/sounds/welcome.mp3`); // Replace with your sound file
|
||||
audio.play();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="button-container">PRESS<span> SPACE</span> TO CHANGE CAMERA</div>
|
||||
<div class="welcome-container">
|
||||
<!-- IF YOU WANT TO USE MESSAGE UNCOMMENT THIS LINE UNDER THIS COMMENT AND IF YOU WANT TO USE JUST LOGO UPLOAD IT AND EDIT LINK -->
|
||||
<!-- <div>WELCOME TO <span>NTEAM</span> SERVER</div> -->
|
||||
<img class="logo" src="https://iili.io/2txUqIR.png" alt="">
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
Binary file not shown.
BIN
resources/[tools]/cfx_nteam_train_scenario/server.lua
Normal file
BIN
resources/[tools]/cfx_nteam_train_scenario/server.lua
Normal file
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue