updating ers and other scripts
This commit is contained in:
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.
@@ -81,6 +81,10 @@ Config.flatbed = "flatbed" -- Base game flatbed
|
||||
Config.flatbedm2 = "flatbedm2" -- https://www.gta5-mods.com/vehicles/freightliner-m2-crew-cab-flatbed-add-on-script-beta
|
||||
Config.lgc19flatbed = "lgc19flatbed" -- https://forum.cfx.re/t/2019-peterbilt-flatbed/4783413
|
||||
Config.biftowmfd2 = "biftowmfd2" -- https://mfd.tebex.io/package/6281210
|
||||
Config.Gtow = "Gtow" -- https://www.gta5-mods.com/vehicles/peterbilt-337-tuning-by-mfd-fivem
|
||||
Config.flatbedm2 = "flatbedm2" -- https://www.gta5-mods.com/vehicles/freightliner-m2-crew-cab-flatbed-add-on-script-beta
|
||||
Config.lgc19flatbed = "lgc19flatbed" -- https://forum.cfx.re/t/2019-peterbilt-flatbed/4783413
|
||||
Config.biftowmfd2 = "biftowmfd2" -- https://mfd.tebex.io/package/6281210
|
||||
Config.Gtow = "Gtow"
|
||||
Config.towy = "towy"
|
||||
Config.rollback1 = "rollback1"
|
||||
@@ -101,11 +105,6 @@ Config.gtrailer = "gtrailer"
|
||||
Config.dotgooseneck = "dotgooseneck"
|
||||
Config.firef350 = "firef350"
|
||||
Config.Terrain20tahoe = "Terrain20tahoe"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
-- List any vehicle models here you do not want to be able to be towed
|
||||
Config.BlacklistedVehs = {
|
||||
|
||||
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
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.
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.
Binary file not shown.
@@ -27,6 +27,11 @@ body {
|
||||
} */
|
||||
|
||||
/* A default font */
|
||||
html, body {
|
||||
background: transparent !important;
|
||||
background-color: transparent !important;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
|
||||
font-size: 13px;
|
||||
@@ -196,6 +201,30 @@ body {
|
||||
transition: opacity 0.25s ease-out;
|
||||
}
|
||||
|
||||
#callout-interface-container h4,
|
||||
#callout-pre-interface-container h4 {
|
||||
font-size: 1.5rem;
|
||||
font-weight: 500;
|
||||
margin-bottom: 0.5rem;
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
#callout-interface-container h5,
|
||||
#callout-pre-interface-container h5 {
|
||||
font-size: 1.25rem;
|
||||
font-weight: 500;
|
||||
margin-bottom: 0.5rem;
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
#callout-interface-container h6,
|
||||
#callout-pre-interface-container h6 {
|
||||
font-size: 1rem;
|
||||
font-weight: 500;
|
||||
margin-bottom: 0.5rem;
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.hint {
|
||||
position: absolute;
|
||||
margin: 5px;
|
||||
@@ -243,6 +272,7 @@ body {
|
||||
top: var(--module-default-y, 50%);
|
||||
transform: translate(-50%, -50%);
|
||||
z-index: 1;
|
||||
min-width: 550px;
|
||||
opacity: 0;
|
||||
animation: fadeIn 0.25s ease forwards;
|
||||
background-color: var(--interaction-bg-color);
|
||||
@@ -259,6 +289,506 @@ body {
|
||||
z-index: 1;
|
||||
opacity: 0;
|
||||
animation: fadeIn 0.25s ease forwards;
|
||||
max-width: 400px;
|
||||
max-height: 80vh;
|
||||
overflow-y: auto;
|
||||
text-rendering: optimizeLegibility;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
/* Simple loading indicator */
|
||||
.loading-indicator {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.loading-indicator i {
|
||||
animation: loading-pulse 1.5s ease-in-out infinite;
|
||||
}
|
||||
|
||||
@keyframes loading-pulse {
|
||||
0%, 100% {
|
||||
opacity: 0.5;
|
||||
}
|
||||
50% {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
/* Compact ID Card Styles */
|
||||
#ped-interaction-id-card .card {
|
||||
margin: 8px !important;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
#ped-interaction-id-card .card-header {
|
||||
padding: 8px 12px;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
#ped-interaction-id-card .card-body {
|
||||
padding: 8px 12px;
|
||||
}
|
||||
|
||||
#ped-interaction-id-card .list-group-item {
|
||||
padding: 6px 8px;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
#ped-interaction-id-card .profile-picture {
|
||||
max-height: 120px !important;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
#ped-interaction-id-card .license-badge {
|
||||
font-size: 10px;
|
||||
padding: 2px 6px;
|
||||
margin: 1px;
|
||||
}
|
||||
|
||||
#ped-interaction-id-card .fs-5 {
|
||||
font-size: 14px !important;
|
||||
}
|
||||
|
||||
#ped-interaction-id-card .col-md-4,
|
||||
#ped-interaction-id-card .col-md-8 {
|
||||
padding: 0 4px;
|
||||
}
|
||||
|
||||
#ped-interaction-id-card .row {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#ped-interaction-id-card .mb-3 {
|
||||
margin-bottom: 8px !important;
|
||||
}
|
||||
|
||||
#ped-interaction-id-card .mb-2 {
|
||||
margin-bottom: 4px !important;
|
||||
}
|
||||
|
||||
/* Compact License Display */
|
||||
.license-compact {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 4px;
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
.license-compact-item {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
padding: 3px 8px;
|
||||
background: rgba(0, 0, 0, 0.4);
|
||||
border-radius: 4px;
|
||||
border: 1px solid rgba(255, 255, 255, 0.3);
|
||||
font-size: 11px;
|
||||
font-weight: 500;
|
||||
white-space: nowrap;
|
||||
color: #fff !important;
|
||||
}
|
||||
|
||||
.license-compact-item i {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
/* Icon colors only - text stays white */
|
||||
.license-compact-item.text-success i {
|
||||
color: #28a745;
|
||||
}
|
||||
|
||||
.license-compact-item.text-danger i {
|
||||
color: #dc3545;
|
||||
}
|
||||
|
||||
.license-compact-item.text-warning i {
|
||||
color: #ffc107;
|
||||
}
|
||||
|
||||
.license-compact-item.text-secondary i {
|
||||
color: #6c757d;
|
||||
}
|
||||
|
||||
/* Minimalistic Hint Styles */
|
||||
.hint-minimal {
|
||||
background: rgba(0, 0, 0, 0.8);
|
||||
border: 1px solid rgba(255, 193, 7, 0.6);
|
||||
border-radius: 8px;
|
||||
padding: 12px;
|
||||
max-width: 350px;
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
||||
}
|
||||
|
||||
.hint-header {
|
||||
margin-bottom: 8px;
|
||||
padding-bottom: 6px;
|
||||
border-bottom: 1px solid rgba(255, 193, 7, 0.3);
|
||||
}
|
||||
|
||||
.hint-title {
|
||||
color: #ffc107;
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.5px;
|
||||
}
|
||||
|
||||
.hint-content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
.hint-item {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 3px 0;
|
||||
}
|
||||
|
||||
.hint-key {
|
||||
color: #fff;
|
||||
font-size: 11px;
|
||||
font-weight: 600;
|
||||
background: rgba(255, 193, 7, 0.2);
|
||||
padding: 2px 6px;
|
||||
border-radius: 3px;
|
||||
border: 1px solid rgba(255, 193, 7, 0.4);
|
||||
font-family: 'Courier New', monospace;
|
||||
}
|
||||
|
||||
.hint-desc {
|
||||
color: rgba(255, 255, 255, 0.8);
|
||||
font-size: 10px;
|
||||
text-align: right;
|
||||
max-width: 60%;
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
.hint-footer {
|
||||
margin-top: 8px;
|
||||
padding-top: 6px;
|
||||
border-top: 1px solid rgba(255, 193, 7, 0.3);
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.hint-toggle {
|
||||
color: rgba(255, 193, 7, 0.7);
|
||||
font-size: 9px;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
/* Minimalistic Callout Styles */
|
||||
.callout-minimal {
|
||||
background: rgba(0, 0, 0, 0.6);
|
||||
border-radius: 8px;
|
||||
padding: 12px;
|
||||
max-width: 400px;
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
||||
border: 1px solid rgba(255, 255, 255, 0.2);
|
||||
backdrop-filter: blur(5px);
|
||||
}
|
||||
|
||||
/* Service-specific subtle accents */
|
||||
.callout-minimal.callout-police {
|
||||
border-left: 3px solid rgba(0, 87, 185, 0.75);
|
||||
}
|
||||
|
||||
.callout-minimal.callout-ambulance {
|
||||
border-left: 3px solid rgba(40, 167, 69, 0.75);
|
||||
}
|
||||
|
||||
.callout-minimal.callout-fire {
|
||||
border-left: 3px solid rgba(255, 69, 0, 0.75);
|
||||
}
|
||||
|
||||
.callout-minimal.callout-tow {
|
||||
border-left: 3px solid rgba(120, 35, 35, 0.75);
|
||||
}
|
||||
|
||||
.callout-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 10px;
|
||||
padding-bottom: 6px;
|
||||
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
|
||||
.callout-title {
|
||||
color: rgba(255, 255, 255, 0.9);
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.5px;
|
||||
}
|
||||
|
||||
.callout-type {
|
||||
color: rgba(255, 255, 255, 0.8);
|
||||
font-size: 11px;
|
||||
font-weight: 500;
|
||||
background: rgba(255, 255, 255, 0.1);
|
||||
padding: 2px 6px;
|
||||
border-radius: 3px;
|
||||
border: 1px solid rgba(255, 255, 255, 0.2);
|
||||
}
|
||||
|
||||
.callout-content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 6px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.callout-info {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 2px 0;
|
||||
}
|
||||
|
||||
.callout-label {
|
||||
color: rgba(255, 255, 255, 0.8);
|
||||
font-size: 11px;
|
||||
font-weight: 600;
|
||||
min-width: 60px;
|
||||
}
|
||||
|
||||
.callout-value {
|
||||
color: #fff;
|
||||
font-size: 11px;
|
||||
font-weight: 500;
|
||||
text-align: right;
|
||||
max-width: 60%;
|
||||
}
|
||||
|
||||
.callout-description {
|
||||
margin-top: 4px;
|
||||
padding: 6px;
|
||||
background: rgba(255, 255, 255, 0.05);
|
||||
border-radius: 4px;
|
||||
border-left: 2px solid rgba(255, 255, 255, 0.3);
|
||||
}
|
||||
|
||||
.callout-desc {
|
||||
color: rgba(255, 255, 255, 0.9);
|
||||
font-size: 11px;
|
||||
line-height: 1.4;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.callout-footer {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding-top: 8px;
|
||||
border-top: 1px solid rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
|
||||
.callout-countdown {
|
||||
color: rgba(255, 255, 255, 0.8);
|
||||
font-size: 11px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.callout-countdown .text-warning {
|
||||
color: #ffc107;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.callout-actions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
.callout-btn {
|
||||
color: #ffc107;
|
||||
font-size: 11px;
|
||||
font-weight: 700;
|
||||
background: rgba(255, 193, 7, 0.2);
|
||||
padding: 4px 8px;
|
||||
border-radius: 4px;
|
||||
border: 1px solid #ffc107;
|
||||
font-family: 'Courier New', monospace;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s ease;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.5px;
|
||||
}
|
||||
|
||||
.callout-btn:hover {
|
||||
background: rgba(0, 0, 0, 0.9);
|
||||
border-color: #ffd43b;
|
||||
color: #ffd43b;
|
||||
transform: scale(1.05);
|
||||
}
|
||||
|
||||
.callout-separator {
|
||||
color: rgba(255, 255, 255, 0.5);
|
||||
font-size: 10px;
|
||||
margin: 0 2px;
|
||||
}
|
||||
|
||||
/* Minimalistic Dispatch Message Styles */
|
||||
.dispatch-minimal {
|
||||
background: rgba(0, 0, 0, 0.8);
|
||||
background-color: rgba(0, 0, 0, 0.8);
|
||||
border-radius: 8px;
|
||||
padding: 12px;
|
||||
max-width: 400px;
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
||||
border: 1px solid rgba(255, 255, 255, 0.2);
|
||||
border-left: 3px solid rgba(0, 123, 255, 0.6);
|
||||
}
|
||||
|
||||
#dispatch-message-prompt-card {
|
||||
background: rgba(0, 0, 0, 0.8);
|
||||
background-color: rgba(0, 0, 0, 0.8);
|
||||
}
|
||||
|
||||
/* If you want backdrop blur and it works in your setup, you can enable it here */
|
||||
.dispatch-minimal.with-blur {
|
||||
backdrop-filter: blur(5px);
|
||||
-webkit-backdrop-filter: blur(5px);
|
||||
}
|
||||
|
||||
.dispatch-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
margin-bottom: 10px;
|
||||
padding-bottom: 6px;
|
||||
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
|
||||
.dispatch-title {
|
||||
color: rgba(255, 255, 255, 0.9);
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.5px;
|
||||
}
|
||||
|
||||
.dispatch-type {
|
||||
color: rgba(255, 255, 255, 0.8);
|
||||
font-size: 11px;
|
||||
font-weight: 500;
|
||||
background: rgba(255, 255, 255, 0.1);
|
||||
padding: 2px 6px;
|
||||
border-radius: 3px;
|
||||
border: 1px solid rgba(255, 255, 255, 0.2);
|
||||
}
|
||||
|
||||
.dispatch-content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 6px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.dispatch-callout-badge-container {
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.dispatch-callout-badge {
|
||||
display: inline-block;
|
||||
color: rgba(255, 255, 255, 0.9);
|
||||
font-size: 11px;
|
||||
font-weight: 600;
|
||||
background: rgba(255, 193, 7, 0.2);
|
||||
padding: 4px 10px;
|
||||
border-radius: 4px;
|
||||
border: 1px solid rgba(255, 193, 7, 0.5);
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.5px;
|
||||
}
|
||||
|
||||
.dispatch-message {
|
||||
margin-bottom: 4px;
|
||||
padding: 6px;
|
||||
background: rgba(255, 255, 255, 0.05);
|
||||
border-radius: 4px;
|
||||
border-left: 2px solid rgba(255, 255, 255, 0.3);
|
||||
}
|
||||
|
||||
.dispatch-desc {
|
||||
color: rgba(255, 255, 255, 0.9);
|
||||
font-size: 11px;
|
||||
line-height: 1.4;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.dispatch-info {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 2px 0;
|
||||
}
|
||||
|
||||
.dispatch-label {
|
||||
color: rgba(255, 255, 255, 0.8);
|
||||
font-size: 11px;
|
||||
font-weight: 600;
|
||||
min-width: 60px;
|
||||
}
|
||||
|
||||
.dispatch-value {
|
||||
color: rgba(255, 255, 255, 0.9);
|
||||
font-size: 11px;
|
||||
font-weight: 500;
|
||||
text-align: right;
|
||||
max-width: 60%;
|
||||
}
|
||||
|
||||
.dispatch-footer {
|
||||
padding-top: 8px;
|
||||
border-top: 1px solid rgba(255, 255, 255, 0.1);
|
||||
font-size: 11px;
|
||||
color: rgba(255, 255, 255, 0.8);
|
||||
}
|
||||
|
||||
.dispatch-track {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 8px;
|
||||
background: linear-gradient(to right, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.6));
|
||||
border-radius: 4px;
|
||||
border-top: 1px solid rgba(255, 255, 255, 0.1);
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
.dispatch-track-text {
|
||||
color: rgba(255, 255, 255, 0.9);
|
||||
font-size: 11px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.dispatch-track-btn {
|
||||
color: #ffc107;
|
||||
font-size: 11px;
|
||||
font-weight: 700;
|
||||
background: rgba(255, 193, 7, 0.2);
|
||||
padding: 4px 8px;
|
||||
border-radius: 4px;
|
||||
border: 1px solid #ffc107;
|
||||
font-family: 'Courier New', monospace;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s ease;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.5px;
|
||||
}
|
||||
|
||||
.dispatch-track-btn:hover {
|
||||
background: rgba(255, 193, 7, 0.3);
|
||||
border-color: #ffd43b;
|
||||
color: #ffd43b;
|
||||
transform: scale(1.05);
|
||||
}
|
||||
|
||||
.spinner-wrapper {
|
||||
@@ -1232,4 +1762,143 @@ body {
|
||||
opacity: 0;
|
||||
transform: translate(-50%, -50%) scale(0.8);
|
||||
}
|
||||
}
|
||||
|
||||
/* Slide animations for callout interfaces */
|
||||
@keyframes slideInFromLeft {
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: translateY(-50%) translateX(-100%);
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
transform: translateY(-50%) translateX(0);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes slideOutToLeft {
|
||||
from {
|
||||
opacity: 1;
|
||||
transform: translateY(-50%) translateX(0);
|
||||
}
|
||||
to {
|
||||
opacity: 0;
|
||||
transform: translateY(-50%) translateX(-100%);
|
||||
}
|
||||
}
|
||||
|
||||
.slideInFromLeft {
|
||||
animation: slideInFromLeft 0.3s ease-out forwards;
|
||||
}
|
||||
|
||||
.slideOutToLeft {
|
||||
animation: slideOutToLeft 0.3s ease-out forwards;
|
||||
}
|
||||
|
||||
/* Minimized Interface Indicator */
|
||||
#minimized-indicator {
|
||||
position: fixed;
|
||||
left: 20px;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
z-index: 1000;
|
||||
display: none;
|
||||
background: rgba(0, 0, 0, 0.7);
|
||||
border: 2px solid rgba(255, 193, 7, 0.6);
|
||||
border-left: 4px solid rgba(255, 193, 7, 0.9);
|
||||
border-radius: 8px;
|
||||
padding: 10px 12px;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease;
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
|
||||
}
|
||||
|
||||
#minimized-indicator:hover {
|
||||
background: rgba(0, 0, 0, 0.85);
|
||||
border-color: rgba(255, 193, 7, 0.9);
|
||||
transform: translateY(-50%) scale(1.05);
|
||||
box-shadow: 0 6px 16px rgba(255, 193, 7, 0.3);
|
||||
}
|
||||
|
||||
#minimized-indicator i {
|
||||
font-size: 20px;
|
||||
color: #ffc107;
|
||||
display: block;
|
||||
animation: pulse 2s infinite;
|
||||
}
|
||||
|
||||
#minimized-indicator .indicator-text {
|
||||
color: rgba(255, 255, 255, 0.9);
|
||||
font-size: 10px;
|
||||
text-align: center;
|
||||
margin-top: 4px;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.5px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
@keyframes pulse {
|
||||
0%, 100% {
|
||||
opacity: 1;
|
||||
transform: scale(1);
|
||||
}
|
||||
50% {
|
||||
opacity: 0.7;
|
||||
transform: scale(0.95);
|
||||
}
|
||||
}
|
||||
|
||||
/* Module indicator for TAB key reminder */
|
||||
.module-indicator {
|
||||
position: fixed;
|
||||
top: 20px;
|
||||
left: 20px;
|
||||
z-index: 10000;
|
||||
background: rgba(0, 0, 0, 0.85);
|
||||
border: 1px solid rgba(255, 193, 7, 0.4);
|
||||
border-radius: 8px;
|
||||
padding: 12px 16px;
|
||||
padding-bottom: 8px;
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
|
||||
display: none;
|
||||
animation: fadeIn 0.3s ease;
|
||||
min-width: 100px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.module-indicator i {
|
||||
color: #ffc107;
|
||||
font-size: 1.1rem;
|
||||
}
|
||||
|
||||
.module-indicator span {
|
||||
color: rgba(255, 255, 255, 0.9);
|
||||
font-size: 0.875rem;
|
||||
}
|
||||
|
||||
.module-indicator kbd {
|
||||
padding: 2px 6px;
|
||||
border-radius: 4px;
|
||||
font-size: 0.8rem;
|
||||
font-weight: 600;
|
||||
font-family: monospace;
|
||||
}
|
||||
|
||||
/* Progress bar container - integrated into bottom border */
|
||||
.module-indicator-progress-container {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 3px;
|
||||
background: rgba(255, 255, 255, 0.1);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* Progress bar fill - fills from left to right */
|
||||
.module-indicator-progress {
|
||||
height: 100%;
|
||||
width: 0%;
|
||||
background: linear-gradient(90deg, rgba(255, 193, 7, 0.6) 0%, rgba(255, 193, 7, 1) 100%);
|
||||
transition: width 0.1s linear;
|
||||
}
|
||||
@@ -0,0 +1,115 @@
|
||||
Config.Callouts["boat_migrants"] = {
|
||||
|
||||
Enabled = true,
|
||||
CalloutName = "Reports of migrants arriving on a boat",
|
||||
CalloutDescriptions = {
|
||||
"Investigate reports of migrants arriving on a boat; secure the area and ensure their safety.",
|
||||
"Alert: dispatch units to respond to reports of migrants arriving on a boat; provide immediate assistance.",
|
||||
"Units required: respond to reports of a boat carrying migrants and take necessary actions to assist them.",
|
||||
"Notice: check reports of migrants arriving on a boat; implement measures to ensure their wellbeing.",
|
||||
"Alert: respond promptly to reports of migrants arriving on a boat; prioritize their safety and care.",
|
||||
"Incident reported: look into reports of migrants arriving on a boat to provide necessary aid and support.",
|
||||
"Investigate reports of a boat carrying migrants; coordinate with relevant authorities to address the situation.",
|
||||
"Situation alert: address reports of migrants arriving on a boat; ensure the area is secured and help is provided.",
|
||||
"Alert: handle reports of migrants arriving on a boat and follow protocols to ensure their safety and support.",
|
||||
"Response needed: investigate reports of migrants arriving on a boat and take appropriate actions to assist and protect them.",
|
||||
},
|
||||
CalloutUnitsRequired = {
|
||||
description = "Police",
|
||||
policeRequired = true,
|
||||
ambulanceRequired = false,
|
||||
fireRequired = false,
|
||||
towRequired = false,
|
||||
},
|
||||
CalloutLocations = {
|
||||
[1] = vector3(-1417.2120, -1615.8606, 0.1448),
|
||||
[2] = vector3(-1809.3936, -973.8002, 1.9747),
|
||||
[3] = vector3(-2076.4451, -611.0533, 1.3401),
|
||||
[4] = vector3(-3030.3972, -0.8509, 1.7006),
|
||||
[5] = vector3(-3169.9976, 289.5727, 2.1437),
|
||||
[6] = vector3(-3265.2388, 895.5994, -0.4368),
|
||||
[7] = vector3(-3125.7136, 1656.5962, 0.4893),
|
||||
[8] = vector3(-2685.5750, 2533.6912, 0.7223),
|
||||
[9] = vector3(-2393.0715, 2630.3701, -0.0339),
|
||||
[10] = vector3(-1868.3955, 2566.3022, 0.1976),
|
||||
[11] = vector3(-1549.2698, 2626.0557, 1.5337),
|
||||
[12] = vector3(-2553.6880, 3923.9187, 1.6076),
|
||||
[13] = vector3(-2093.0620, 4599.1460, 1.1754),
|
||||
[14] = vector3(-1394.5308, 5285.9351, 0.8501),
|
||||
[15] = vector3(-885.7209, 5840.6069, 0.8044),
|
||||
[16] = vector3(6.6508, 7059.5547, -0.6106),
|
||||
[17] = vector3(3395.8420, 5637.5762, 0.9500),
|
||||
[18] = vector3(2977.9421, 1821.2184, 1.2231),
|
||||
[19] = vector3(2940.1265, 311.0411, 0.7346),
|
||||
[20] = vector3(1601.8865, -2747.1536, 0.9043),
|
||||
},
|
||||
PedChanceToFleeFromPlayer = 0, -- Value between 0 and 100 -> Lower is less chance.
|
||||
PedChanceToAttackPlayer = 0, -- Value between 0 and 100 -> Lower is less chance.
|
||||
PedChanceToSurrender = 0, -- Value between 0 and 100 -> Lower is less chance.
|
||||
PedChanceToObtainWeapons = 0, -- Value between 0 and 100 -> Lower is less chance.
|
||||
PedActionMinimumTimeoutInMs = 0, -- Milliseconds for the minimum timeout time to start the secondary action listed above.
|
||||
PedActionMaximumTimeoutInMs = 1000, -- Milliseconds for the maximum timeout time to start the secondary action. Must be a higher number than the minimum!
|
||||
PedActionOnNoActionFound = "none", -- When no action of the above options is found. It'll perform this action after the set timeout. Options: "none", "attack", "flee", "surrender"
|
||||
PedWeaponData = { -- The ped will be given one randomly selected weapon (in hand) from these weapons if PedChanceToObtainWeapons passed.
|
||||
"weapon_unarmed",
|
||||
},
|
||||
|
||||
client = function(plyPed, pedList, vehicleList, playersList, objectList, propList, fireList, smokeList, calloutDataClient)
|
||||
|
||||
for index, pedNetId in pairs(pedList) do
|
||||
local ped = NetToPed(pedNetId)
|
||||
if DoesEntityExist(ped) then
|
||||
ERS_RequestNetControlForEntity(ped)
|
||||
if not IsPedInAnyBoat(ped) then
|
||||
ERS_SetMovementAnimClipSetToPed(ped, "move_m@injured")
|
||||
TaskWanderStandard(ped, 10.0, 10)
|
||||
else
|
||||
TaskReactAndFleePed(ped, plyPed)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
ERS_CreateTemporaryBlipForEntities(pedList, 30000)
|
||||
|
||||
ERS_PerformTimedActionOnPed(calloutDataClient, pedList)
|
||||
|
||||
end,
|
||||
server = function(request, src, calloutData, pedList, vehicleList, objectList, propList, playersList, fireList, smokeList)
|
||||
|
||||
|
||||
local diameter = 20
|
||||
|
||||
-- Build vehicle
|
||||
local vehModel = "dinghy"
|
||||
local vehType = "boat"
|
||||
local vehCoords = vector3(calloutData.Coordinates.x, calloutData.Coordinates.y, calloutData.Coordinates.z)
|
||||
local vehHeading = math.random(360)
|
||||
local vehNetId = ERS_CreateVehicle(vehModel, vehType, vehCoords, vehHeading)
|
||||
local vehicle = NetworkGetEntityFromNetworkId(vehNetId)
|
||||
table.insert(vehicleList, vehNetId)
|
||||
|
||||
-- Build boat captain
|
||||
local seatIndex = -1
|
||||
local pedModel = ERS_GetRandomModel(Config.randomPeds)
|
||||
local pedCoords = vector3(calloutData.Coordinates.x, calloutData.Coordinates.y, calloutData.Coordinates.z+3.0)
|
||||
local pedHeading = math.random(360)
|
||||
local pedNetId = ERS_CreatePed(pedModel, pedCoords, pedHeading)
|
||||
local ped = NetworkGetEntityFromNetworkId(pedNetId)
|
||||
SetPedIntoVehicle(ped, vehicle, seatIndex)
|
||||
table.insert(pedList, pedNetId)
|
||||
|
||||
-- Build migrant peds
|
||||
local randomAmountOfPeds = math.random(2,10)
|
||||
for i = 0, randomAmountOfPeds do
|
||||
local coords = ERS_GetRandomCoordinateWithinRangeOfCoordinate(calloutData.Coordinates, diameter)
|
||||
local pedModel = ERS_GetRandomModel(Config.randomPeds)
|
||||
local pedCoords = vector3(coords.x, coords.y, coords.z + 1.0)
|
||||
local pedHeading = math.random(360)
|
||||
local pedNetId = ERS_CreatePed(pedModel, pedCoords, pedHeading)
|
||||
local ped = NetworkGetEntityFromNetworkId(pedNetId)
|
||||
table.insert(pedList, pedNetId)
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
}
|
||||
@@ -1,92 +0,0 @@
|
||||
Config.Callouts["roxwood_aggresive_boars"] = {
|
||||
|
||||
Enabled = true,
|
||||
CalloutName = "Aggressive Boars",
|
||||
CalloutDescriptions = {
|
||||
"Respond to a report of aggressive boars attacking a farmer; ensure public safety and coordinate with animal control.",
|
||||
"Alert: wild boars spotted attacking a farmer; deploy units to contain the animals and protect civilians.",
|
||||
"Units needed: emergency call for aggressive boars; focus on securing the area and preventing any harm.",
|
||||
"Notice: boars reported attacking a farmer; act promptly to control the situation and provide assistance.",
|
||||
"Alert: report of aggressive boars; intervention needed to secure the scene and ensure safety.",
|
||||
"Incident reported: boars sighted attacking a farmer; take action to deliver urgent response and support.",
|
||||
"Respond to a situation involving aggressive boars; prioritize public safety and coordinate with wildlife experts.",
|
||||
"Situation alert: boars on the loose; provide immediate assistance and ensure the area is secure.",
|
||||
"Alert: report of boars attacking a farmer; respond swiftly to address the emergency and offer necessary support.",
|
||||
"Response needed: aggressive boars; ensure public safety, provide aid, and secure the area.",
|
||||
},
|
||||
CalloutUnitsRequired = {
|
||||
description = "Police",
|
||||
policeRequired = true,
|
||||
ambulanceRequired = false,
|
||||
fireRequired = false,
|
||||
towRequired = false,
|
||||
},
|
||||
CalloutLocations = {
|
||||
[1] = vector3(-1823.0022, 6998.0410, 34.9726),
|
||||
[2] = vector3(-2387.3379, 7242.6768, 29.0290),
|
||||
[3] = vector3(-2461.5059, 7537.0752, 29.0388),
|
||||
[4] = vector3(-2497.2771, 7169.6704, 29.0752),
|
||||
[5] = vector3(-2538.9504, 7436.2910, 28.8805),
|
||||
},
|
||||
PedChanceToFleeFromPlayer = 0, -- Boars won't flee from the player.
|
||||
PedChanceToAttackPlayer = 100, -- Low chance to attack the player.
|
||||
PedChanceToSurrender = 0, -- Boars won't surrender.
|
||||
PedChanceToObtainWeapons = 0, -- Boars don't use weapons.
|
||||
PedActionMinimumTimeoutInMs = 10000, -- Milliseconds for the minimum timeout time to start the secondary action listed above.
|
||||
PedActionMaximumTimeoutInMs = 15000, -- Milliseconds for the maximum timeout time to start the secondary action. Must be a higher number than the minimum!
|
||||
PedActionOnNoActionFound = "flee",-- When no action of the above options is found. It'll perform this action after the set timeout. Options: "none", "attack", "flee", "surrender"
|
||||
PedWeaponData = { -- The ped will be given one randomly selected weapon (in hand) from these weapons if PedChanceToObtainWeapons passed.
|
||||
"weapon_musket",
|
||||
},
|
||||
|
||||
client = function(plyPed, pedList, vehicleList, playersList, objectList, propList, fireList, smokeList, calloutDataClient)
|
||||
local farmer
|
||||
local boarPedList = {}
|
||||
|
||||
for index, pedNetId in pairs(pedList) do
|
||||
local ped = NetToPed(pedNetId)
|
||||
if DoesEntityExist(ped) then
|
||||
ERS_RequestNetControlForEntity(ped)
|
||||
if index == 1 then
|
||||
farmer = ped
|
||||
ERS_PedEquipWeapon(ped, "weapon_musket", 100)
|
||||
Wait(100)
|
||||
TaskCombatPed(ped, NetToPed(pedList[2]), 0, 16)
|
||||
else
|
||||
TaskCombatPed(ped, farmer, 0, 16)
|
||||
table.insert(boarPedList, pedNetId)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
ERS_CreateTemporaryBlipForEntities(boarPedList, 30000)
|
||||
|
||||
ERS_PerformTimedActionOnPed(calloutDataClient, boarPedList)
|
||||
end,
|
||||
|
||||
server = function(request, src, calloutData, pedList, vehicleList, objectList, propList, playersList, fireList, smokeList)
|
||||
local diameter = 15
|
||||
|
||||
-- Build farmer
|
||||
local farmerModel = "a_m_m_farmer_01"
|
||||
local farmerCoords = vector3(calloutData.Coordinates.x, calloutData.Coordinates.y, calloutData.Coordinates.z+1.0)
|
||||
local farmerHeading = math.random(360)
|
||||
local farmerNetId = ERS_CreatePed(farmerModel, farmerCoords, farmerHeading)
|
||||
local farmer = NetworkGetEntityFromNetworkId(farmerNetId)
|
||||
table.insert(pedList, farmerNetId)
|
||||
|
||||
-- Build boars
|
||||
local boarModel = "a_c_boar"
|
||||
local randomAmountOfBoars = math.random(3, 5) -- Randomize number of boars
|
||||
for i = 1, randomAmountOfBoars do
|
||||
local coords = ERS_GetRandomCoordinateWithinRangeOfCoordinate(calloutData.Coordinates, diameter)
|
||||
local boarCoords = vector3(coords.x, coords.y, coords.z+1.0)
|
||||
local boarHeading = math.random(360)
|
||||
local boarNetId = ERS_CreatePed(boarModel, boarCoords, boarHeading)
|
||||
local boar = NetworkGetEntityFromNetworkId(boarNetId)
|
||||
table.insert(pedList, boarNetId)
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
}
|
||||
@@ -1,84 +0,0 @@
|
||||
Config.Callouts["roxwood_animal_on_road"] = {
|
||||
|
||||
Enabled = true,
|
||||
CalloutName = "Animal on the Road in Roxwood",
|
||||
CalloutDescriptions = {
|
||||
"An unexpected type of animal has appeared on the road, causing a disruption in traffic flow.",
|
||||
"Emergency services have been called to intervene in a situation where an animal is impeding traffic on the road.",
|
||||
"Reports indicate a disturbance on the roadway, with an unidentified creature causing a commotion.",
|
||||
"A peculiar incident has unfolded on the road, requiring immediate attention to ensure public safety.",
|
||||
"Emergency services have been dispatched to address an obstruction on the road, involving an animal.",
|
||||
"A surprising encounter has occurred on the road, with an unknown creature causing a hindrance to traffic.",
|
||||
"Witnesses report an unusual occurrence on the road, with an unidentified animal creating a hazard for motorists.",
|
||||
"An incident has occurred on the road, with an animal posing a potential threat to drivers.",
|
||||
"Emergency services have been alerted to a situation where an unidentified creature is obstructing the roadway.",
|
||||
"Reports suggest an unexpected type of animal on the road, involving an animal that requires immediate assistance.",
|
||||
},
|
||||
CalloutUnitsRequired = {
|
||||
description = "Police, animal rescue.",
|
||||
policeRequired = true,
|
||||
ambulanceRequired = false,
|
||||
fireRequired = false,
|
||||
towRequired = false,
|
||||
},
|
||||
CalloutLocations = {
|
||||
[1] = vector3(-2917.2009, 6687.8828, 24.9933),
|
||||
[2] = vector3(-2385.1338, 6949.2163, 35.3990),
|
||||
[3] = vector3(-1927.2576, 7528.9648, 75.0004),
|
||||
[4] = vector3(-673.5764, 7669.7896, 28.7780),
|
||||
[5] = vector3(-670.4109, 6713.2271, 21.3245),
|
||||
[6] = vector3(-397.3026, 7055.0483, 20.4035),
|
||||
[7] = vector3(-2483.4431, 7576.3521, 28.6643),
|
||||
[8] = vector3(-2060.8218, 8574.8389, 36.1939),
|
||||
[9] = vector3(-2706.7444, 6928.1416, 28.8962),
|
||||
[10] = vector3(-2615.2388, 6572.5176, 24.5263),
|
||||
},
|
||||
PedChanceToFleeFromPlayer = 0, -- Value between 0 and 100 -> Lower is less chance.
|
||||
PedChanceToAttackPlayer = 0, -- Value between 0 and 100 -> Lower is less chance.
|
||||
PedChanceToSurrender = 0, -- Value between 0 and 100 -> Lower is less chance.
|
||||
PedChanceToObtainWeapons = 0, -- Value between 0 and 100 -> Lower is less chance.
|
||||
PedActionMinimumTimeoutInMs = 0, -- Milliseconds for the minimum timeout time to start the secondary action listed above.
|
||||
PedActionMaximumTimeoutInMs = 1000, -- Milliseconds for the maximum timeout time to start the secondary action. Must be a higher number than the minimum!
|
||||
PedActionOnNoActionFound = "none", -- When no action of the above options is found. It'll perform this action after the set timeout. Options: "none", "attack", "flee", "surrender"
|
||||
PedWeaponData = { -- The ped will be given one randomly selected weapon (in hand) from these weapons if PedChanceToObtainWeapons passed.
|
||||
"weapon_unarmed",
|
||||
},
|
||||
|
||||
client = function(plyPed, pedList, vehicleList, playersList, objectList, propList, fireList, smokeList, calloutDataClient)
|
||||
|
||||
for index, pedNetId in pairs(pedList) do
|
||||
local ped = NetToPed(pedNetId)
|
||||
if DoesEntityExist(ped) then
|
||||
ERS_RequestNetControlForEntity(ped)
|
||||
ClearPedTasks(ped)
|
||||
|
||||
if Config.Debug then
|
||||
print("Found animal entity: "..ped)
|
||||
end
|
||||
|
||||
TaskWanderStandard(ped, 10.0, 10)
|
||||
end
|
||||
end
|
||||
|
||||
ERS_CreateTemporaryBlipForEntities(pedList, 15000)
|
||||
--ERS_PerformTimedActionOnPed(calloutDataClient, pedList)
|
||||
|
||||
end,
|
||||
server = function(request, src, calloutData, pedList, vehicleList, objectList, propList, playersList, fireList, smokeList)
|
||||
|
||||
local diameter = 20
|
||||
|
||||
local randomAmountOfAnimals = math.random(1, 8)
|
||||
local randomAnimalPedModel = ERS_GetRandomModel(Config.calloutAnimals)
|
||||
for i = 1, randomAmountOfAnimals do
|
||||
-- Build animals of the same type.
|
||||
local coords = ERS_GetRandomCoordinateWithinRangeOfCoordinate(calloutData.Coordinates, diameter)
|
||||
local animalPedCoords = vector3(coords.x, coords.y, coords.z)
|
||||
local animalPedHeading = math.random(360)
|
||||
local animalPedNetId = ERS_CreatePed(randomAnimalPedModel, animalPedCoords, animalPedHeading)
|
||||
local animalPed = NetworkGetEntityFromNetworkId(animalPedNetId)
|
||||
table.insert(pedList, animalPedNetId)
|
||||
end
|
||||
return true
|
||||
end
|
||||
}
|
||||
@@ -1,102 +0,0 @@
|
||||
Config.Callouts["roxwood_arson"] = {
|
||||
|
||||
Enabled = true,
|
||||
CalloutName = "Reports of Arson in Roxwood",
|
||||
CalloutDescriptions = {
|
||||
"Suspected arson incidents have been reported, requiring immediate response from law enforcement and fire services.",
|
||||
"Urgent assistance needed to address suspected arson, ensuring community safety and property protection.",
|
||||
"Multiple suspected arson cases reported, demanding swift action to prevent further damage and risk.",
|
||||
"Identified arson cases prompt the need for additional resources to investigate and control the situation.",
|
||||
"Emergency services alerted to suspected arson, necessitating coordinated efforts to apprehend those responsible.",
|
||||
"Authorities seek assistance in addressing suspected arson, emphasizing public vigilance and cooperation.",
|
||||
"Additional units required to support law enforcement and fire teams in responding to suspected arson incidents.",
|
||||
"Emergency backup needed to help manage and contain suspected arson, ensuring public safety.",
|
||||
"Responders call for assistance in dealing with suspected arson, highlighting the urgency of the situation.",
|
||||
"Immediate intervention crucial to manage and address suspected arson, safeguarding lives and property.",
|
||||
},
|
||||
CalloutUnitsRequired = {
|
||||
description = "Police, Fire",
|
||||
policeRequired = true,
|
||||
ambulanceRequired = false,
|
||||
fireRequired = true,
|
||||
towRequired = false,
|
||||
},
|
||||
CalloutLocations = {
|
||||
[1] = vector3(-3082.4443, 7910.6416, 54.4692),
|
||||
[2] = vector3(-3083.5991, 7936.8086, 54.1143),
|
||||
[3] = vector3(-3044.8267, 7937.8999, 58.7173),
|
||||
[4] = vector3(-3013.9849, 7916.1396, 58.6186),
|
||||
[5] = vector3(-2541.5210, 7480.6040, 28.7263),
|
||||
[6] = vector3(-2304.5576, 7760.9302, 44.3912),
|
||||
[7] = vector3(-2281.4097, 8151.0815, 34.1373),
|
||||
[8] = vector3(-1140.2708, 8119.0449, 23.1818),
|
||||
[9] = vector3(-416.6748, 7650.4414, 6.3326),
|
||||
[10] = vector3(-341.3544, 7396.8135, 6.4100),
|
||||
},
|
||||
PedChanceToFleeFromPlayer = 50, -- Value between 0 and 100 -> Lower is less chance.
|
||||
PedChanceToAttackPlayer = 50, -- Value between 0 and 100 -> Lower is less chance.
|
||||
PedChanceToSurrender = 10, -- Value between 0 and 100 -> Lower is less chance.
|
||||
PedChanceToObtainWeapons = 60, -- Value between 0 and 100 -> Lower is less chance.
|
||||
PedActionMinimumTimeoutInMs = 5000, -- Milliseconds for the minimum timeout time to start the secondary action listed above.
|
||||
PedActionMaximumTimeoutInMs = 10000, -- Milliseconds for the maximum timeout time to start the secondary action. Must be a higher number than the minimum!
|
||||
PedActionOnNoActionFound = "flee", -- When no action of the above options is found. It'll perform this action after the set timeout. Options: "none", "attack", "flee", "surrender"
|
||||
PedWeaponData = { -- The ped will be given one randomly selected weapon (in hand) from these weapons if PedChanceToObtainWeapons passed.
|
||||
"weapon_knife",
|
||||
"weapon_hammer",
|
||||
"weapon_crowbar",
|
||||
"weapon_bottle",
|
||||
},
|
||||
|
||||
client = function(plyPed, pedList, vehicleList, playersList, objectList, propList, fireList, smokeList, calloutDataClient)
|
||||
|
||||
for index, pedNetId in pairs(pedList) do
|
||||
local ped = NetToPed(pedNetId)
|
||||
if DoesEntityExist(ped) then
|
||||
ERS_RequestNetControlForEntity(ped)
|
||||
TaskSetBlockingOfNonTemporaryEvents(ped, true)
|
||||
Wait(100)
|
||||
ERS_SetPedToFleeFromPlayer(ped)
|
||||
end
|
||||
end
|
||||
|
||||
ERS_CreateTemporaryBlipForEntities(pedList, 15000)
|
||||
|
||||
ERS_PerformTimedActionOnPed(calloutDataClient, pedList)
|
||||
|
||||
end,
|
||||
server = function(request, src, calloutData, pedList, vehicleList, objectList, propList, playersList, fireList, smokeList)
|
||||
|
||||
local diameter = 2
|
||||
|
||||
if UsingSmartFires then
|
||||
-- Full version
|
||||
local fireSize = Config.RandomSmallFireOrSmokeSize[math.random(#Config.RandomSmallFireOrSmokeSize)]
|
||||
local fireType = Config.NormalFireTypes[math.random(#Config.NormalFireTypes)]
|
||||
local fireId = exports['SmartFires']:CreateFire(vector3(calloutData.Coordinates.x, calloutData.Coordinates.y, calloutData.Coordinates.z-0.5), fireSize, fireType)
|
||||
DebugPrint("Created fire with ID: "..fireId)
|
||||
table.insert(fireList, fireId)
|
||||
else
|
||||
-- Lite version
|
||||
local fireSize = Config.RandomSmallFireOrSmokeSize[math.random(#Config.RandomSmallFireOrSmokeSize)]
|
||||
local fireType = "normal"
|
||||
local fireId = exports['SmartFiresLite']:CreateFire(vector3(calloutData.Coordinates.x, calloutData.Coordinates.y, calloutData.Coordinates.z-0.5), fireSize, fireType)
|
||||
DebugPrint("Created fire with SmartFiresLite with ID: "..fireId)
|
||||
table.insert(fireList, fireId)
|
||||
end
|
||||
|
||||
-- Build suspect peds
|
||||
local randomAmountOfSuspects = math.random(3)
|
||||
for i = 1, randomAmountOfSuspects do
|
||||
local coords = ERS_GetRandomCoordinateWithinRangeOfCoordinate(calloutData.Coordinates, diameter)
|
||||
|
||||
local suspectPedModel = ERS_GetRandomModel(Config.randomPeds)
|
||||
local suspectPedCoords = vector3(coords.x, coords.y, coords.z)
|
||||
local suspectPedHeading = math.random(360)
|
||||
local suspectPedNetId = ERS_CreatePed(suspectPedModel, suspectPedCoords, suspectPedHeading)
|
||||
local suspectPed = NetworkGetEntityFromNetworkId(suspectPedNetId)
|
||||
table.insert(pedList, suspectPedNetId)
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
}
|
||||
@@ -1,154 +0,0 @@
|
||||
Config.Callouts["roxwood_bouncer_in_trouble"] = {
|
||||
|
||||
Enabled = true,
|
||||
CalloutName = "Bouncer in Trouble",
|
||||
CalloutDescriptions = {
|
||||
"A bouncer is struggling to control a rowdy crowd at a nightclub, with tensions escalating quickly.",
|
||||
"Security personnel have called for backup as a confrontation with patrons turns violent.",
|
||||
"Reports indicate a bouncer is overwhelmed by a group of unruly individuals at a local bar.",
|
||||
"A nightclub bouncer is facing resistance from aggressive patrons, requiring immediate assistance.",
|
||||
"A disturbance at a bar has led to a bouncer being outnumbered, with the situation deteriorating.",
|
||||
"A bouncer is attempting to defuse a volatile situation at a club, with the potential for violence.",
|
||||
"Witnesses report a bouncer being attacked by patrons, with the need for urgent intervention.",
|
||||
"Security at a venue is under threat as a bouncer deals with a hostile crowd, needing backup.",
|
||||
"A bouncer is in distress as a confrontation with patrons escalates, requiring swift response.",
|
||||
"Emergency services are needed to assist a bouncer in trouble, with the potential for further conflict.",
|
||||
},
|
||||
CalloutUnitsRequired = {
|
||||
description = "Police.",
|
||||
policeRequired = true,
|
||||
ambulanceRequired = false,
|
||||
fireRequired = false,
|
||||
towRequired = false,
|
||||
},
|
||||
CalloutLocations = {
|
||||
[1] = vector3(-605.2895, 7008.7100, 24.2095),
|
||||
[2] = vector3(-626.9119, 6922.6372, 24.3170),
|
||||
[3] = vector3(-330.2892, 7173.5366, 6.4107),
|
||||
},
|
||||
PedChanceToFleeFromPlayer = 20, -- Value between 0 and 100 -> Lower is less chance.
|
||||
PedChanceToAttackPlayer = 50, -- Value between 0 and 100 -> Lower is less chance.
|
||||
PedChanceToSurrender = 20, -- Value between 0 and 100 -> Lower is less chance.
|
||||
PedChanceToObtainWeapons = 25, -- Value between 0 and 100 -> Lower is less chance.
|
||||
PedActionMinimumTimeoutInMs = 10000,-- Milliseconds for the minimum timeout time to start the secondary action listed above.
|
||||
PedActionMaximumTimeoutInMs = 15000,-- Milliseconds for the maximum timeout time to start the secondary action. Must be a higher number than the minimum!
|
||||
PedActionOnNoActionFound = "flee", -- When no action of the above options is found. It'll perform this action after the set timeout. Options: "none", "attack", "flee", "surrender"
|
||||
PedWeaponData = { -- The ped will be given one randomly selected weapon (in hand) from these weapons if PedChanceToObtainWeapons passed.
|
||||
"weapon_knife",
|
||||
"weapon_bat",
|
||||
"weapon_hammer",
|
||||
"weapon_wrench",
|
||||
"weapon_pistol",
|
||||
},
|
||||
|
||||
client = function(plyPed, pedList, vehicleList, playersList, objectList, propList, fireList, smokeList, calloutDataClient)
|
||||
local teamBouncers = {}
|
||||
local teamOthers = {}
|
||||
|
||||
for index, pedNetId in pairs(pedList) do
|
||||
local ped = NetToPed(pedNetId)
|
||||
if DoesEntityExist(ped) then
|
||||
ERS_RequestNetControlForEntity(ped)
|
||||
local model = GetEntityModel(ped)
|
||||
|
||||
-- Check if the ped is a bouncer
|
||||
if model == GetHashKey("s_m_m_bouncer_01") or model == GetHashKey("s_m_m_highsec_01") or model == GetHashKey("s_m_m_highsec_02") then
|
||||
table.insert(teamBouncers, ped)
|
||||
else
|
||||
table.insert(teamOthers, ped)
|
||||
end
|
||||
|
||||
TaskSetBlockingOfNonTemporaryEvents(ped, true)
|
||||
Wait(100)
|
||||
ERS_SpawnConfiguredWeaponForPed(ped, calloutDataClient)
|
||||
end
|
||||
end
|
||||
|
||||
-- Function to make peds flee
|
||||
local function makePedsFlee(peds)
|
||||
for _, ped in pairs(peds) do
|
||||
if DoesEntityExist(ped) and not IsPedDeadOrDying(ped, true) then
|
||||
TaskSmartFleePed(ped, plyPed, 100.0, -1, false, false)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- Monitor and update ped behavior
|
||||
Citizen.CreateThread(function()
|
||||
while true do
|
||||
Citizen.Wait(1000) -- Check every second
|
||||
|
||||
-- Remove dead peds from teams
|
||||
for i = #teamBouncers, 1, -1 do
|
||||
if IsPedDeadOrDying(teamBouncers[i], true) then
|
||||
table.remove(teamBouncers, i)
|
||||
end
|
||||
end
|
||||
|
||||
for i = #teamOthers, 1, -1 do
|
||||
if IsPedDeadOrDying(teamOthers[i], true) then
|
||||
table.remove(teamOthers, i)
|
||||
end
|
||||
end
|
||||
|
||||
-- If the others team or the bouncers team is too small, make them flee (and let bouncers stay)
|
||||
if #teamOthers < 3 or #teamBouncers < 2 then
|
||||
makePedsFlee(teamOthers)
|
||||
break
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
-- Initial combat setup
|
||||
if #teamBouncers > 0 and #teamOthers > 0 then
|
||||
for _, bouncer in pairs(teamBouncers) do
|
||||
local randomTarget = teamOthers[math.random(#teamOthers)]
|
||||
TaskCombatPed(bouncer, randomTarget, 0, 16)
|
||||
if Config.Debug then
|
||||
print("Bouncer "..bouncer.." is attacking ped "..randomTarget)
|
||||
end
|
||||
end
|
||||
|
||||
for _, other in pairs(teamOthers) do
|
||||
local randomTarget = teamBouncers[math.random(#teamBouncers)]
|
||||
TaskCombatPed(other, randomTarget, 0, 16)
|
||||
if Config.Debug then
|
||||
print("Other ped "..other.." is attacking bouncer "..randomTarget)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
ERS_CreateTemporaryBlipForEntities(pedList, 15000)
|
||||
ERS_PerformTimedActionOnPed(calloutDataClient, pedList)
|
||||
end,
|
||||
server = function(request, src, calloutData, pedList, vehicleList, objectList, propList, playersList, fireList, smokeList)
|
||||
local bouncerPedModels = {
|
||||
"s_m_m_bouncer_01",
|
||||
"s_m_m_highsec_01",
|
||||
"s_m_m_highsec_02",
|
||||
}
|
||||
local randomBouncers = math.random(1, 3)
|
||||
for i = 1, randomBouncers do
|
||||
-- Build peds
|
||||
local pedModel = bouncerPedModels[math.random(#bouncerPedModels)]
|
||||
local pedCoords = vector3(calloutData.Coordinates.x, calloutData.Coordinates.y, calloutData.Coordinates.z)
|
||||
local pedHeading = math.random(360)
|
||||
local pedNetId = ERS_CreatePed(pedModel, pedCoords, pedHeading)
|
||||
local ped = NetworkGetEntityFromNetworkId(pedNetId)
|
||||
table.insert(pedList, pedNetId)
|
||||
end
|
||||
|
||||
local randomBrawlers = math.random(2, 8)
|
||||
for i = 1, randomBrawlers do
|
||||
-- Build peds
|
||||
local pedModel = ERS_GetRandomModel(Config.randomPeds)
|
||||
local pedCoords = vector3(calloutData.Coordinates.x, calloutData.Coordinates.y, calloutData.Coordinates.z)
|
||||
local pedHeading = math.random(360)
|
||||
local pedNetId = ERS_CreatePed(pedModel, pedCoords, pedHeading)
|
||||
local ped = NetworkGetEntityFromNetworkId(pedNetId)
|
||||
table.insert(pedList, pedNetId)
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
}
|
||||
@@ -1,72 +0,0 @@
|
||||
Config.Callouts["roxwood_bridge_blockade"] = {
|
||||
|
||||
Enabled = true,
|
||||
CalloutName = "Bridge blockade",
|
||||
CalloutDescriptions = {
|
||||
"Emergency: respond to reports of a bridge blockade; ensure the area is cleared to prevent accidents.",
|
||||
"Urgent alert: dispatch units to address a bridge blockade; remove debris to ensure safe passage for vehicles.",
|
||||
"Critical response required: attend to reports of a bridge blockade; secure the area and prevent further incidents.",
|
||||
"Notice: check reports of a bridge blockade; take immediate action to clear debris and restore road safety.",
|
||||
"Alert: respond promptly to reports of a bridge blockade; prioritize the safety of motorists and clear the obstruction.",
|
||||
"Incident reported: investigate reports of a bridge blockade; coordinate with local authorities to manage the situation.",
|
||||
"Immediate action: address reports of a bridge blockade; use appropriate methods to clear the area and ensure safety.",
|
||||
"Situation alert: assist with clearing a bridge blockade; ensure the area is safe for traffic and pedestrians.",
|
||||
"Emergency response: handle reports of a bridge blockade and follow protocols to remove debris and ensure road safety.",
|
||||
"Response needed: investigate reports of a bridge blockade urgently; take appropriate actions to prevent accidents and ensure clear passage.",
|
||||
},
|
||||
CalloutUnitsRequired = {
|
||||
description = "Police.",
|
||||
policeRequired = true,
|
||||
ambulanceRequired = false,
|
||||
fireRequired = false,
|
||||
towRequired = false,
|
||||
},
|
||||
CalloutLocations = {
|
||||
[1] = vector3(-2015.0530, 7387.4570, 53.4759),
|
||||
[2] = vector3(-1930.3730, 7569.9995, 81.9424),
|
||||
[3] = vector3(-2857.5974, 8359.9668, 43.2680),
|
||||
[4] = vector3(-652.4728, 6653.6875, 20.9940),
|
||||
[5] = vector3(-1568.6243, 6724.4087, 17.7642),
|
||||
},
|
||||
PedChanceToFleeFromPlayer = 0, -- Value between 0 and 100 -> Lower is less chance.
|
||||
PedChanceToAttackPlayer = 0, -- Value between 0 and 100 -> Lower is less chance.
|
||||
PedChanceToSurrender = 0, -- Value between 0 and 100 -> Lower is less chance.
|
||||
PedChanceToObtainWeapons = 0, -- Value between 0 and 100 -> Lower is less chance.
|
||||
PedActionMinimumTimeoutInMs = 0, -- Milliseconds for the minimum timeout time to start the secondary action listed above.
|
||||
PedActionMaximumTimeoutInMs = 1000, -- Milliseconds for the maximum timeout time to start the secondary action. Must be a higher number than the minimum!
|
||||
PedActionOnNoActionFound = "none", -- When no action of the above options is found. It'll perform this action after the set timeout. Options: "none", "attack", "flee", "surrender"
|
||||
PedWeaponData = { -- The ped will be given one randomly selected weapon (in hand) from these weapons if PedChanceToObtainWeapons passed.
|
||||
"weapon_unarmed",
|
||||
},
|
||||
|
||||
client = function(plyPed, pedList, vehicleList, playersList, objectList, propList, fireList, smokeList, calloutDataClient)
|
||||
for index, objNetId in pairs(objectList) do
|
||||
local obj = NetToObj(objNetId)
|
||||
if DoesEntityExist(obj) then
|
||||
ERS_RequestNetControlForEntity(obj)
|
||||
PlaceObjectOnGroundProperly(obj)
|
||||
end
|
||||
end
|
||||
ERS_CreateTemporaryBlipForEntities(objectList, 30000)
|
||||
end,
|
||||
server = function(request, src, calloutData, pedList, vehicleList, objectList, propList, playersList, fireList, smokeList)
|
||||
local diameter = 10
|
||||
-- Build objects
|
||||
local bridgeBlockObjects = {"prop_rub_scrap_06", "prop_tree_fallen_02", "prop_rub_pile_02", "prop_rub_pile_01", "prop_pile_dirt_04", "prop_pile_dirt_02", "prop_pipe_single_01"}
|
||||
local randomAmountOfObjects = math.random(5)
|
||||
for i = 1, randomAmountOfObjects do
|
||||
local coords = ERS_GetRandomCoordinateWithinRangeOfCoordinate(calloutData.Coordinates, diameter)
|
||||
local objModel = ERS_GetRandomModel(bridgeBlockObjects)
|
||||
local objCoords = vector3(coords.x, coords.y, coords.z)
|
||||
local objHeading = math.random(360)
|
||||
local objNetId = ERS_CreateObject(objModel, objCoords, objHeading)
|
||||
if objNetId then
|
||||
local obj = NetworkGetEntityFromNetworkId(objNetId)
|
||||
table.insert(objectList, objNetId)
|
||||
else
|
||||
DebugPrint("^1ERROR ^7Could not create object: "..objModel)
|
||||
end
|
||||
end
|
||||
return true
|
||||
end
|
||||
}
|
||||
@@ -1,95 +0,0 @@
|
||||
Config.Callouts["roxwood_crop_fire"] = {
|
||||
Enabled = true,
|
||||
CalloutName = "Roxwood Crop Fire",
|
||||
CalloutDescriptions = {
|
||||
"Reports of a combine harvester malfunction causing a rapidly spreading wheat field fire.",
|
||||
"Lightning strike has ignited multiple dry crop fields, threatening nearby farm structures.",
|
||||
"Agricultural equipment sparked a fire in drought-affected corn fields, requiring immediate response.",
|
||||
"Burning embers from a controlled burn have spread to adjacent crop fields.",
|
||||
"Chemical fertilizer storage caught fire near valuable crop fields, situation escalating.",
|
||||
"Electrical fault in irrigation system has triggered a fire in the surrounding crop fields.",
|
||||
"Severe drought conditions have led to spontaneous combustion in hay storage, threatening nearby crops.",
|
||||
"Farm workers report uncontrolled fire spreading through mature wheat fields during harvest.",
|
||||
"Mechanical failure in grain silo ventilation system caused fire to spread to surrounding crops.",
|
||||
"Emergency response needed for crop fire threatening multiple agricultural structures and equipment.",
|
||||
},
|
||||
CalloutUnitsRequired = {
|
||||
description = "Police, Fire.",
|
||||
policeRequired = true,
|
||||
ambulanceRequired = false,
|
||||
fireRequired = true,
|
||||
towRequired = false,
|
||||
},
|
||||
CalloutLocations = {
|
||||
[1] = vector3(-2399.7097, 7358.4756, 29.0479),
|
||||
[2] = vector3(-2487.0852, 7449.9502, 29.0479),
|
||||
[3] = vector3(-2494.1135, 7374.3760, 29.0479),
|
||||
[4] = vector3(-2517.3569, 7199.2168, 29.0479),
|
||||
[5] = vector3(-2652.8608, 7139.6714, 29.0479),
|
||||
[6] = vector3(-2579.2705, 7414.2432, 29.0479),
|
||||
[7] = vector3(-2398.9187, 7448.2280, 29.0479),
|
||||
[8] = vector3(-2344.8552, 7197.0410, 29.0479),
|
||||
[9] = vector3(-2189.1917, 7144.0063, 29.0479),
|
||||
[10] = vector3(-2502.3936, 7176.9692, 29.0479),
|
||||
},
|
||||
PedChanceToFleeFromPlayer = 0, -- Value between 0 and 100 -> Lower is less chance.
|
||||
PedChanceToAttackPlayer = 0, -- Value between 0 and 100 -> Lower is less chance.
|
||||
PedChanceToSurrender = 0, -- Value between 0 and 100 -> Lower is less chance.
|
||||
PedChanceToObtainWeapons = 0, -- Value between 0 and 100 -> Lower is less chance.
|
||||
PedActionMinimumTimeoutInMs = 0, -- Milliseconds for the minimum timeout time to start the secondary action listed above.
|
||||
PedActionMaximumTimeoutInMs = 1000, -- Milliseconds for the maximum timeout time to start the secondary action. Must be a higher number than the minimum!
|
||||
PedActionOnNoActionFound = "none", -- When no action of the above options is found. It'll perform this action after the set timeout. Options: "none", "attack", "flee", "surrender"
|
||||
PedWeaponData = { -- The ped will be given one randomly selected weapon (in hand) from these weapons if PedChanceToObtainWeapons passed.
|
||||
"weapon_unarmed",
|
||||
},
|
||||
client = function(plyPed, pedList, vehicleList, playersList, objectList, propList, fireList, smokeList, calloutDataClient)
|
||||
|
||||
for index, objNetId in pairs(objectList) do
|
||||
local obj = NetToObj(objNetId)
|
||||
if DoesEntityExist(obj) then
|
||||
ERS_RequestNetControlForEntity(obj)
|
||||
PlaceObjectOnGroundProperly(obj)
|
||||
end
|
||||
end
|
||||
|
||||
end,
|
||||
server = function(request, src, calloutData, pedList, vehicleList, objectList, propList, playersList, fireList, smokeList)
|
||||
|
||||
local diameter = 30
|
||||
|
||||
-- Build Fires & smoke
|
||||
local randomAmountOfFires = math.random(10)
|
||||
for i = 1, randomAmountOfFires do
|
||||
local coords = ERS_GetRandomCoordinateWithinRangeOfCoordinate(calloutData.Coordinates, diameter)
|
||||
if UsingSmartFires then
|
||||
-- Full version
|
||||
local fireSize = Config.RandomLargeFireOrSmokeSize[math.random(#Config.RandomLargeFireOrSmokeSize)]
|
||||
local fireType = Config.NormalFireTypes[math.random(#Config.NormalFireTypes)]
|
||||
local fireId = exports['SmartFires']:CreateFire(vector3(coords.x, coords.y, coords.z+0.6), fireSize, fireType)
|
||||
DebugPrint("Created fire with ID: "..fireId)
|
||||
table.insert(fireList, fireId)
|
||||
|
||||
local smokeSize = Config.RandomMediumFireOrSmokeSize[math.random(#Config.RandomMediumFireOrSmokeSize)]
|
||||
local smokeType = Config.AllSmokeTypes[math.random(#Config.AllSmokeTypes)]
|
||||
local smokeId = exports['SmartFires']:CreateSmoke(vector3(coords.x, coords.y, coords.z-0.5), smokeSize, smokeType)
|
||||
DebugPrint("Created smoke particle with ID: "..smokeId)
|
||||
table.insert(smokeList, smokeId)
|
||||
else
|
||||
-- Lite version
|
||||
local fireSize = Config.RandomLargeFireOrSmokeSize[math.random(#Config.RandomLargeFireOrSmokeSize)]
|
||||
local fireType = "normal"
|
||||
local fireId = exports['SmartFiresLite']:CreateFire(vector3(coords.x, coords.y, coords.z+0.6), fireSize, fireType)
|
||||
DebugPrint("Created fire with SmartFiresLite with ID: "..fireId)
|
||||
table.insert(fireList, fireId)
|
||||
|
||||
local smokeSize = Config.RandomMediumFireOrSmokeSize[math.random(#Config.RandomMediumFireOrSmokeSize)]
|
||||
local smokeType = "normal"
|
||||
local smokeId = exports['SmartFiresLite']:CreateSmoke(vector3(coords.x, coords.y, coords.z-0.5), smokeSize, smokeType)
|
||||
DebugPrint("Created smoke particle with ID: "..smokeId)
|
||||
table.insert(smokeList, smokeId)
|
||||
end
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
}
|
||||
@@ -1,113 +0,0 @@
|
||||
Config.Callouts["roxwood_drug_lab_incident"] = {
|
||||
|
||||
Enabled = true,
|
||||
CalloutName = "Drug Lab Incident",
|
||||
CalloutDescriptions = {
|
||||
"Emergency response needed at the drug lab; individual requiring immediate medical attention.",
|
||||
"Alert: medical emergency reported at drug lab facilities; units requested for immediate response.",
|
||||
"Units needed: incident reported at drug lab involving an injured person.",
|
||||
"Emergency situation at drug lab; medical assistance required for lab visitor.",
|
||||
"Alert: drug lab incident in progress; medical response team needed on scene.",
|
||||
"First responders requested at drug lab location; medical emergency reported.",
|
||||
"Respond to drug lab emergency; coordinate with on-site staff for immediate assistance.",
|
||||
"Situation alert: medical incident at drug lab facilities requiring urgent response.",
|
||||
"Emergency services needed at drug lab; injured person requiring immediate attention.",
|
||||
"Response needed: drug lab incident involving injured visitor; medical assistance required.",
|
||||
},
|
||||
CalloutUnitsRequired = {
|
||||
description = "Police, Ambulance, Fire.",
|
||||
policeRequired = true,
|
||||
ambulanceRequired = true,
|
||||
fireRequired = true,
|
||||
towRequired = false,
|
||||
},
|
||||
CalloutLocations = {
|
||||
[1] = vector3(-2281.0774, 8149.1436, 31.2439),
|
||||
[2] = vector3(-2280.4634, 8029.7676, 34.1530),
|
||||
[3] = vector3(-3075.2825, 7893.6514, 56.5999),
|
||||
},
|
||||
PedChanceToFleeFromPlayer = 30, -- Value between 0 and 100 -> Lower is less chance.
|
||||
PedChanceToAttackPlayer = 30, -- Value between 0 and 100 -> Lower is less chance.
|
||||
PedChanceToSurrender = 30, -- Value between 0 and 100 -> Lower is less chance.
|
||||
PedChanceToObtainWeapons = 30, -- Value between 0 and 100 -> Lower is less chance.
|
||||
PedActionMinimumTimeoutInMs = 0, -- Milliseconds for the minimum timeout time to start the secondary action listed above.
|
||||
PedActionMaximumTimeoutInMs = 1000, -- Milliseconds for the maximum timeout time to start the secondary action. Must be a higher number than the minimum!
|
||||
PedActionOnNoActionFound = "none", -- When no action of the above options is found. It'll perform this action after the set timeout. Options: "none", "attack", "flee", "surrender"
|
||||
PedWeaponData = { -- The ped will be given one randomly selected weapon (in hand) from these weapons if PedChanceToObtainWeapons passed.
|
||||
"weapon_pistol",
|
||||
},
|
||||
|
||||
client = function(plyPed, pedList, vehicleList, playersList, objectList, propList, fireList, smokeList, calloutDataClient)
|
||||
|
||||
for index, pedNetId in pairs(pedList) do
|
||||
local ped = NetToPed(pedNetId)
|
||||
if DoesEntityExist(ped) then
|
||||
ERS_RequestNetControlForEntity(ped)
|
||||
ERS_SetPedAsDrunkPed(ped)
|
||||
ERS_ApplyBloodToPed(ped)
|
||||
ERS_SetPedToFleeFromPlayer(ped)
|
||||
end
|
||||
end
|
||||
|
||||
ERS_CreateTemporaryBlipForEntities(pedList, 15000)
|
||||
ERS_PerformTimedActionOnPed(calloutDataClient, pedList)
|
||||
|
||||
end,
|
||||
server = function(request, src, calloutData, pedList, vehicleList, objectList, propList, playersList, fireList, smokeList)
|
||||
|
||||
-- Build peds
|
||||
local diameter = 1.5
|
||||
local randomAmountOfWorkers = math.random(1, 3)
|
||||
local drugLabWorkerPedModels = {"mp_f_cocaine_01", "mp_f_meth_01", "mp_m_meth_01", "mp_m_cocaine_01"}
|
||||
for i = 1, randomAmountOfWorkers do
|
||||
local coords = ERS_GetRandomCoordinateWithinRangeOfCoordinate(calloutData.Coordinates, diameter)
|
||||
local pedModel = drugLabWorkerPedModels[math.random(1, #drugLabWorkerPedModels)]
|
||||
local pedCoords = vector3(coords.x, coords.y, coords.z+1.0)
|
||||
local pedHeading = math.random(360)
|
||||
local pedNetId = ERS_CreatePed(pedModel, pedCoords, pedHeading)
|
||||
local ped = NetworkGetEntityFromNetworkId(pedNetId)
|
||||
table.insert(pedList, pedNetId)
|
||||
end
|
||||
|
||||
-- Build a small sized fire
|
||||
if UsingSmartFires then
|
||||
-- Full version
|
||||
local fireSize = Config.RandomSmallFireOrSmokeSize[math.random(#Config.RandomSmallFireOrSmokeSize)]
|
||||
local fireType = Config.NormalFireTypes[math.random(#Config.NormalFireTypes)]
|
||||
local fireId = exports['SmartFires']:CreateFire(vector3(calloutData.Coordinates.x, calloutData.Coordinates.y, calloutData.Coordinates.z-0.5), fireSize, fireType)
|
||||
DebugPrint("Created fire with ID: "..fireId)
|
||||
table.insert(fireList, fireId)
|
||||
|
||||
-- Build smoke
|
||||
local chanceOnASmoke = 50
|
||||
if math.random(1, 100) <= chanceOnASmoke then
|
||||
local smokeSize = Config.RandomSmallFireOrSmokeSize[math.random(#Config.RandomSmallFireOrSmokeSize)]
|
||||
local smokeType = Config.AllSmokeTypes[math.random(#Config.AllSmokeTypes)]
|
||||
local smokeId = exports['SmartFires']:CreateSmoke(vector3(calloutData.Coordinates.x, calloutData.Coordinates.y, calloutData.Coordinates.z-0.5), smokeSize, smokeType)
|
||||
|
||||
DebugPrint("Created smoke with ID: "..smokeId)
|
||||
table.insert(smokeList, smokeId)
|
||||
end
|
||||
else
|
||||
-- Lite version
|
||||
local fireSize = Config.RandomSmallFireOrSmokeSize[math.random(#Config.RandomSmallFireOrSmokeSize)]
|
||||
local fireType = "normal"
|
||||
local fireId = exports['SmartFiresLite']:CreateFire(vector3(calloutData.Coordinates.x, calloutData.Coordinates.y, calloutData.Coordinates.z-0.5), fireSize, fireType)
|
||||
DebugPrint("Created fire with SmartFiresLite with ID: "..fireId)
|
||||
table.insert(fireList, fireId)
|
||||
|
||||
-- Build smoke
|
||||
local chanceOnASmoke = 50
|
||||
if math.random(1, 100) <= chanceOnASmoke then
|
||||
local smokeSize = Config.RandomSmallFireOrSmokeSize[math.random(#Config.RandomSmallFireOrSmokeSize)]
|
||||
local smokeType = "normal"
|
||||
local smokeId = exports['SmartFiresLite']:CreateSmoke(vector3(calloutData.Coordinates.x, calloutData.Coordinates.y, calloutData.Coordinates.z-0.5), smokeSize, smokeType)
|
||||
|
||||
DebugPrint("Created smoke with ID: "..smokeId)
|
||||
table.insert(smokeList, smokeId)
|
||||
end
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
}
|
||||
@@ -1,112 +0,0 @@
|
||||
Config.Callouts["roxwood_gas_station_robbery"] = {
|
||||
|
||||
Enabled = true,
|
||||
CalloutName = "Roxwood Gas Station Robbery",
|
||||
CalloutDescriptions = {
|
||||
"Respond to a report of an armed robbery at a gas station; secure the area and apprehend the suspects.",
|
||||
"Alert: armed robbery in progress at a gas station; deploy units to the location and ensure public safety.",
|
||||
"Units needed: report of a robbery involving multiple armed suspects; focus on securing the scene and detaining the suspects.",
|
||||
"Notice: armed robbery reported at a gas station; act promptly to control the situation and prevent harm.",
|
||||
"Alert: report of an armed robbery; intervention needed to apprehend the suspects and ensure safety.",
|
||||
"Incident reported: armed robbery at a gas station; take action to secure the premises and protect bystanders.",
|
||||
"Respond to a situation involving an armed robbery; prioritize public safety and coordinate with law enforcement.",
|
||||
"Situation alert: armed robbery in progress; secure the area and detain the suspects.",
|
||||
"Alert: report of a robbery with weapons; respond swiftly to address the situation and ensure safety.",
|
||||
"Response needed: armed robbery; secure the area, apprehend the suspects, and restore order.",
|
||||
},
|
||||
CalloutUnitsRequired = {
|
||||
description = "Police, Ambulance.",
|
||||
policeRequired = true,
|
||||
ambulanceRequired = true,
|
||||
fireRequired = false,
|
||||
towRequired = false,
|
||||
},
|
||||
CalloutLocations = {
|
||||
[1] = vector3(-1228.4095, 6927.7363, 20.4751),
|
||||
[2] = vector3(-522.2498, 7560.3276, 6.5205),
|
||||
},
|
||||
PedChanceToFleeFromPlayer = 50, -- Value between 0 and 100 -> Lower is less chance.
|
||||
PedChanceToAttackPlayer = 50, -- Value between 0 and 100 -> Lower is less chance.
|
||||
PedChanceToSurrender = 20, -- Value between 0 and 100 -> Lower is less chance.
|
||||
PedChanceToObtainWeapons = 100, -- Value between 0 and 100 -> Lower is less chance.
|
||||
PedActionMinimumTimeoutInMs = 10000, -- Milliseconds for the minimum timeout time to start the secondary action listed above.
|
||||
PedActionMaximumTimeoutInMs = 15000, -- Milliseconds for the maximum timeout time to start the secondary action. Must be a higher number than the minimum!
|
||||
PedActionOnNoActionFound = "attack", -- When no action of the above options is found. It'll perform this action after the set timeout. Options: "none", "attack", "flee", "surrender"
|
||||
PedWeaponData = { -- The ped will be given one randomly selected weapon (in hand) from these weapons if PedChanceToObtainWeapons passed.
|
||||
"weapon_pistol",
|
||||
},
|
||||
|
||||
client = function(plyPed, pedList, vehicleList, playersList, objectList, propList, fireList, smokeList, calloutDataClient)
|
||||
|
||||
local plyGroupHash = GetPedRelationshipGroupHash(plyPed)
|
||||
local retval, suspectGroupHash = AddRelationshipGroup("SUSPECT_GROUP_HASH")
|
||||
local victim
|
||||
local suspectPedList = {}
|
||||
|
||||
for index, pedNetId in pairs(pedList) do
|
||||
local ped = NetToPed(pedNetId)
|
||||
if DoesEntityExist(ped) then
|
||||
ERS_RequestNetControlForEntity(ped)
|
||||
if index == 1 then
|
||||
victim = ped
|
||||
ERS_ClearPedTasksAndBlockEvents(ped)
|
||||
Wait(100)
|
||||
TaskHandsUp(ped, -1, 0, -1, true)
|
||||
else
|
||||
SetPedRelationshipGroupHash(ped, suspectGroupHash)
|
||||
SetEntityCanBeDamagedByRelationshipGroup(ped, false, suspectGroupHash)
|
||||
SetRelationshipBetweenGroups(5, suspectGroupHash, plyGroupHash)
|
||||
SetRelationshipBetweenGroups(5, plyGroupHash, suspectGroupHash)
|
||||
|
||||
ERS_ClearPedTasksAndBlockEvents(ped)
|
||||
ERS_SpawnConfiguredWeaponForPed(ped, calloutDataClient)
|
||||
Wait(100)
|
||||
TaskAimGunAtEntity(ped, victim, -1, false)
|
||||
table.insert(suspectPedList, pedNetId)
|
||||
|
||||
Citizen.CreateThread(function()
|
||||
local randomTime = math.random(5000, 9000)
|
||||
Citizen.Wait(randomTime)
|
||||
local chanceToShoot = math.random(1, 100)
|
||||
if chanceToShoot <= 50 then
|
||||
TaskShootAtEntity(ped, victim, -1, false)
|
||||
else
|
||||
TaskSmartFleePed(ped, plyPed, 10000, -1, false)
|
||||
end
|
||||
end)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
ERS_CreateTemporaryBlipForEntities(suspectPedList, 15000)
|
||||
|
||||
ERS_PerformTimedActionOnPed(calloutDataClient, suspectPedList)
|
||||
|
||||
end,
|
||||
server = function(request, src, calloutData, pedList, vehicleList, objectList, propList, playersList, fireList, smokeList)
|
||||
|
||||
local diameter = 15
|
||||
|
||||
-- Build victim
|
||||
local pedModel = ERS_GetRandomModel(Config.randomPeds)
|
||||
local pedCoords = vector3(calloutData.Coordinates.x, calloutData.Coordinates.y, calloutData.Coordinates.z+1.0)
|
||||
local pedHeading = math.random(360)
|
||||
local pedNetId = ERS_CreatePed(pedModel, pedCoords, pedHeading)
|
||||
local ped = NetworkGetEntityFromNetworkId(pedNetId)
|
||||
table.insert(pedList, pedNetId)
|
||||
|
||||
-- Build suspects
|
||||
local randomAmountOfSuspects = math.random(2, 4) -- Randomize number of suspects
|
||||
for i = 1, randomAmountOfSuspects do
|
||||
local coords = ERS_GetRandomCoordinateWithinRangeOfCoordinate(calloutData.Coordinates, diameter)
|
||||
local pedModel = ERS_GetRandomModel(Config.randomPeds)
|
||||
local pedCoords = vector3(coords.x, coords.y, coords.z+1.0)
|
||||
local pedHeading = math.random(360)
|
||||
local pedNetId = ERS_CreatePed(pedModel, pedCoords, pedHeading)
|
||||
local ped = NetworkGetEntityFromNetworkId(pedNetId)
|
||||
table.insert(pedList, pedNetId)
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
}
|
||||
@@ -1,117 +0,0 @@
|
||||
Config.Callouts["roxwood_illegal_camping"] = {
|
||||
|
||||
Enabled = true,
|
||||
CalloutName = "Illegal Camping",
|
||||
CalloutDescriptions = {
|
||||
"Investigate reports of illegal camping in a restricted area; ensure compliance with local regulations.",
|
||||
"Alert: dispatch units to handle reports of unauthorized camping; assess environmental impact.",
|
||||
"Units required: respond to reports of illegal camping and evaluate potential safety hazards.",
|
||||
"Notice: check reports of campers setting up in prohibited zones; enforce park rules.",
|
||||
"Alert: respond promptly to reports of unauthorized camping; prioritize public safety and environmental protection.",
|
||||
"Incident reported: look into reports of illegal camping activities to understand the situation.",
|
||||
"Investigate reports of campers in restricted areas; coordinate with park authorities and secure the site.",
|
||||
"Situation alert: address reports of illegal camping; work with local enforcement to resolve the issue.",
|
||||
"Alert: handle reports of unauthorized camping and adhere to protocols for potential environmental hazards.",
|
||||
"Response needed: investigate reports of illegal camping and take steps to ensure compliance with regulations.",
|
||||
},
|
||||
CalloutUnitsRequired = {
|
||||
description = "Police",
|
||||
policeRequired = true,
|
||||
ambulanceRequired = false,
|
||||
fireRequired = false,
|
||||
towRequired = false,
|
||||
},
|
||||
CalloutLocations = {
|
||||
[1] = vector3(-2968.4868, 8348.0039, 43.2270),
|
||||
[2] = vector3(-2376.2881, 7808.8652, 33.1581),
|
||||
[3] = vector3(-2710.9854, 7801.0586, 46.5524),
|
||||
[4] = vector3(-3067.7266, 7109.3135, 42.5468),
|
||||
[5] = vector3(-3676.9055, 6168.9692, 24.5723),
|
||||
[6] = vector3(-3588.0854, 7165.6846, 46.3299),
|
||||
[7] = vector3(-3312.8560, 8835.7363, 36.2966),
|
||||
[8] = vector3(-1284.6665, 8242.3164, 12.2473),
|
||||
[9] = vector3(-1490.4974, -262.6434, 50.2380),
|
||||
[10] = vector3(-2220.6472, 7570.6499, 56.8878),
|
||||
},
|
||||
PedChanceToFleeFromPlayer = 10, -- Value between 0 and 100 -> Lower is less chance.
|
||||
PedChanceToAttackPlayer = 10, -- Value between 0 and 100 -> Lower is less chance.
|
||||
PedChanceToSurrender = 50, -- Value between 0 and 100 -> Lower is less chance.
|
||||
PedChanceToObtainWeapons = 10, -- Value between 0 and 100 -> Lower is less chance.
|
||||
PedActionMinimumTimeoutInMs = 10000, -- Milliseconds for the minimum timeout time to start the secondary action listed above.
|
||||
PedActionMaximumTimeoutInMs = 15000, -- Milliseconds for the maximum timeout time to start the secondary action. Must be a higher number than the minimum!
|
||||
PedActionOnNoActionFound = "none", -- When no action of the above options is found. It'll perform this action after the set timeout. Options: "none", "attack", "flee", "surrender"
|
||||
PedWeaponData = { -- The ped will be given one randomly selected weapon (in hand) from these weapons if PedChanceToObtainWeapons passed.
|
||||
"weapon_knife",
|
||||
},
|
||||
|
||||
client = function(plyPed, pedList, vehicleList, playersList, objectList, propList, fireList, smokeList, calloutDataClient)
|
||||
|
||||
local vehicle
|
||||
local driver
|
||||
|
||||
for index, vehNetId in pairs(vehicleList) do
|
||||
local veh = NetToVeh(vehNetId)
|
||||
if DoesEntityExist(veh) then
|
||||
vehicle = veh
|
||||
ERS_RequestNetControlForEntity(vehicle)
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
for index, pedNetId in pairs(pedList) do
|
||||
local ped = NetToPed(pedNetId)
|
||||
if DoesEntityExist(ped) then
|
||||
if index == 1 then
|
||||
driver = ped
|
||||
ERS_RequestNetControlForEntity(driver)
|
||||
TaskSetBlockingOfNonTemporaryEvents(driver, true)
|
||||
ERS_SetPedAsDrunkPed(driver)
|
||||
else
|
||||
-- Play a smoking weed animation on them
|
||||
ERS_SetPedAsDrunkPed(ped)
|
||||
local scenario = ERS_SelectRandomSmokeScenario()
|
||||
TaskStartScenarioInPlace(ped, scenario, 0, true)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
ERS_CreateTemporaryBlipForEntities(vehicleList, 15000)
|
||||
ERS_CreateTemporaryBlipForEntities(pedList, 15000)
|
||||
|
||||
end,
|
||||
server = function(request, src, calloutData, pedList, vehicleList, objectList, propList, playersList, fireList, smokeList)
|
||||
|
||||
-- Build vehicle
|
||||
local campingVehicles = {"camper", "journey", "paradise"}
|
||||
local vehModel = ERS_GetRandomModel(campingVehicles)
|
||||
local vehType = "automobile"
|
||||
local vehCoords = vector3(calloutData.Coordinates.x, calloutData.Coordinates.y, calloutData.Coordinates.z)
|
||||
local vehHeading = math.random(360)
|
||||
local vehNetId = ERS_CreateVehicle(vehModel, vehType, vehCoords, vehHeading)
|
||||
local vehicle = NetworkGetEntityFromNetworkId(vehNetId)
|
||||
table.insert(vehicleList, vehNetId)
|
||||
|
||||
-- Build ped
|
||||
local pedModel = ERS_GetRandomModel(Config.randomPeds)
|
||||
local pedCoords = vector3(calloutData.Coordinates.x, calloutData.Coordinates.y, calloutData.Coordinates.z+3.0)
|
||||
local pedHeading = math.random(360)
|
||||
local pedNetId = ERS_CreatePed(pedModel, pedCoords, pedHeading)
|
||||
local ped = NetworkGetEntityFromNetworkId(pedNetId)
|
||||
SetPedIntoVehicle(ped, vehicle, -1)
|
||||
table.insert(pedList, pedNetId)
|
||||
|
||||
-- Build camping friends
|
||||
local amountOfCampingFriends = math.random(1, 5)
|
||||
for i = 1, amountOfCampingFriends do
|
||||
local diameter = 20.0
|
||||
local coords = ERS_GetRandomCoordinateWithinRangeOfCoordinate(calloutData.Coordinates, diameter)
|
||||
local companionModel = ERS_GetRandomModel(Config.randomPeds)
|
||||
local companionCoords = vector3(coords.x, coords.y, coords.z+3.0)
|
||||
local companionHeading = math.random(360)
|
||||
local companionNetId = ERS_CreatePed(companionModel, companionCoords, companionHeading)
|
||||
table.insert(pedList, companionNetId)
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
}
|
||||
@@ -1,91 +0,0 @@
|
||||
Config.Callouts["roxwood_miner_panic_alarm"] = {
|
||||
|
||||
Enabled = true,
|
||||
CalloutName = "Panic alarm at the mine",
|
||||
CalloutDescriptions = {
|
||||
"Emergency responders are required to investigate the source of the panic alarm at the mine.",
|
||||
"Authorities report panic alarm at the mine, demanding immediate investigation to ensure safety.",
|
||||
"Panic alarm has been reported at the mine, necessitating urgent action to identify and address the cause.",
|
||||
"Critical situation with panic alarm at the mine; additional units are needed for support.",
|
||||
"Immediate response needed to address panic alarm at the mine posing potential danger.",
|
||||
"Panic alarm has been detected at the mine, posing a possible threat; reinforcements are necessary to investigate and contain any hazards.",
|
||||
"Emergency crews are requesting backup to assist in investigating and managing panic alarm at the mine.",
|
||||
"An urgent call for help has been issued to handle panic alarm at the mine and ensure safety.",
|
||||
"Responders are on the scene of panic alarm at the mine and need extra support to stabilize the situation.",
|
||||
"A serious emergency involving panic alarm at the mine demands swift action to prevent a potential catastrophic outcome.",
|
||||
},
|
||||
CalloutUnitsRequired = {
|
||||
description = "Police, Fire.",
|
||||
policeRequired = true,
|
||||
ambulanceRequired = false,
|
||||
fireRequired = true,
|
||||
towRequired = false,
|
||||
},
|
||||
CalloutLocations = {
|
||||
[1] = vector3(-1474.1163, 7612.5264, 90.0090),
|
||||
[2] = vector3(-1498.0601, 7648.6548, 89.9406),
|
||||
[3] = vector3(-1561.5817, 7478.5679, 95.6648),
|
||||
[4] = vector3(-1400.6205, 7501.4053, 80.8366),
|
||||
},
|
||||
PedChanceToFleeFromPlayer = 0, -- Value between 0 and 100 -> Lower is less chance.
|
||||
PedChanceToAttackPlayer = 0, -- Value between 0 and 100 -> Lower is less chance.
|
||||
PedChanceToSurrender = 0, -- Value between 0 and 100 -> Lower is less chance.
|
||||
PedChanceToObtainWeapons = 0, -- Value between 0 and 100 -> Lower is less chance.
|
||||
PedActionMinimumTimeoutInMs = 0, -- Milliseconds for the minimum timeout time to start the secondary action listed above.
|
||||
PedActionMaximumTimeoutInMs = 1000, -- Milliseconds for the maximum timeout time to start the secondary action. Must be a higher number than the minimum!
|
||||
PedActionOnNoActionFound = "none", -- When no action of the above options is found. It'll perform this action after the set timeout. Options: "none", "attack", "flee", "surrender"
|
||||
PedWeaponData = { -- The ped will be given one randomly selected weapon (in hand) from these weapons if PedChanceToObtainWeapons passed.
|
||||
"weapon_unarmed",
|
||||
},
|
||||
|
||||
client = function(plyPed, pedList, vehicleList, playersList, objectList, propList, fireList, smokeList, calloutDataClient)
|
||||
|
||||
-- No other actions required clientside.
|
||||
for index, pedNetId in pairs(pedList) do
|
||||
local ped = NetToPed(pedNetId)
|
||||
if DoesEntityExist(ped) then
|
||||
ERS_RequestNetControlForEntity(ped)
|
||||
TaskSetBlockingOfNonTemporaryEvents(ped, true)
|
||||
ERS_ApplyBloodToPed(ped)
|
||||
local scenario = ERS_SelectRandomWoundedPersonScenario()
|
||||
TaskStartScenarioInPlace(ped, scenario, 0, true)
|
||||
end
|
||||
end
|
||||
|
||||
ERS_CreateTemporaryBlipForEntities(pedList, 120000)
|
||||
ERS_PerformTimedActionOnPed(calloutDataClient, pedList)
|
||||
end,
|
||||
server = function(request, src, calloutData, pedList, vehicleList, objectList, propList, playersList, fireList, smokeList)
|
||||
|
||||
-- Build smoke
|
||||
if UsingSmartFires then
|
||||
-- Full version
|
||||
local smokeSize = Config.RandomMediumFireOrSmokeSize[math.random(#Config.RandomMediumFireOrSmokeSize)]
|
||||
local smokeType = Config.FoggySmoke
|
||||
local smokeId = exports['SmartFires']:CreateSmoke(vector3(calloutData.Coordinates.x, calloutData.Coordinates.y, calloutData.Coordinates.z-0.5), smokeSize, smokeType)
|
||||
DebugPrint("Created smoke particle with ID: "..smokeId)
|
||||
table.insert(smokeList, smokeId)
|
||||
else
|
||||
-- Lite version
|
||||
local smokeSize = Config.RandomMediumFireOrSmokeSize[math.random(#Config.RandomMediumFireOrSmokeSize)]
|
||||
local smokeType = "normal"
|
||||
local smokeId = exports['SmartFiresLite']:CreateSmoke(vector3(calloutData.Coordinates.x, calloutData.Coordinates.y, calloutData.Coordinates.z-0.5), smokeSize, smokeType)
|
||||
DebugPrint("Created smoke particle with ID: "..smokeId)
|
||||
table.insert(smokeList, smokeId)
|
||||
end
|
||||
|
||||
-- Build wounded miner
|
||||
local amountOfPeds = math.random(1, 4)
|
||||
local minerPedModels = {"s_m_y_construct_01", "s_m_y_construct_02"}
|
||||
for i = 1, amountOfPeds do
|
||||
local pedModel = ERS_GetRandomModel(minerPedModels)
|
||||
local pedCoords = vector3(calloutData.Coordinates.x, calloutData.Coordinates.y, calloutData.Coordinates.z)
|
||||
local pedHeading = math.random(360)
|
||||
local pedNetId = ERS_CreatePed(pedModel, pedCoords, pedHeading)
|
||||
local ped = NetworkGetEntityFromNetworkId(pedNetId)
|
||||
table.insert(pedList, pedNetId)
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
}
|
||||
@@ -1,516 +0,0 @@
|
||||
Config.Callouts["roxwood_mysterious_egg"] = {
|
||||
|
||||
Enabled = true,
|
||||
CalloutName = "Mysterious egg(s) reported",
|
||||
CalloutDescriptions = {
|
||||
"Emergency: respond to reports of a mysterious egg; assess potential hazards.",
|
||||
"Urgent alert: unidentified egg-like object reported requiring immediate investigation.",
|
||||
"Critical response required: investigate reports of an unusual egg of unknown origin.",
|
||||
"Notice: mysterious egg discovered in the area; assessment needed.",
|
||||
"Alert: respond to reports of a suspicious egg-shaped object; evaluate potential risks.",
|
||||
"Incident reported: mysterious egg found requiring immediate attention.",
|
||||
"Immediate action: address reports of an unidentified egg; assess situation.",
|
||||
"Situation alert: investigation needed for mysterious egg discovery.",
|
||||
"Emergency response: handle reports of an unusual egg; ensure public safety.",
|
||||
"Response needed: investigate reports of a mysterious egg; assess and secure the area.",
|
||||
},
|
||||
CalloutUnitsRequired = {
|
||||
description = "Police, fire.",
|
||||
policeRequired = true,
|
||||
ambulanceRequired = false,
|
||||
fireRequired = true,
|
||||
towRequired = false,
|
||||
},
|
||||
CalloutLocations = {
|
||||
[1] = vector3(-176.0005, 7555.7231, 2.0013),
|
||||
[2] = vector3(-229.1338, 7345.6353, 4.2200),
|
||||
[3] = vector3(-3411.0190, 6075.2427, 2.6527),
|
||||
[4] = vector3(-783.9731, 6659.8804, 2.3201),
|
||||
[5] = vector3(-328.8283, 6974.1064, 2.4945),
|
||||
},
|
||||
PedChanceToFleeFromPlayer = 0, -- Value between 0 and 100 -> Lower is less chance.
|
||||
PedChanceToAttackPlayer = 0, -- Value between 0 and 100 -> Lower is less chance.
|
||||
PedChanceToSurrender = 0, -- Value between 0 and 100 -> Lower is less chance.
|
||||
PedChanceToObtainWeapons = 0, -- Value between 0 and 100 -> Lower is less chance.
|
||||
PedActionMinimumTimeoutInMs = 0, -- Milliseconds for the minimum timeout time to start the secondary action listed above.
|
||||
PedActionMaximumTimeoutInMs = 1000, -- Milliseconds for the maximum timeout time to start the secondary action. Must be a higher number than the minimum!
|
||||
PedActionOnNoActionFound = "none", -- When no action of the above options is found. It'll perform this action after the set timeout. Options: "none", "attack", "flee", "surrender"
|
||||
PedWeaponData = { -- The ped will be given one randomly selected weapon (in hand) from these weapons if PedChanceToObtainWeapons passed.
|
||||
"weapon_unarmed",
|
||||
},
|
||||
|
||||
client = function(plyPed, pedList, vehicleList, playersList, objectList, propList, fireList, smokeList, calloutDataClient)
|
||||
local eggObjects = {}
|
||||
for index, objNetId in pairs(objectList) do
|
||||
local obj = NetToObj(objNetId)
|
||||
if DoesEntityExist(obj) then
|
||||
ERS_RequestNetControlForEntity(obj)
|
||||
PlaceObjectOnGroundProperly(obj)
|
||||
table.insert(eggObjects, obj)
|
||||
|
||||
-- Make weird shit happen, like drawing lights fading in and out in green colour
|
||||
local coords = GetEntityCoords(obj)
|
||||
local radius = 10.0
|
||||
local intensity = 0.0
|
||||
local fadeSpeed = 0.005 -- Lower = slower fade
|
||||
local increasing = true
|
||||
|
||||
Citizen.CreateThread(function()
|
||||
while DoesEntityExist(obj) do
|
||||
-- Draw the light with current intensity
|
||||
DrawLightWithRangeAndShadow(
|
||||
coords.x,
|
||||
coords.y,
|
||||
coords.z,
|
||||
0, -- Red
|
||||
math.floor(intensity * 100), -- Green (0-100 range)
|
||||
0, -- Blue
|
||||
10.0,
|
||||
0.5, -- Light intensity
|
||||
1.0
|
||||
)
|
||||
|
||||
-- Update intensity
|
||||
if increasing then
|
||||
intensity = intensity + fadeSpeed
|
||||
if intensity >= 1.0 then
|
||||
intensity = 1.0
|
||||
increasing = false
|
||||
end
|
||||
else
|
||||
intensity = intensity - fadeSpeed
|
||||
if intensity <= 0.0 then
|
||||
intensity = 0.0
|
||||
increasing = true
|
||||
end
|
||||
end
|
||||
|
||||
Wait(0)
|
||||
end
|
||||
end)
|
||||
end
|
||||
end
|
||||
|
||||
-- Make UFO fly in from high altitude, then start the abduction sequence
|
||||
local ufoEntityId = nil
|
||||
local ufoNetId = nil
|
||||
Citizen.SetTimeout(10000, function()
|
||||
local ufoModel = 'imp_prop_ship_01a'
|
||||
RequestModel(ufoModel)
|
||||
while not HasModelLoaded(ufoModel) do
|
||||
Wait(100)
|
||||
end
|
||||
|
||||
-- Start position high in the sky
|
||||
local startCoords = vector3(calloutDataClient.Coordinates.x + 50.0, calloutDataClient.Coordinates.y + 50.0, calloutDataClient.Coordinates.z + 150.0)
|
||||
local finalCoords = vector3(calloutDataClient.Coordinates.x, calloutDataClient.Coordinates.y, calloutDataClient.Coordinates.z + 30.0)
|
||||
local ufoHeading = math.random(360)
|
||||
|
||||
-- Create UFO at start position
|
||||
ufoEntityId = CreateObject(ufoModel, startCoords.x, startCoords.y, startCoords.z, true, true, true)
|
||||
while not DoesEntityExist(ufoEntityId) do
|
||||
Wait(100)
|
||||
end
|
||||
ufoNetId = NetworkGetNetworkIdFromEntity(ufoEntityId)
|
||||
|
||||
-- Play UFO approach sound
|
||||
PlaySoundFrontend(-1, "Object_Dropped_Remote", "GTAO_FM_Events_Soundset", true)
|
||||
|
||||
-- UFO arrival animation
|
||||
Citizen.CreateThread(function()
|
||||
local arrivalDuration = 5000 -- 5 seconds for arrival
|
||||
local startTime = GetGameTimer()
|
||||
|
||||
-- Add a slight hovering effect
|
||||
local hoverOffset = 0.0
|
||||
local hoverRate = 0.003 -- Reduced from 0.01 for slower hovering
|
||||
|
||||
-- Play arrival sequence
|
||||
while DoesEntityExist(ufoEntityId) do
|
||||
local currentTime = GetGameTimer()
|
||||
local timeElapsed = currentTime - startTime
|
||||
local t = math.min(timeElapsed / arrivalDuration, 1.0)
|
||||
|
||||
-- Use cubic easing for natural movement
|
||||
local tSquared = t * t
|
||||
local tCubed = tSquared * t
|
||||
local easedT = 1.0 - math.pow(1.0 - t, 3)
|
||||
|
||||
-- Calculate new position
|
||||
local newX = lerp(startCoords.x, finalCoords.x, easedT)
|
||||
local newY = lerp(startCoords.y, finalCoords.y, easedT)
|
||||
local newZ = lerp(startCoords.z, finalCoords.z, easedT)
|
||||
|
||||
-- Add hovering effect
|
||||
hoverOffset = math.sin(currentTime * hoverRate) * 0.5
|
||||
|
||||
-- Set UFO position
|
||||
SetEntityCoords(ufoEntityId, newX, newY, newZ + hoverOffset, false, false, false, false)
|
||||
|
||||
-- Rotate the UFO slightly as it comes in
|
||||
local currentHeading = GetEntityHeading(ufoEntityId)
|
||||
SetEntityHeading(ufoEntityId, currentHeading + 0.2)
|
||||
|
||||
-- If UFO reached final position, break the loop
|
||||
if t >= 1.0 then
|
||||
-- Play hovering sound when UFO is in position
|
||||
--PlaySoundFrontend(-1, "Altitude_Warning", "EXILE_1", true)
|
||||
PlaySoundFrontend(-1, "Object_Dropped_Remote", "GTAO_FM_Events_Soundset", true)
|
||||
break
|
||||
end
|
||||
|
||||
Wait(0)
|
||||
end
|
||||
|
||||
-- After arrival, continue with the spotlights and abduction
|
||||
local ufoCoords = GetEntityCoords(ufoEntityId)
|
||||
local isCalloutActive = true
|
||||
local isUFODeparting = false -- New flag to control hover effect
|
||||
|
||||
-- Create a thread to monitor callout status
|
||||
Citizen.CreateThread(function()
|
||||
while true do
|
||||
-- Check if callout is still active
|
||||
if not isAttachedToCallout then
|
||||
isCalloutActive = false
|
||||
|
||||
-- Clean up UFO if it exists
|
||||
if DoesEntityExist(ufoEntityId) then
|
||||
DeleteEntity(ufoEntityId)
|
||||
end
|
||||
|
||||
-- Break the monitoring loop
|
||||
break
|
||||
end
|
||||
Wait(1000) -- Check every second
|
||||
end
|
||||
end)
|
||||
|
||||
Citizen.CreateThread(function()
|
||||
-- Light pulsing variables
|
||||
local lightIntensity = 1.0
|
||||
local pulseRate = 0.005
|
||||
local minIntensity = 0.7
|
||||
local maxIntensity = 1.3
|
||||
|
||||
-- Play spotlight activation sound
|
||||
PlaySoundFrontend(-1, "Beep_Red", "DLC_HEIST_HACKING_SNAKE_SOUNDS", true)
|
||||
Wait(800)
|
||||
PlaySoundFrontend(-1, "CHECKPOINT_PERFECT", "HUD_MINI_GAME_SOUNDSET", true)
|
||||
|
||||
while DoesEntityExist(ufoEntityId) and isCalloutActive do
|
||||
local gameTime = GetGameTimer()
|
||||
|
||||
-- Only apply hover if not departing
|
||||
if not isUFODeparting then
|
||||
-- Update hover effect with slower rate
|
||||
hoverOffset = math.sin(gameTime * hoverRate) * 0.5
|
||||
SetEntityCoords(ufoEntityId, ufoCoords.x, ufoCoords.y, ufoCoords.z + hoverOffset, false, false, false, false)
|
||||
end
|
||||
|
||||
-- Calculate pulsing light intensity
|
||||
lightIntensity = lerp(minIntensity, maxIntensity, (math.sin(gameTime * pulseRate) + 1) * 0.5)
|
||||
|
||||
-- Draw spotlights only if not departing
|
||||
if not isUFODeparting then
|
||||
-- Draw the main red spotlight with pulsing intensity
|
||||
DrawSpotLightWithShadow(
|
||||
ufoCoords.x, ufoCoords.y, ufoCoords.z-3.0,
|
||||
0.0, 0.0, -1.0,
|
||||
255, 0, 0,
|
||||
100.0, lightIntensity, 0.0, 100.0, 1.0
|
||||
)
|
||||
|
||||
-- White spotlight remains consistent
|
||||
DrawSpotLightWithShadow(
|
||||
ufoCoords.x, ufoCoords.y, ufoCoords.z-3.0,
|
||||
0.0, 0.0, -1.0,
|
||||
255, 255, 255,
|
||||
100.0, 1.0, 0.0, 20.0, 1.0
|
||||
)
|
||||
end
|
||||
Wait(0)
|
||||
end
|
||||
end)
|
||||
|
||||
-- Create a forceful push away from eggs when player gets too close
|
||||
Citizen.CreateThread(function()
|
||||
while true do
|
||||
local playerPed = PlayerPedId()
|
||||
local playerCoords = GetEntityCoords(playerPed)
|
||||
|
||||
for _, eggObject in ipairs(eggObjects) do
|
||||
if DoesEntityExist(eggObject) then
|
||||
local eggCoords = GetEntityCoords(eggObject)
|
||||
local distance = #(playerCoords - eggCoords)
|
||||
|
||||
-- Strong repulsion when very close to eggs
|
||||
if distance < 8.0 then -- Reduced range for more dramatic effect
|
||||
-- Calculate direction AWAY from egg
|
||||
local force = (playerCoords - eggCoords)
|
||||
local magnitude = #force
|
||||
|
||||
if magnitude > 0 then
|
||||
-- Strong push at any time
|
||||
local pushStrength = 10.0
|
||||
|
||||
-- Ragdoll the player for dramatic effect
|
||||
SetPedGravity(playerPed, false)
|
||||
SetPedToRagdoll(playerPed, 1000, 1000, 0, 0, 0, 0)
|
||||
|
||||
-- Apply strong push force away from egg
|
||||
SetEntityVelocity(playerPed,
|
||||
force.x/magnitude * pushStrength,
|
||||
force.y/magnitude * pushStrength,
|
||||
pushStrength * 0.5) -- Upward component for dramatic effect
|
||||
|
||||
-- Small delay to prevent sound spam
|
||||
Wait(500)
|
||||
SetPedGravity(playerPed, true)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
Wait(0)
|
||||
end
|
||||
end)
|
||||
|
||||
-- Make the objects fly up into the UFO and make the UFO fly away
|
||||
Citizen.CreateThread(function()
|
||||
local objectsRemaining = #objectList
|
||||
local lastObject = nil
|
||||
local shouldFlyAway = false -- New flag to control UFO departure
|
||||
|
||||
-- Handle each object in the list
|
||||
for _, eggObject in ipairs(eggObjects) do
|
||||
if DoesEntityExist(eggObject) and isCalloutActive then
|
||||
local startCoords = GetEntityCoords(eggObject)
|
||||
local endCoords = GetEntityCoords(ufoEntityId)
|
||||
local duration = 5000 -- 5 seconds for each object
|
||||
local startTime = GetGameTimer()
|
||||
|
||||
-- Animate each object
|
||||
while DoesEntityExist(ufoEntityId) and DoesEntityExist(eggObject) and isCalloutActive do
|
||||
local currentTime = GetGameTimer()
|
||||
local timeElapsed = currentTime - startTime
|
||||
|
||||
-- Calculate easing
|
||||
local t = math.min(timeElapsed / duration, 1.0)
|
||||
local tSquared = t * t
|
||||
local tCubed = tSquared * t
|
||||
local easedT = 3 * tSquared - 2 * tCubed
|
||||
|
||||
-- Calculate new position
|
||||
local newX = lerp(startCoords.x, endCoords.x, easedT)
|
||||
local newY = lerp(startCoords.y, endCoords.y, easedT)
|
||||
local newZ = lerp(startCoords.z, endCoords.z + 1.0, easedT)
|
||||
|
||||
-- Add some wobble to the movement
|
||||
local wobble = math.sin(timeElapsed * 0.01) * (1.0 - easedT) * 0.3
|
||||
|
||||
-- Set new position
|
||||
SetEntityCoords(eggObject, newX + wobble, newY + wobble, newZ, false, false, false, false)
|
||||
|
||||
-- Add rotation
|
||||
local currentRotation = GetEntityRotation(eggObject, 2)
|
||||
SetEntityRotation(eggObject,
|
||||
currentRotation.x + 2.0,
|
||||
currentRotation.y + 2.0,
|
||||
currentRotation.z + 2.0,
|
||||
2, true)
|
||||
|
||||
-- Draw laser beam from UFO to object
|
||||
local ufoPos = GetEntityCoords(ufoEntityId)
|
||||
local objPos = GetEntityCoords(eggObject)
|
||||
|
||||
-- Main laser beam
|
||||
DrawLine(
|
||||
ufoPos.x, ufoPos.y, ufoPos.z - 2.0, -- From bottom of UFO
|
||||
objPos.x, objPos.y, objPos.z, -- To object
|
||||
0, 255, 0, -- Green color
|
||||
255 -- Alpha
|
||||
)
|
||||
|
||||
-- Add some additional lines for thickness effect
|
||||
DrawLine(
|
||||
ufoPos.x + 0.05, ufoPos.y, ufoPos.z - 2.0,
|
||||
objPos.x + 0.05, objPos.y, objPos.z,
|
||||
0, 255, 0, 180
|
||||
)
|
||||
|
||||
DrawLine(
|
||||
ufoPos.x - 0.05, ufoPos.y, ufoPos.z - 2.0,
|
||||
objPos.x - 0.05, objPos.y, objPos.z,
|
||||
0, 255, 0, 180
|
||||
)
|
||||
|
||||
DrawLine(
|
||||
ufoPos.x, ufoPos.y + 0.05, ufoPos.z - 2.0,
|
||||
objPos.x, objPos.y + 0.05, objPos.z,
|
||||
0, 255, 0, 180
|
||||
)
|
||||
|
||||
DrawLine(
|
||||
ufoPos.x, ufoPos.y - 0.05, ufoPos.z - 2.0,
|
||||
objPos.x, objPos.y - 0.05, objPos.z,
|
||||
0, 255, 0, 180
|
||||
)
|
||||
|
||||
-- Add pulsing effect
|
||||
local pulseIntensity = math.sin(timeElapsed * 0.02) * 0.5 + 0.5
|
||||
DrawLine(
|
||||
ufoPos.x, ufoPos.y, ufoPos.z - 2.0,
|
||||
objPos.x, objPos.y, objPos.z,
|
||||
0, 255 * pulseIntensity, 0,
|
||||
200
|
||||
)
|
||||
|
||||
-- If object reached UFO
|
||||
if t >= 1.0 then
|
||||
-- Play object capture sound
|
||||
PlaySoundFrontend(-1, "CHECKPOINT_UNDER_THE_BRIDGE", "HUD_MINI_GAME_SOUNDSET", true)
|
||||
--print("Object reached UFO, remaining: " .. objectsRemaining) -- Debug print
|
||||
|
||||
objectsRemaining = objectsRemaining - 1
|
||||
|
||||
if DoesEntityExist(eggObject) then
|
||||
if objectsRemaining == 0 then
|
||||
--print("Last object captured, preparing UFO departure") -- Debug print
|
||||
lastObject = eggObject
|
||||
SetEntityVisible(eggObject, false, false)
|
||||
shouldFlyAway = true -- Set flag for UFO to fly away
|
||||
else
|
||||
ERS_DeleteEntityFromCallout(eggObject)
|
||||
end
|
||||
end
|
||||
break
|
||||
end
|
||||
|
||||
Wait(0)
|
||||
end
|
||||
|
||||
-- Small delay between objects
|
||||
if isCalloutActive and objectsRemaining > 0 then
|
||||
Wait(500)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- In the UFO departure sequence, set isUFODeparting = true before starting:
|
||||
if shouldFlyAway then
|
||||
--print("Starting UFO departure sequence") -- Debug print
|
||||
|
||||
-- Add a delay before departure
|
||||
Wait(2000)
|
||||
|
||||
-- Set departing flag to true
|
||||
isUFODeparting = true
|
||||
|
||||
-- Create new thread specifically for UFO departure
|
||||
Citizen.CreateThread(function()
|
||||
if DoesEntityExist(ufoEntityId) and isCalloutActive then
|
||||
--print("UFO exists and callout is active, beginning departure") -- Debug print
|
||||
|
||||
-- Play UFO departure sounds
|
||||
PlaySoundFrontend(-1, "Object_Dropped_Remote", "GTAO_FM_Events_Soundset", true)
|
||||
|
||||
local ufoStartCoords = GetEntityCoords(ufoEntityId)
|
||||
local ufoEndCoords = vector3(ufoStartCoords.x, ufoStartCoords.y, ufoStartCoords.z + 30.0)
|
||||
local ufoDuration = 8000
|
||||
local ufoStartTime = GetGameTimer()
|
||||
|
||||
while DoesEntityExist(ufoEntityId) and isCalloutActive do
|
||||
local currentTime = GetGameTimer()
|
||||
local timeElapsed = currentTime - ufoStartTime
|
||||
local t = math.min(timeElapsed / ufoDuration, 1.0)
|
||||
|
||||
-- Exponential easing for UFO departure
|
||||
local easedT = t * t
|
||||
|
||||
-- Move UFO up
|
||||
local newZ = lerp(ufoStartCoords.z, ufoEndCoords.z, easedT)
|
||||
--print("Moving UFO - Height: " .. newZ) -- Debug print
|
||||
|
||||
SetEntityCoords(ufoEntityId,
|
||||
ufoStartCoords.x,
|
||||
ufoStartCoords.y,
|
||||
newZ,
|
||||
false, false, false, false)
|
||||
|
||||
if t >= 1.0 then
|
||||
--print("UFO reached max height, cleaning up") -- Debug print
|
||||
TriggerServerEvent("ns_easter_egg:DeleteUFO", ufoNetId)
|
||||
|
||||
-- Small delay before ending callout
|
||||
Wait(1000)
|
||||
|
||||
if lastObject and DoesEntityExist(lastObject) then
|
||||
ERS_DeleteEntityFromCallout(lastObject)
|
||||
end
|
||||
break
|
||||
end
|
||||
|
||||
Wait(0)
|
||||
end
|
||||
end
|
||||
end)
|
||||
else
|
||||
--print("shouldFlyAway flag not set, UFO departure sequence skipped") -- Debug print
|
||||
end
|
||||
end)
|
||||
end)
|
||||
end)
|
||||
|
||||
ERS_CreateTemporaryBlipForEntities(objectList, 30000)
|
||||
end,
|
||||
server = function(request, src, calloutData, pedList, vehicleList, objectList, propList, playersList, fireList, smokeList)
|
||||
local diameter = 10
|
||||
-- Build objects
|
||||
local alienEggObjects = {"prop_alien_egg_01"}
|
||||
local randomAmountOfObjects = math.random(1, 12)
|
||||
for i = 1, randomAmountOfObjects do
|
||||
local coords = ERS_GetRandomCoordinateWithinRangeOfCoordinate(calloutData.Coordinates, diameter)
|
||||
local objModel = ERS_GetRandomModel(alienEggObjects)
|
||||
local objCoords = vector3(coords.x, coords.y, coords.z+2.0)
|
||||
local objHeading = math.random(360)
|
||||
local objNetId = ERS_CreateObject(objModel, objCoords, objHeading)
|
||||
if objNetId then
|
||||
local obj = NetworkGetEntityFromNetworkId(objNetId)
|
||||
table.insert(objectList, objNetId)
|
||||
else
|
||||
DebugPrint("^1ERROR ^7Could not create object: "..objModel)
|
||||
end
|
||||
end
|
||||
|
||||
-- Create smoke (Optionally)
|
||||
-- -- Build a small sized fire
|
||||
-- if UsingSmartFires then
|
||||
-- -- Full version
|
||||
-- -- Build smoke
|
||||
-- local smokeSize = Config.RandomMediumFireOrSmokeSize[math.random(#Config.RandomMediumFireOrSmokeSize)]
|
||||
-- local smokeType = "foggy"
|
||||
-- local smokeId = exports['SmartFires']:CreateSmoke(vector3(calloutData.Coordinates.x, calloutData.Coordinates.y, calloutData.Coordinates.z-0.5), smokeSize, smokeType)
|
||||
-- DebugPrint("Created smoke with ID: "..smokeId)
|
||||
-- table.insert(smokeList, smokeId)
|
||||
-- else
|
||||
-- -- Lite version
|
||||
-- -- Build smoke
|
||||
-- local smokeSize = Config.RandomMediumFireOrSmokeSize[math.random(#Config.RandomMediumFireOrSmokeSize)]
|
||||
-- local smokeType = "normal"
|
||||
-- local smokeId = exports['SmartFiresLite']:CreateSmoke(vector3(calloutData.Coordinates.x, calloutData.Coordinates.y, calloutData.Coordinates.z-0.5), smokeSize, smokeType)
|
||||
-- DebugPrint("Created smoke with ID: "..smokeId)
|
||||
-- table.insert(smokeList, smokeId)
|
||||
-- end
|
||||
|
||||
|
||||
RegisterServerEvent("ns_easter_egg:DeleteUFO")
|
||||
AddEventHandler("ns_easter_egg:DeleteUFO", function(objNetId)
|
||||
local obj = NetworkGetEntityFromNetworkId(objNetId)
|
||||
if DoesEntityExist(obj) then
|
||||
DeleteEntity(obj)
|
||||
end
|
||||
end)
|
||||
|
||||
return true
|
||||
end
|
||||
}
|
||||
@@ -1,272 +0,0 @@
|
||||
|
||||
Config.Callouts["roxwood_race_crash"] = {
|
||||
Enabled = false,
|
||||
CalloutName = "Roxwood GP Race Crash",
|
||||
CalloutDescriptions = {
|
||||
"Reported road traffic collision, further details needed",
|
||||
"Collision involving vehicles, assess scene for safety",
|
||||
"Incident on road reported, extent of damage unclear",
|
||||
"Traffic incident with unknown injuries, approach carefully",
|
||||
"Vehicle collision reported, assistance required",
|
||||
"Accident scene identified, evaluate for emergency response",
|
||||
"Collision on roadway, prioritize safety and assistance",
|
||||
"Traffic incident reported, coordinate response accordingly",
|
||||
"Roadway blocked due to collision, assess for hazards",
|
||||
"Vehicle collision with unspecified injuries, response needed",
|
||||
-- Add more if you like.
|
||||
},
|
||||
CalloutUnitsRequired = {
|
||||
description = "Police, ambulance, fire, tow.",
|
||||
policeRequired = true,
|
||||
ambulanceRequired = true,
|
||||
fireRequired = true,
|
||||
towRequired = true,
|
||||
},
|
||||
CalloutLocations = {
|
||||
[1] = vector3(-2878.8276, 8350.8096, 37.0427),
|
||||
[2] = vector3(-3003.3206, 8421.5879, 37.0592),
|
||||
[3] = vector3(-3262.5945, 8667.0674, 37.1207),
|
||||
[4] = vector3(-3020.7278, 8711.4346, 46.1127),
|
||||
[5] = vector3(-2703.4087, 8518.3428, 44.1534),
|
||||
[6] = vector3(-2239.3889, 8563.3916, 47.5178),
|
||||
[7] = vector3(-2343.6777, 8891.8887, 51.0247),
|
||||
[8] = vector3(-2524.2251, 8750.5879, 45.5379),
|
||||
[9] = vector3(-2624.4514, 8621.4854, 47.0158),
|
||||
[10] = vector3(-2576.6099, 8060.3647, 46.6511),
|
||||
[11] = vector3(-3196.3193, 8153.2676, 47.0967),
|
||||
},
|
||||
PedChanceToFleeFromPlayer = 0, -- Value between 0 and 100 -> 0 is no chance. The lower the less chance.
|
||||
PedChanceToAttackPlayer = 0, -- Value between 0 and 100 -> 0 is no chance. The lower the less chance.
|
||||
PedChanceToSurrender = 0, -- Value between 0 and 100 -> 0 is no chance. The lower the less chance.
|
||||
PedChanceToObtainWeapons = 0, -- Value between 0 and 100 -> 0 is no chance. The lower the less chance.
|
||||
PedActionMinimumTimeoutInMs = 0, -- Milliseconds for the minimum timeout time to start the secondary action listed above.
|
||||
PedActionMaximumTimeoutInMs = 1000, -- Milliseconds for the maximum timeout time to start the secondary action. Must be a higher number than the minimum!
|
||||
PedActionOnNoActionFound = "none", -- When no action of the above options is found. It'll perform this action after the set timeout. Options: "none", "attack", "flee", "surrender"
|
||||
PedWeaponData = { -- The ped will be given one randomly selected weapon (in hand) from these weapons if PedChanceToObtainWeapons passed.
|
||||
"weapon_unarmed", -- Basically none.
|
||||
},
|
||||
client = function(plyPed, pedList, vehicleList, playersList, objectList, propList, fireList, smokeList, calloutDataClient)
|
||||
for index, vehNetId in pairs(vehicleList) do
|
||||
local veh = NetToVeh(vehNetId)
|
||||
if DoesEntityExist(veh) then
|
||||
ERS_RequestNetControlForEntity(veh)
|
||||
ERS_SetRandomDamageToVehicle(veh)
|
||||
end
|
||||
end
|
||||
|
||||
for index, pedNetId in pairs(pedList) do
|
||||
local ped = NetToPed(pedNetId)
|
||||
if DoesEntityExist(ped) then
|
||||
|
||||
ERS_RequestNetControlForEntity(ped)
|
||||
|
||||
local pedCoords = GetEntityCoords(ped)
|
||||
local chanceToSurvive = math.random(0, 1)
|
||||
|
||||
ERS_SetMovementAnimClipSetToPed(ped, "move_m@injured")
|
||||
|
||||
if chanceToSurvive < 1 then
|
||||
-- Dead
|
||||
SetEntityHealth(ped, 0)
|
||||
TaskSetBlockingOfNonTemporaryEvents(ped, true)
|
||||
ERS_ApplyBloodToPed(ped)
|
||||
SetPedKeepTask(ped, true)
|
||||
else
|
||||
-- Alive
|
||||
TaskSetBlockingOfNonTemporaryEvents(ped, true)
|
||||
ERS_SpawnConfiguredWeaponForPed(ped, calloutDataClient)
|
||||
if IsPedInAnyVehicle(ped, false) then
|
||||
TaskLeaveAnyVehicle(ped)
|
||||
Wait(500)
|
||||
end
|
||||
TaskSetBlockingOfNonTemporaryEvents(ped, true)
|
||||
SetPedKeepTask(ped, true)
|
||||
|
||||
ERS_ApplyBloodToPed(ped)
|
||||
|
||||
pedCoords = GetEntityCoords(ped)
|
||||
local bool, safeCoords = GetSafeCoordForPed(pedCoords.x, pedCoords.y, pedCoords.z, true, 16)
|
||||
if bool then
|
||||
if Config.Debug then
|
||||
print("Found safe coord for ped: "..safeCoords)
|
||||
end
|
||||
local xOffset= math.random(-2, 2)
|
||||
local yOffset= math.random(-2, 2)
|
||||
|
||||
if Config.Debug then
|
||||
print("Could not find safe coord for ped: "..safeCoords)
|
||||
end
|
||||
end
|
||||
|
||||
Citizen.SetTimeout(10000, function()
|
||||
if DoesEntityExist(ped) then
|
||||
if not IsPedDeadOrDying(ped, true) then
|
||||
ERS_RequestNetControlForEntity(ped)
|
||||
|
||||
TaskSetBlockingOfNonTemporaryEvents(ped, true)
|
||||
|
||||
local scenario = ERS_SelectRandomWoundedPersonScenario()
|
||||
TaskStartScenarioInPlace(ped, scenario, 0, true)
|
||||
|
||||
ERS_PerformTimedActionOnPed(calloutDataClient, pedList)
|
||||
|
||||
if Config.Debug then
|
||||
print("Blocking off non-temp events for ped at safe coords for ped: "..ped)
|
||||
end
|
||||
end
|
||||
end
|
||||
end)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
for index, objNetId in pairs(objectList) do
|
||||
local obj = NetToObj(objNetId)
|
||||
if DoesEntityExist(obj) then
|
||||
ERS_RequestNetControlForEntity(obj)
|
||||
PlaceObjectOnGroundProperly(obj)
|
||||
end
|
||||
end
|
||||
|
||||
ERS_CreateTemporaryBlipForEntities(vehicleList, 15000)
|
||||
ERS_CreateTemporaryBlipForEntities(pedList, 15000)
|
||||
end,
|
||||
server = function(request, src, calloutData, pedList, vehicleList, objectList, propList, playersList, fireList, smokeList)
|
||||
local randomAmountOfVehicles = math.random(2,5)
|
||||
local randomAmountOfObjects = math.random(1,5)
|
||||
local randomAmountOfFires = math.random(1,3)
|
||||
local racePedModels = {
|
||||
"ig_trafficwarden", "player_zero", "ig_agatha",
|
||||
"hc_driver", "hc_gunman", "hc_hacker", "ig_abigail", "ig_agent",
|
||||
"ig_amandatownley", "ig_andreas", "ig_ashley", "ig_avon", "ig_ballasog",
|
||||
"ig_bankman", "ig_barry", "ig_benny", "ig_bestmen", "ig_beverly",
|
||||
"ig_brad", "ig_bride", "ig_car3guy1", "ig_car3guy2", "ig_casey",
|
||||
"ig_chef", "ig_chef2", "ig_chengsr", "ig_chrisformage", "ig_clay",
|
||||
"ig_claypain", "ig_cletus", "ig_dale", "ig_davenorton", "ig_denise",
|
||||
"ig_devin", "ig_dix", "ig_djblamadon", "ig_djblamrupert", "ig_djblamryans",
|
||||
"ig_djdixmanager", "ig_djgeneric_01", "ig_djsolfotios", "ig_djsoljakob",
|
||||
"ig_djsolmanager", "ig_djsolmike", "ig_djsolrobt", "ig_djtalaurelia",
|
||||
"ig_djtalignazio", "ig_dom", "ig_dreyfuss", "ig_drfriedlander",
|
||||
"ig_englishdave", "ig_fabien", "ig_fbisuit_01", "ig_floyd", "ig_g",
|
||||
"ig_groom", "ig_hao", "ig_hunter", "ig_janet", "ig_jay_norris",
|
||||
"ig_jewelass", "ig_jimmyboston", "ig_jimmyboston_02", "ig_jimmydisanto",
|
||||
"ig_joeminuteman", "ig_johnnyklebitz", "ig_josef", "ig_josh",
|
||||
"ig_karen_daniels", "ig_kerrymcintosh", "ig_kerrymcintosh_02",
|
||||
"ig_lacey_jones_02", "ig_lamardavis", "ig_lazlow", "ig_lazlow_2",
|
||||
"ig_lestercrest", "ig_lestercrest_2", "ig_lifeinvad_01", "ig_lifeinvad_02",
|
||||
"ig_magenta", "ig_malc", "ig_manuel", "ig_marnie", "ig_maryann",
|
||||
"ig_maude", "ig_michelle", "ig_milton", "ig_molly", "ig_money",
|
||||
"ig_mp_agent14", "ig_mrk", "ig_mrs_thornhill", "ig_mrsphillips",
|
||||
"ig_natalia", "ig_nervousron", "ig_nigel", "ig_old_man1a", "ig_old_man2",
|
||||
"ig_omega", "ig_oneil", "ig_orleans", "ig_ortega", "ig_paige", "ig_paper",
|
||||
"ig_patricia", "ig_popov", "ig_priest", "ig_prolsec_02", "ig_ramp_gang",
|
||||
"ig_ramp_hic", "ig_ramp_hipster", "ig_ramp_mex", "ig_rashcosvki",
|
||||
"ig_roccopelosi", "ig_russiandrunk", "ig_sacha", "ig_screen_writer",
|
||||
"ig_siemonyetarian", "ig_sol", "ig_solomon", "ig_stevehains", "ig_stretch",
|
||||
"ig_talcc", "ig_talina", "ig_talmm", "ig_tanisha", "ig_taocheng",
|
||||
"ig_taostranslator", "ig_tenniscoach", "ig_terry", "ig_tomepsilon",
|
||||
"ig_tonya", "ig_tonyprince", "ig_tracydisanto", "ig_trafficwarden",
|
||||
"ig_tylerdix", "ig_tylerdix_02", "ig_vagspeak", "ig_wade", "ig_zimbor",
|
||||
"player_one", "player_two", "player_zero", "ig_agatha", "ig_avery",
|
||||
"ig_brucie2", "ig_thornton", "ig_tomcasino", "ig_vincent"
|
||||
}
|
||||
local vehRaceModels = {"formula", "formula2", "openwheel1", "openwheel2"}
|
||||
local carPartObjects = {"prop_car_battery_01", "prop_car_exhaust_01", "prop_rub_carpart_04", "prop_rub_carpart_05", "prop_car_engine_01"}
|
||||
local diameter = 20
|
||||
|
||||
-- Car race or motorbike race chance
|
||||
local carRaceChance = math.random(0, 1)
|
||||
local vehType = "automobile"
|
||||
if carRaceChance == 0 then
|
||||
-- motorbike race
|
||||
vehRaceModels = {"bati2"}
|
||||
vehType = "bike"
|
||||
end
|
||||
|
||||
-- Build entities
|
||||
for i = 1, randomAmountOfVehicles do
|
||||
local coords = ERS_GetRandomCoordinateWithinRangeOfCoordinate(calloutData.Coordinates, diameter)
|
||||
|
||||
-- Build vehicle
|
||||
local vehModel = ERS_GetRandomModel(vehRaceModels)
|
||||
local vehCoords = vector3(coords.x, coords.y, coords.z)
|
||||
local vehHeading = math.random(360)
|
||||
local vehNetId = ERS_CreateVehicle(vehModel, vehType, vehCoords, vehHeading)
|
||||
local vehicle = NetworkGetEntityFromNetworkId(vehNetId)
|
||||
table.insert(vehicleList, vehNetId)
|
||||
|
||||
-- Build ped
|
||||
coords = ERS_GetRandomCoordinateWithinRangeOfCoordinate(calloutData.Coordinates, diameter)
|
||||
|
||||
local pedModel = ERS_GetRandomModel(racePedModels)
|
||||
local pedCoords = vector3(coords.x, coords.y, coords.z)
|
||||
local pedHeading = math.random(360)
|
||||
local pedNetId = ERS_CreatePed(pedModel, pedCoords, pedHeading)
|
||||
local ped = NetworkGetEntityFromNetworkId(pedNetId)
|
||||
SetPedIntoVehicle(ped, vehicle, -1)
|
||||
table.insert(pedList, pedNetId)
|
||||
|
||||
-- Break vehicle
|
||||
SetVehicleBodyHealth(vehicle, (math.random(1000) + 0.0))
|
||||
for i = 0, 5 do
|
||||
local broken = math.random(0, 1)
|
||||
if broken == 1 then
|
||||
SetVehicleDoorBroken(vehicle, i, false)
|
||||
end
|
||||
SetVehicleDirtLevel(vehicle, math.random(15) + 0.0)
|
||||
end
|
||||
end
|
||||
|
||||
-- Build objects
|
||||
for i = 1, randomAmountOfObjects do
|
||||
local coords = ERS_GetRandomCoordinateWithinRangeOfCoordinate(calloutData.Coordinates, diameter)
|
||||
|
||||
local objModel = ERS_GetRandomModel(carPartObjects)
|
||||
local objCoords = vector3(coords.x, coords.y, coords.z)
|
||||
local objHeading = math.random(360)
|
||||
local objNetId = ERS_CreateObject(objModel, objCoords, objHeading)
|
||||
if objNetId then
|
||||
local obj = NetworkGetEntityFromNetworkId(objNetId)
|
||||
table.insert(objectList, objNetId)
|
||||
else
|
||||
DebugPrint("^1ERROR ^7Could not create object: "..objModel)
|
||||
end
|
||||
end
|
||||
|
||||
for i = 1, randomAmountOfFires do
|
||||
local coords = ERS_GetRandomCoordinateWithinRangeOfCoordinate(calloutData.Coordinates, diameter)
|
||||
if UsingSmartFires then
|
||||
-- Full version
|
||||
local fireSize = Config.RandomLargeFireOrSmokeSize[math.random(#Config.RandomLargeFireOrSmokeSize)]
|
||||
local fireType = Config.NormalFireTypes[math.random(#Config.NormalFireTypes)]
|
||||
local fireId = exports['SmartFires']:CreateFire(vector3(coords.x, coords.y, coords.z+0.6), fireSize, fireType)
|
||||
DebugPrint("Created fire with ID: "..fireId)
|
||||
table.insert(fireList, fireId)
|
||||
|
||||
local smokeSize = Config.RandomMediumFireOrSmokeSize[math.random(#Config.RandomMediumFireOrSmokeSize)]
|
||||
local smokeType = Config.AllSmokeTypes[math.random(#Config.AllSmokeTypes)]
|
||||
local smokeId = exports['SmartFires']:CreateSmoke(vector3(coords.x, coords.y, coords.z-0.5), smokeSize, smokeType)
|
||||
DebugPrint("Created smoke particle with ID: "..smokeId)
|
||||
table.insert(smokeList, smokeId)
|
||||
else
|
||||
local chanceToCreateSmoke = math.random(0, 1) -- 50% chance to create smoke
|
||||
if chanceToCreateSmoke == 1 then
|
||||
-- Lite version
|
||||
local fireSize = Config.RandomLargeFireOrSmokeSize[math.random(#Config.RandomLargeFireOrSmokeSize)]
|
||||
local fireType = "normal"
|
||||
local fireId = exports['SmartFiresLite']:CreateFire(vector3(coords.x, coords.y, coords.z+0.6), fireSize, fireType)
|
||||
DebugPrint("Created fire with SmartFiresLite with ID: "..fireId)
|
||||
table.insert(fireList, fireId)
|
||||
|
||||
local smokeSize = Config.RandomMediumFireOrSmokeSize[math.random(#Config.RandomMediumFireOrSmokeSize)]
|
||||
local smokeType = "normal"
|
||||
local smokeId = exports['SmartFiresLite']:CreateSmoke(vector3(coords.x, coords.y, coords.z-0.5), smokeSize, smokeType)
|
||||
DebugPrint("Created smoke particle with ID: "..smokeId)
|
||||
table.insert(smokeList, smokeId)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
}
|
||||
@@ -1,98 +0,0 @@
|
||||
Config.Callouts["roxwood_racecar_theft"] = {
|
||||
Enabled = false,
|
||||
CalloutName = "Theft of a Racecar",
|
||||
CalloutDescriptions = {
|
||||
"High-performance racecar reported stolen from local track, immediate response required",
|
||||
"Professional racing vehicle theft in progress, suspect may be armed and dangerous",
|
||||
"Modified racing vehicle stolen during event preparations, high-value target",
|
||||
"Competition racecar reported missing from secured garage area",
|
||||
"Emergency: High-speed capable vehicle theft from racing complex",
|
||||
"Urgent: Racing team reports theft of competition vehicle, suspect fleeing area",
|
||||
"Track security reports unauthorized removal of professional racing vehicle",
|
||||
"High-priority: Racing prototype stolen, vehicle extremely valuable",
|
||||
"Alert: Competition vehicle theft from pit area, immediate response needed",
|
||||
"Racing team reports forced entry and theft of performance vehicle",
|
||||
},
|
||||
CalloutUnitsRequired = {
|
||||
description = "Police.",
|
||||
policeRequired = true,
|
||||
ambulanceRequired = false,
|
||||
fireRequired = false,
|
||||
towRequired = false,
|
||||
},
|
||||
CalloutLocations = {
|
||||
[1] = vector3(-2901.6108, 8056.7153, 44.8517),
|
||||
[2] = vector3(-2737.1699, 8028.4966, 49.4163),
|
||||
[3] = vector3(-2969.1304, 7983.6553, 44.8298),
|
||||
},
|
||||
PedChanceToFleeFromPlayer = 90, -- Value between 0 and 100 -> Lower is less chance.
|
||||
PedChanceToAttackPlayer = 10, -- Value between 0 and 100 -> Lower is less chance.
|
||||
PedChanceToSurrender = 10, -- Value between 0 and 100 -> Lower is less chance.
|
||||
PedChanceToObtainWeapons = 25, -- Value between 0 and 100 -> Lower is less chance.
|
||||
PedActionMinimumTimeoutInMs = 0, -- Milliseconds for the minimum timeout time to start the secondary action listed above.
|
||||
PedActionMaximumTimeoutInMs = 2000, -- Milliseconds for the maximum timeout time to start the secondary action. Must be a higher number than the minimum!
|
||||
PedActionOnNoActionFound = "flee", -- When no action of the above options is found. It'll perform this action after the set timeout. Options: "none", "attack", "flee", "surrender"
|
||||
PedWeaponData = { -- The ped will be given one randomly selected weapon (in hand) from these weapons if PedChanceToObtainWeapons passed.
|
||||
"weapon_knife",
|
||||
"weapon_pistol",
|
||||
},
|
||||
client = function(plyPed, pedList, vehicleList, playersList, objectList, propList, fireList, smokeList, calloutDataClient)
|
||||
local vehicle = nil
|
||||
local driver = nil
|
||||
|
||||
for index, vehNetId in pairs(vehicleList) do
|
||||
local veh = NetToVeh(vehNetId)
|
||||
if DoesEntityExist(veh) then
|
||||
vehicle = veh
|
||||
ERS_RequestNetControlForEntity(vehicle)
|
||||
end
|
||||
end
|
||||
|
||||
for index, pedNetId in pairs(pedList) do
|
||||
local ped = NetToPed(pedNetId)
|
||||
if DoesEntityExist(ped) then
|
||||
driver = ped
|
||||
ERS_RequestNetControlForEntity(driver)
|
||||
if not IsPedOnAnyBike(driver) then
|
||||
SmashVehicleWindow(vehicle, 0) -- break driver window
|
||||
end
|
||||
if not IsPedInAnyVehicle(driver, true) then
|
||||
TaskEnterVehicle(driver, vehicle, 5000, -1, 2.0, 1, 0)
|
||||
Wait(5000)
|
||||
ERS_SetPedToFleeFromPlayer(driver)
|
||||
else
|
||||
ERS_SetPedToFleeFromPlayer(driver)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
ERS_CreateTemporaryBlipForEntities(vehicleList, 15000)
|
||||
ERS_CreateTemporaryBlipForEntities(pedList, 15000)
|
||||
|
||||
ERS_PerformTimedActionOnPed(calloutDataClient, pedList)
|
||||
end,
|
||||
server = function(request, src, calloutData, pedList, vehicleList, objectList, propList, playersList, fireList, smokeList)
|
||||
-- Build vehicle
|
||||
local vehRaceModels = {"formula", "formula2", "openwheel1", "openwheel2"}
|
||||
local vehModel = ERS_GetRandomModel(vehRaceModels)
|
||||
local vehType = "automobile"
|
||||
local vehCoords = vector3(calloutData.Coordinates.x, calloutData.Coordinates.y, calloutData.Coordinates.z)
|
||||
local vehHeading = math.random(360)
|
||||
local vehNetId = ERS_CreateVehicle(vehModel, vehType, vehCoords, vehHeading)
|
||||
local vehicle = NetworkGetEntityFromNetworkId(vehNetId)
|
||||
table.insert(vehicleList, vehNetId)
|
||||
|
||||
-- Build ped
|
||||
local pedModel = ERS_GetRandomModel(Config.randomPeds)
|
||||
local pedCoords = vector3(calloutData.Coordinates.x, calloutData.Coordinates.y, calloutData.Coordinates.z +1.0)
|
||||
local pedHeading = math.random(360)
|
||||
local pedNetId = ERS_CreatePed(pedModel, pedCoords, pedHeading)
|
||||
local ped = NetworkGetEntityFromNetworkId(pedNetId)
|
||||
SetPedIntoVehicle(ped, vehicle, -1)
|
||||
table.insert(pedList, pedNetId)
|
||||
|
||||
calloutBuilt = true
|
||||
|
||||
return true
|
||||
end
|
||||
}
|
||||
@@ -1,135 +0,0 @@
|
||||
Config.Callouts["roxwood_reports_of_a_fire"] = {
|
||||
|
||||
Enabled = true,
|
||||
CalloutName = "Reports of a Fire",
|
||||
CalloutDescriptions = {
|
||||
"A fire has been reported, requiring immediate attention from fire services.",
|
||||
"Emergency services are needed to extinguish a reported fire.",
|
||||
"Reports indicate a fire has broken out, necessitating urgent firefighting intervention.",
|
||||
"A fire has been identified, and additional fire personnel are needed for containment and extinguishment.",
|
||||
"Emergency services have been requested to respond to a fire.",
|
||||
"A request for assistance has been made by authorities dealing with a fire.",
|
||||
"Additional units are required to support fire personnel managing a fire.",
|
||||
"Emergency backup is required to assist fire authorities in handling a fire.",
|
||||
"A call for assistance has been issued by responders dealing with a fire.",
|
||||
"Reports suggest a situation where immediate firefighting intervention is crucial to manage and address a fire.",
|
||||
},
|
||||
CalloutUnitsRequired = {
|
||||
description = "Fire",
|
||||
policeRequired = false,
|
||||
ambulanceRequired = false,
|
||||
fireRequired = true,
|
||||
towRequired = false,
|
||||
},
|
||||
CalloutLocations = {
|
||||
[1] = vector3(-2542.1089, 7467.2939, 40.1682),
|
||||
[2] = vector3(-2070.9167, 7103.6870, 28.5290),
|
||||
[3] = vector3(-2680.5420, 6456.3721, 28.7906),
|
||||
[4] = vector3(-2660.3013, 6341.2979, 20.9317),
|
||||
[5] = vector3(-2920.7075, 6240.0674, 12.7980),
|
||||
[6] = vector3(-2785.6145, 6105.6709, 7.2804),
|
||||
[7] = vector3(-2989.0220, 6141.8804, 4.8758),
|
||||
[8] = vector3(-3029.2122, 6094.7715, 16.5621),
|
||||
[9] = vector3(-3289.9795, 6187.9121, 13.7178),
|
||||
[10] = vector3(-3068.1689, 7862.0122, 59.1986),
|
||||
[11] = vector3(-2314.8447, 7807.0688, 38.4255),
|
||||
[12] = vector3(-2306.9417, 7822.5352, 44.2124),
|
||||
[13] = vector3(-2163.0261, 7998.2568, 44.3750),
|
||||
[14] = vector3(-2207.9578, 8031.9858, 44.2027),
|
||||
[15] = vector3(-2274.9910, 8146.1890, 34.1373),
|
||||
[16] = vector3(-1290.7288, 8218.0352, 12.9399),
|
||||
[17] = vector3(-606.0902, 7564.0142, 11.6405),
|
||||
[18] = vector3(-833.0021, 7150.1865, 104.5681),
|
||||
[19] = vector3(-380.6089, 7202.0557, 18.2214),
|
||||
[20] = vector3(-455.5331, 7737.0986, 6.2801),
|
||||
[21] = vector3(193.0212, 7768.1797, 6.4081),
|
||||
},
|
||||
PedChanceToFleeFromPlayer = 0, -- Value between 0 and 100 -> Lower is less chance.
|
||||
PedChanceToAttackPlayer = 0, -- Value between 0 and 100 -> Lower is less chance.
|
||||
PedChanceToSurrender = 0, -- Value between 0 and 100 -> Lower is less chance.
|
||||
PedChanceToObtainWeapons = 0, -- Value between 0 and 100 -> Lower is less chance.
|
||||
PedActionMinimumTimeoutInMs = 0, -- Milliseconds for the minimum timeout time to start the secondary action listed above.
|
||||
PedActionMaximumTimeoutInMs = 1000, -- Milliseconds for the maximum timeout time to start the secondary action. Must be a higher number than the minimum!
|
||||
PedActionOnNoActionFound = "none", -- When no action of the above options is found. It'll perform this action after the set timeout. Options: "none", "attack", "flee", "surrender"
|
||||
PedWeaponData = { -- The ped will be given one randomly selected weapon (in hand) from these weapons if PedChanceToObtainWeapons passed.
|
||||
"weapon_unarmed",
|
||||
},
|
||||
|
||||
client = function(plyPed, pedList, vehicleList, playersList, objectList, propList, fireList, smokeList, calloutDataClient)
|
||||
|
||||
for index, pedNetId in pairs(pedList) do
|
||||
local ped = NetToPed(pedNetId)
|
||||
if DoesEntityExist(ped) then
|
||||
ERS_RequestNetControlForEntity(ped)
|
||||
TaskSetBlockingOfNonTemporaryEvents(ped, true)
|
||||
PlayPain(ped, 8, 200)
|
||||
ERS_ApplyBloodToPed(ped)
|
||||
Wait(2500)
|
||||
SetEntityHealth(ped, 0)
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
ERS_CreateTemporaryBlipForEntities(pedList, 15000)
|
||||
|
||||
ERS_PerformTimedActionOnPed(calloutDataClient, pedList)
|
||||
|
||||
end,
|
||||
server = function(request, src, calloutData, pedList, vehicleList, objectList, propList, playersList, fireList, smokeList)
|
||||
|
||||
local diameter = 2
|
||||
local coords = ERS_GetRandomCoordinateWithinRangeOfCoordinate(calloutData.Coordinates, diameter)
|
||||
|
||||
-- Build a small sized fire
|
||||
if UsingSmartFires then
|
||||
-- Full version
|
||||
local fireSize = Config.RandomMediumFireOrSmokeSize[math.random(#Config.RandomMediumFireOrSmokeSize)]
|
||||
local fireType = Config.NormalFireTypes[math.random(#Config.NormalFireTypes)]
|
||||
local fireId = exports['SmartFires']:CreateFire(vector3(calloutData.Coordinates.x, calloutData.Coordinates.y, calloutData.Coordinates.z-0.5), fireSize, fireType)
|
||||
DebugPrint("Created fire with ID: "..fireId)
|
||||
table.insert(fireList, fireId)
|
||||
|
||||
-- Build smoke
|
||||
local chanceOnASmoke = 50
|
||||
if math.random(1, 100) <= chanceOnASmoke then
|
||||
local smokeSize = Config.RandomMediumFireOrSmokeSize[math.random(#Config.RandomMediumFireOrSmokeSize)]
|
||||
local smokeType = Config.AllSmokeTypes[math.random(#Config.AllSmokeTypes)]
|
||||
local smokeId = exports['SmartFires']:CreateSmoke(vector3(calloutData.Coordinates.x, calloutData.Coordinates.y, calloutData.Coordinates.z-0.5), smokeSize, smokeType)
|
||||
|
||||
DebugPrint("Created smoke with ID: "..smokeId)
|
||||
table.insert(smokeList, smokeId)
|
||||
end
|
||||
else
|
||||
-- Lite version
|
||||
local fireSize = Config.RandomSmallFireOrSmokeSize[math.random(#Config.RandomSmallFireOrSmokeSize)]
|
||||
local fireType = "normal"
|
||||
local fireId = exports['SmartFiresLite']:CreateFire(vector3(calloutData.Coordinates.x, calloutData.Coordinates.y, calloutData.Coordinates.z-0.5), fireSize, fireType)
|
||||
DebugPrint("Created fire with SmartFiresLite with ID: "..fireId)
|
||||
table.insert(fireList, fireId)
|
||||
|
||||
-- Build smoke
|
||||
local chanceOnASmoke = 50
|
||||
if math.random(1, 100) <= chanceOnASmoke then
|
||||
local smokeSize = Config.RandomMediumFireOrSmokeSize[math.random(#Config.RandomMediumFireOrSmokeSize)]
|
||||
local smokeType = "normal"
|
||||
local smokeId = exports['SmartFiresLite']:CreateSmoke(vector3(calloutData.Coordinates.x, calloutData.Coordinates.y, calloutData.Coordinates.z-0.5), smokeSize, smokeType)
|
||||
|
||||
DebugPrint("Created smoke with ID: "..smokeId)
|
||||
table.insert(smokeList, smokeId)
|
||||
end
|
||||
end
|
||||
|
||||
local chanceOnAVictim = 50
|
||||
if math.random(1, 100) <= chanceOnAVictim then
|
||||
-- Build victim
|
||||
local pedModel = ERS_GetRandomModel(Config.randomPeds)
|
||||
local pedCoords = vector3(coords.x, coords.y, coords.z)
|
||||
local pedHeading = math.random(360)
|
||||
local pedNetId = ERS_CreatePed(pedModel, pedCoords, pedHeading)
|
||||
local ped = NetworkGetEntityFromNetworkId(pedNetId)
|
||||
table.insert(pedList, pedNetId)
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
}
|
||||
@@ -1,110 +0,0 @@
|
||||
Config.Callouts["roxwood_reports_of_theft"] = {
|
||||
Enabled = false,
|
||||
CalloutName = "Reports of Theft",
|
||||
CalloutDescriptions = {
|
||||
"Reports of theft, details pending",
|
||||
"Suspected theft reported, further information needed",
|
||||
"Incident involving stolen vehicle, assess situation for safety",
|
||||
"Theft reported, prioritize response for recovery",
|
||||
"Reported theft of motor vehicle, investigate promptly",
|
||||
"Vehicle reported missing, coordinate search and recovery efforts",
|
||||
"Stolen reported, assess potential risks",
|
||||
"Suspected theft of vehicle, approach investigation with caution",
|
||||
"Reports of theft, prioritize response for recovery",
|
||||
"Theft incident reported, coordinate with authorities",
|
||||
},
|
||||
CalloutUnitsRequired = {
|
||||
description = "Police.",
|
||||
policeRequired = true,
|
||||
ambulanceRequired = false,
|
||||
fireRequired = false,
|
||||
towRequired = false,
|
||||
},
|
||||
CalloutLocations = {
|
||||
[1] = vector3(-906.1519, 6810.3047, 21.3176),
|
||||
[2] = vector3(-641.7461, 6866.0830, 24.2095),
|
||||
[3] = vector3(-629.4213, 6988.1577, 24.3153),
|
||||
[4] = vector3(-540.8360, 6718.5483, 21.2485),
|
||||
[5] = vector3(-263.4102, 7058.8438, 12.0184),
|
||||
[6] = vector3(-302.9133, 7167.9888, 6.3294),
|
||||
[7] = vector3(-289.1859, 7225.0986, 6.3294),
|
||||
[8] = vector3(-216.6804, 7675.9102, 6.3277),
|
||||
[9] = vector3(-1288.2164, 8249.0859, 12.0572),
|
||||
[10] = vector3(-2238.5459, 8170.4370, 33.1580),
|
||||
[11] = vector3(-2554.0913, 7474.7725, 28.6994),
|
||||
[12] = vector3(-3058.3174, 7338.7568, 44.0336),
|
||||
[13] = vector3(-3067.8191, 6315.9731, 8.8898),
|
||||
[14] = vector3(-2989.0806, 6175.4121, 8.4440),
|
||||
[15] = vector3(-3684.9780, 6187.1943, 24.5932),
|
||||
[16] = vector3(-3096.2888, 6538.0146, 23.5485),
|
||||
},
|
||||
PedChanceToFleeFromPlayer = 90, -- Value between 0 and 100 -> Lower is less chance.
|
||||
PedChanceToAttackPlayer = 10, -- Value between 0 and 100 -> Lower is less chance.
|
||||
PedChanceToSurrender = 10, -- Value between 0 and 100 -> Lower is less chance.
|
||||
PedChanceToObtainWeapons = 25, -- Value between 0 and 100 -> Lower is less chance.
|
||||
PedActionMinimumTimeoutInMs = 0, -- Milliseconds for the minimum timeout time to start the secondary action listed above.
|
||||
PedActionMaximumTimeoutInMs = 2000, -- Milliseconds for the maximum timeout time to start the secondary action. Must be a higher number than the minimum!
|
||||
PedActionOnNoActionFound = "flee", -- When no action of the above options is found. It'll perform this action after the set timeout. Options: "none", "attack", "flee", "surrender"
|
||||
PedWeaponData = { -- The ped will be given one randomly selected weapon (in hand) from these weapons if PedChanceToObtainWeapons passed.
|
||||
"weapon_knife",
|
||||
"weapon_pistol",
|
||||
},
|
||||
client = function(plyPed, pedList, vehicleList, playersList, objectList, propList, fireList, smokeList, calloutDataClient)
|
||||
local vehicle = nil
|
||||
local driver = nil
|
||||
|
||||
for index, vehNetId in pairs(vehicleList) do
|
||||
local veh = NetToVeh(vehNetId)
|
||||
if DoesEntityExist(veh) then
|
||||
vehicle = veh
|
||||
ERS_RequestNetControlForEntity(vehicle)
|
||||
end
|
||||
end
|
||||
|
||||
for index, pedNetId in pairs(pedList) do
|
||||
local ped = NetToPed(pedNetId)
|
||||
if DoesEntityExist(ped) then
|
||||
driver = ped
|
||||
ERS_RequestNetControlForEntity(driver)
|
||||
if not IsPedOnAnyBike(driver) then
|
||||
SmashVehicleWindow(vehicle, 0) -- break driver window
|
||||
end
|
||||
if not IsPedInAnyVehicle(driver, true) then
|
||||
TaskEnterVehicle(driver, vehicle, 5000, -1, 2.0, 1, 0)
|
||||
Wait(5000)
|
||||
ERS_SetPedToFleeFromPlayer(driver)
|
||||
else
|
||||
ERS_SetPedToFleeFromPlayer(driver)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
ERS_CreateTemporaryBlipForEntities(vehicleList, 15000)
|
||||
ERS_CreateTemporaryBlipForEntities(pedList, 15000)
|
||||
|
||||
ERS_PerformTimedActionOnPed(calloutDataClient, pedList)
|
||||
end,
|
||||
server = function(request, src, calloutData, pedList, vehicleList, objectList, propList, playersList, fireList, smokeList)
|
||||
-- Build vehicle
|
||||
local vehModel = ERS_GetRandomModel(Config.randomVehicles)
|
||||
local vehType = "automobile"
|
||||
local vehCoords = vector3(calloutData.Coordinates.x, calloutData.Coordinates.y, calloutData.Coordinates.z)
|
||||
local vehHeading = math.random(360)
|
||||
local vehNetId = ERS_CreateVehicle(vehModel, vehType, vehCoords, vehHeading)
|
||||
local vehicle = NetworkGetEntityFromNetworkId(vehNetId)
|
||||
table.insert(vehicleList, vehNetId)
|
||||
|
||||
-- Build ped
|
||||
local pedModel = ERS_GetRandomModel(Config.randomPeds)
|
||||
local pedCoords = vector3(calloutData.Coordinates.x, calloutData.Coordinates.y, calloutData.Coordinates.z +1.0)
|
||||
local pedHeading = math.random(360)
|
||||
local pedNetId = ERS_CreatePed(pedModel, pedCoords, pedHeading)
|
||||
local ped = NetworkGetEntityFromNetworkId(pedNetId)
|
||||
SetPedIntoVehicle(ped, vehicle, -1)
|
||||
table.insert(pedList, pedNetId)
|
||||
|
||||
calloutBuilt = true
|
||||
|
||||
return true
|
||||
end
|
||||
}
|
||||
-72
@@ -1,72 +0,0 @@
|
||||
Config.Callouts["roxwood_rubbish_washed_up_from_sea"] = {
|
||||
|
||||
Enabled = true,
|
||||
CalloutName = "Rubbish washed up from the sea",
|
||||
CalloutDescriptions = {
|
||||
"Emergency: respond to reports of debris washed up on the shoreline; assess environmental hazards.",
|
||||
"Urgent alert: marine debris reported on the beach requiring immediate cleanup response.",
|
||||
"Critical response required: investigate reports of sea waste washing up on the coast.",
|
||||
"Notice: significant amount of marine debris has washed ashore; environmental assessment needed.",
|
||||
"Alert: respond to reports of ocean waste on the beach; evaluate potential hazards.",
|
||||
"Incident reported: sea debris has washed up on the shoreline requiring immediate attention.",
|
||||
"Immediate action: address reports of marine waste on the beach; assess environmental impact.",
|
||||
"Situation alert: coastal cleanup needed for debris washed up from the ocean.",
|
||||
"Emergency response: handle reports of sea waste on the shoreline; ensure public safety.",
|
||||
"Response needed: investigate reports of marine debris washed ashore; assess and coordinate cleanup.",
|
||||
},
|
||||
CalloutUnitsRequired = {
|
||||
description = "Police, fire.",
|
||||
policeRequired = true,
|
||||
ambulanceRequired = false,
|
||||
fireRequired = true,
|
||||
towRequired = false,
|
||||
},
|
||||
CalloutLocations = {
|
||||
[1] = vector3(-176.0005, 7555.7231, 2.0013),
|
||||
[2] = vector3(-229.1338, 7345.6353, 4.2200),
|
||||
[3] = vector3(-3411.0190, 6075.2427, 2.6527),
|
||||
[4] = vector3(-783.9731, 6659.8804, 2.3201),
|
||||
[5] = vector3(-328.8283, 6974.1064, 2.4945),
|
||||
},
|
||||
PedChanceToFleeFromPlayer = 0, -- Value between 0 and 100 -> Lower is less chance.
|
||||
PedChanceToAttackPlayer = 0, -- Value between 0 and 100 -> Lower is less chance.
|
||||
PedChanceToSurrender = 0, -- Value between 0 and 100 -> Lower is less chance.
|
||||
PedChanceToObtainWeapons = 0, -- Value between 0 and 100 -> Lower is less chance.
|
||||
PedActionMinimumTimeoutInMs = 0, -- Milliseconds for the minimum timeout time to start the secondary action listed above.
|
||||
PedActionMaximumTimeoutInMs = 1000, -- Milliseconds for the maximum timeout time to start the secondary action. Must be a higher number than the minimum!
|
||||
PedActionOnNoActionFound = "none", -- When no action of the above options is found. It'll perform this action after the set timeout. Options: "none", "attack", "flee", "surrender"
|
||||
PedWeaponData = { -- The ped will be given one randomly selected weapon (in hand) from these weapons if PedChanceToObtainWeapons passed.
|
||||
"weapon_unarmed",
|
||||
},
|
||||
|
||||
client = function(plyPed, pedList, vehicleList, playersList, objectList, propList, fireList, smokeList, calloutDataClient)
|
||||
for index, objNetId in pairs(objectList) do
|
||||
local obj = NetToObj(objNetId)
|
||||
if DoesEntityExist(obj) then
|
||||
ERS_RequestNetControlForEntity(obj)
|
||||
PlaceObjectOnGroundProperly(obj)
|
||||
end
|
||||
end
|
||||
ERS_CreateTemporaryBlipForEntities(objectList, 30000)
|
||||
end,
|
||||
server = function(request, src, calloutData, pedList, vehicleList, objectList, propList, playersList, fireList, smokeList)
|
||||
local diameter = 10
|
||||
-- Build objects
|
||||
local rubbishObjects = {"prop_rub_buswreck_01", "prop_rub_carwreck_10", "prop_rub_carwreck_13", "prop_rub_pile_01", "prop_pile_dirt_04", "prop_pile_dirt_02", "prop_rub_buswreck_03", "prop_wrecked_buzzard"}
|
||||
local randomAmountOfObjects = math.random(1, 6)
|
||||
for i = 1, randomAmountOfObjects do
|
||||
local coords = ERS_GetRandomCoordinateWithinRangeOfCoordinate(calloutData.Coordinates, diameter)
|
||||
local objModel = ERS_GetRandomModel(rubbishObjects)
|
||||
local objCoords = vector3(coords.x, coords.y, coords.z+2.0)
|
||||
local objHeading = math.random(360)
|
||||
local objNetId = ERS_CreateObject(objModel, objCoords, objHeading)
|
||||
if objNetId then
|
||||
local obj = NetworkGetEntityFromNetworkId(objNetId)
|
||||
table.insert(objectList, objNetId)
|
||||
else
|
||||
DebugPrint("^1ERROR ^7Could not create object: "..objModel)
|
||||
end
|
||||
end
|
||||
return true
|
||||
end
|
||||
}
|
||||
@@ -1,146 +0,0 @@
|
||||
Config.Callouts["roxwood_shootout"] = {
|
||||
Enabled = true,
|
||||
CalloutName = "Roxwood Shootout",
|
||||
CalloutDescriptions = {
|
||||
"A violent shootout has erupted between two rival groups in Roxwood.",
|
||||
"Reports of gunfire exchanged between two factions, immediate response required.",
|
||||
"A shootout is underway in Roxwood, with multiple armed individuals involved.",
|
||||
"Two rival gangs are engaged in a firefight, posing a threat to public safety.",
|
||||
"Gunfire reported in Roxwood as two groups clash violently.",
|
||||
"Emergency services needed to contain a shootout between two armed groups.",
|
||||
"A dangerous shootout is occurring, requiring swift intervention from authorities.",
|
||||
"Two factions are exchanging gunfire, escalating tensions in the area.",
|
||||
"A shootout has broken out, with both sides heavily armed.",
|
||||
"Immediate action required to control a shootout between rival groups.",
|
||||
},
|
||||
CalloutUnitsRequired = {
|
||||
description = "Police.",
|
||||
policeRequired = true,
|
||||
ambulanceRequired = false,
|
||||
fireRequired = false,
|
||||
towRequired = false,
|
||||
},
|
||||
CalloutLocations = {
|
||||
[1] = vector3(-829.9780, 7158.2388, 99.7499),
|
||||
[2] = vector3(-455.7968, 7240.3081, 17.5236),
|
||||
[3] = vector3(-357.8293, 7197.4155, 6.3290),
|
||||
[4] = vector3(-362.7209, 7389.6875, 6.4129),
|
||||
[5] = vector3(-537.7283, 7538.1699, 6.7560),
|
||||
},
|
||||
PedChanceToFleeFromPlayer = 0, -- Lower chance to flee during a shootout.
|
||||
PedChanceToAttackPlayer = 100, -- High chance to attack during a shootout.
|
||||
PedChanceToSurrender = 0, -- No surrender during a shootout.
|
||||
PedChanceToObtainWeapons = 100, -- Ensure all peds are armed.
|
||||
PedActionMinimumTimeoutInMs = 0, -- Milliseconds for the minimum timeout time to start the secondary action listed above.
|
||||
PedActionMaximumTimeoutInMs = 1000, -- Milliseconds for the maximum timeout time to start the secondary action. Must be a higher number than the minimum!
|
||||
PedActionOnNoActionFound = "attack", -- When no action of the above options is found. It'll perform this action after the set timeout. Options: "none", "attack", "flee", "surrender"
|
||||
PedWeaponData = { -- Weapons for the shootout.
|
||||
"weapon_pistol",
|
||||
"weapon_smg",
|
||||
"weapon_assaultrifle",
|
||||
},
|
||||
|
||||
client = function(plyPed, pedList, vehicleList, playersList, objectList, propList, fireList, smokeList, calloutDataClient)
|
||||
local team1 = {}
|
||||
local team2 = {}
|
||||
|
||||
for index, pedNetId in pairs(pedList) do
|
||||
local ped = NetToPed(pedNetId)
|
||||
if DoesEntityExist(ped) then
|
||||
ERS_RequestNetControlForEntity(ped)
|
||||
local model = GetEntityModel(ped)
|
||||
|
||||
-- Randomly assign peds to one of the two teams
|
||||
if #team1 < 8 and (math.random(2) == 1 or #team2 >= 8) then
|
||||
table.insert(team1, ped)
|
||||
else
|
||||
table.insert(team2, ped)
|
||||
end
|
||||
|
||||
TaskSetBlockingOfNonTemporaryEvents(ped, true)
|
||||
Wait(100)
|
||||
ERS_SpawnConfiguredWeaponForPed(ped, calloutDataClient)
|
||||
end
|
||||
end
|
||||
|
||||
-- Function to make peds flee for this case
|
||||
local function makePedsFlee(peds)
|
||||
for _, ped in pairs(peds) do
|
||||
if DoesEntityExist(ped) and not IsPedDeadOrDying(ped, true) then
|
||||
TaskSmartFleePed(ped, plyPed, 100.0, -1, false, false)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- Monitor and update ped behavior
|
||||
Citizen.CreateThread(function()
|
||||
while true do
|
||||
Citizen.Wait(1000) -- Check every second
|
||||
|
||||
-- Remove dead peds from teams
|
||||
for i = #team1, 1, -1 do
|
||||
if IsPedDeadOrDying(team1[i], true) then
|
||||
table.remove(team1, i)
|
||||
end
|
||||
end
|
||||
|
||||
for i = #team2, 1, -1 do
|
||||
if IsPedDeadOrDying(team2[i], true) then
|
||||
table.remove(team2, i)
|
||||
end
|
||||
end
|
||||
|
||||
-- If a team is too small, make them flee
|
||||
if #team1 < 3 then
|
||||
makePedsFlee(team1)
|
||||
break
|
||||
end
|
||||
|
||||
if #team2 < 3 then
|
||||
makePedsFlee(team2)
|
||||
break
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
-- Initial combat setup
|
||||
if #team1 > 0 and #team2 > 0 then
|
||||
for _, ped in pairs(team1) do
|
||||
local randomTarget = team2[math.random(#team2)]
|
||||
TaskCombatPed(ped, randomTarget, 0, 16)
|
||||
if Config.Debug then
|
||||
print("Team 1 Ped "..ped.." is attacking ped "..randomTarget)
|
||||
end
|
||||
end
|
||||
|
||||
for _, ped in pairs(team2) do
|
||||
local randomTarget = team1[math.random(#team1)]
|
||||
TaskCombatPed(ped, randomTarget, 0, 16)
|
||||
if Config.Debug then
|
||||
print("Team 2 Ped "..ped.." is attacking ped "..randomTarget)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
ERS_CreateTemporaryBlipForEntities(pedList, 15000)
|
||||
ERS_PerformTimedActionOnPed(calloutDataClient, pedList)
|
||||
end,
|
||||
|
||||
server = function(request, src, calloutData, pedList, vehicleList, objectList, propList, playersList, fireList, smokeList)
|
||||
local randomPeds = Config.randomGangPeds
|
||||
local totalPeds = math.random(10, 16) -- Total peds for both teams
|
||||
|
||||
for i = 1, totalPeds do
|
||||
-- Build peds
|
||||
local diameter = 20
|
||||
local pedModel = ERS_GetRandomModel(randomPeds)
|
||||
local pedCoords = ERS_GetRandomCoordinateWithinRangeOfCoordinate(calloutData.Coordinates, diameter)
|
||||
local pedHeading = math.random(360)
|
||||
local pedNetId = ERS_CreatePed(pedModel, pedCoords, pedHeading)
|
||||
local ped = NetworkGetEntityFromNetworkId(pedNetId)
|
||||
table.insert(pedList, pedNetId)
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
}
|
||||
@@ -1,165 +0,0 @@
|
||||
Config.Callouts["roxwood_silo_fire"] = {
|
||||
|
||||
Enabled = true,
|
||||
CalloutName = "Silo Fire",
|
||||
CalloutDescriptions = {
|
||||
"A fire has been reported in an agricultural silo, requiring immediate emergency response.",
|
||||
"Emergency services are needed to address a fire situation at a grain storage silo.",
|
||||
"Reports indicate a fire has broken out in a farm silo, necessitating urgent firefighting intervention.",
|
||||
"A silo fire has been identified, posing potential risks to stored agricultural products and nearby structures.",
|
||||
"Emergency services have been requested to respond to a fire at a storage silo facility.",
|
||||
"A request for assistance has been made by farm personnel dealing with a silo fire.",
|
||||
"Additional units are required to support fire personnel managing a dangerous silo fire.",
|
||||
"Emergency backup is needed to contain a fire that has broken out in an agricultural silo.",
|
||||
"First responders report an active fire situation at a grain storage silo.",
|
||||
"Reports indicate a critical fire situation at a farm silo requiring specialized firefighting equipment.",
|
||||
},
|
||||
CalloutUnitsRequired = {
|
||||
description = "Fire",
|
||||
policeRequired = false,
|
||||
ambulanceRequired = false,
|
||||
fireRequired = true,
|
||||
towRequired = false,
|
||||
},
|
||||
CalloutLocations = {
|
||||
[1] = vector3(-1650.7075, 6579.6846, 30.4142),
|
||||
[2] = vector3(-1757.1521, 6566.3809, 79.2261),
|
||||
[3] = vector3(-1666.2078, 6543.0640, 79.2194),
|
||||
[4] = vector3(-1660.5845, 6602.8188, 32.9437),
|
||||
[5] = vector3(-1680.0370, 6607.5435, 34.4462),
|
||||
[6] = vector3(-1707.4130, 6616.6157, 31.7320),
|
||||
[7] = vector3(-1724.4045, 6619.4497, 34.8395),
|
||||
[8] = vector3(-1737.7704, 6623.3125, 33.3164),
|
||||
[9] = vector3(175.7780, 7849.1553, 17.2202),
|
||||
[10] = vector3(175.9884, 7765.7866, 16.3057),
|
||||
[11] = vector3(21.9351, 7808.2656, 31.6843),
|
||||
[12] = vector3(-708.7509, 6809.5586, 35.5453),
|
||||
[13] = vector3(-713.1135, 6787.7432, 38.4738),
|
||||
[14] = vector3(-2898.8865, 8279.4307, 48.0824),
|
||||
},
|
||||
PedChanceToFleeFromPlayer = 0, -- Value between 0 and 100 -> Lower is less chance.
|
||||
PedChanceToAttackPlayer = 0, -- Value between 0 and 100 -> Lower is less chance.
|
||||
PedChanceToSurrender = 0, -- Value between 0 and 100 -> Lower is less chance.
|
||||
PedChanceToObtainWeapons = 0, -- Value between 0 and 100 -> Lower is less chance.
|
||||
PedActionMinimumTimeoutInMs = 0, -- Milliseconds for the minimum timeout time to start the secondary action listed above.
|
||||
PedActionMaximumTimeoutInMs = 1000, -- Milliseconds for the maximum timeout time to start the secondary action. Must be a higher number than the minimum!
|
||||
PedActionOnNoActionFound = "none", -- When no action of the above options is found. It'll perform this action after the set timeout. Options: "none", "attack", "flee", "surrender"
|
||||
PedWeaponData = { -- The ped will be given one randomly selected weapon (in hand) from these weapons if PedChanceToObtainWeapons passed.
|
||||
"weapon_unarmed",
|
||||
},
|
||||
|
||||
client = function(plyPed, pedList, vehicleList, playersList, objectList, propList, fireList, smokeList, calloutDataClient)
|
||||
|
||||
for index, pedNetId in pairs(pedList) do
|
||||
local ped = NetToPed(pedNetId)
|
||||
if DoesEntityExist(ped) then
|
||||
ERS_RequestNetControlForEntity(ped)
|
||||
TaskSetBlockingOfNonTemporaryEvents(ped, true)
|
||||
PlayPain(ped, 8, 200)
|
||||
ERS_ApplyBloodToPed(ped)
|
||||
Wait(2500)
|
||||
SetEntityHealth(ped, 0)
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
local chanceOfAnExplosion = 100
|
||||
if math.random(1, 100) <= chanceOfAnExplosion then
|
||||
Citizen.SetTimeout(math.random(5000, 10000), function()
|
||||
local explosionCoords = vector3(calloutDataClient.Coordinates.x, calloutDataClient.Coordinates.y, calloutDataClient.Coordinates.z)
|
||||
local explosionRadius = 10.0
|
||||
local explosionForce = 10.0
|
||||
local explosionValues = {
|
||||
0, -- GRENADE
|
||||
1, -- GRENADELAUNCHER
|
||||
2, -- STICKYBOMB
|
||||
3, -- MOLOTOV
|
||||
4, -- ROCKET
|
||||
5, -- TANKSHELL
|
||||
6, -- HI_OCTANE
|
||||
7, -- CAR
|
||||
8, -- PLANE
|
||||
9, -- PETROL_PUMP
|
||||
10, -- BIKE
|
||||
11, -- DIR_STEAM
|
||||
12, -- DIR_FLAME
|
||||
13, -- DIR_WATER_HYDRANT
|
||||
14, -- DIR_GAS_CANISTER
|
||||
15, -- BOAT
|
||||
16, -- SHIP_DESTROY
|
||||
17, -- TRUCK
|
||||
18, -- BULLET
|
||||
19, -- SMOKE_GRENADE_LAUNCHER
|
||||
20, -- SMOKE_GRENADE
|
||||
21, -- BZGAS
|
||||
22, -- FLARE
|
||||
23, -- GAS_CANISTER
|
||||
24, -- EXTINGUISHER
|
||||
25, -- PROGRAMMABLEAR
|
||||
26, -- TRAIN
|
||||
27, -- BARREL
|
||||
28, -- PROPANE
|
||||
29, -- BLIMP
|
||||
30, -- DIR_FLAME_EXPLODE
|
||||
31, -- TANKER
|
||||
74, -- BOMB water
|
||||
75, -- BOMB water secondary
|
||||
-- Only including explosion types that make sense for a silo fire
|
||||
}
|
||||
local explosionType = explosionValues[math.random(#explosionValues)]
|
||||
AddExplosion(explosionCoords.x, explosionCoords.y, explosionCoords.z-2.0, explosionType, explosionRadius, explosionForce, true, false, 1.0)
|
||||
end)
|
||||
end
|
||||
|
||||
ERS_CreateTemporaryBlipForEntities(pedList, 15000)
|
||||
|
||||
ERS_PerformTimedActionOnPed(calloutDataClient, pedList)
|
||||
|
||||
end,
|
||||
server = function(request, src, calloutData, pedList, vehicleList, objectList, propList, playersList, fireList, smokeList)
|
||||
|
||||
local diameter = 2
|
||||
local coords = ERS_GetRandomCoordinateWithinRangeOfCoordinate(calloutData.Coordinates, diameter)
|
||||
|
||||
-- Build a medium sized fire
|
||||
if UsingSmartFires then
|
||||
-- Full version
|
||||
local fireSize = Config.RandomMediumFireOrSmokeSize[math.random(#Config.RandomMediumFireOrSmokeSize)]
|
||||
local fireType = Config.NormalFireTypes[math.random(#Config.NormalFireTypes)]
|
||||
local fireId = exports['SmartFires']:CreateFire(vector3(calloutData.Coordinates.x, calloutData.Coordinates.y, calloutData.Coordinates.z-0.5), fireSize, fireType)
|
||||
DebugPrint("Created fire with ID: "..fireId)
|
||||
table.insert(fireList, fireId)
|
||||
|
||||
-- Build smoke
|
||||
local chanceOnASmoke = 50
|
||||
if math.random(1, 100) <= chanceOnASmoke then
|
||||
local smokeSize = Config.RandomMediumFireOrSmokeSize[math.random(#Config.RandomMediumFireOrSmokeSize)]
|
||||
local smokeType = Config.AllSmokeTypes[math.random(#Config.AllSmokeTypes)]
|
||||
local smokeId = exports['SmartFires']:CreateSmoke(vector3(calloutData.Coordinates.x, calloutData.Coordinates.y, calloutData.Coordinates.z-0.5), smokeSize, smokeType)
|
||||
|
||||
DebugPrint("Created smoke with ID: "..smokeId)
|
||||
table.insert(smokeList, smokeId)
|
||||
end
|
||||
else
|
||||
-- Lite version
|
||||
local fireSize = Config.RandomSmallFireOrSmokeSize[math.random(#Config.RandomSmallFireOrSmokeSize)]
|
||||
local fireType = "normal"
|
||||
local fireId = exports['SmartFiresLite']:CreateFire(vector3(calloutData.Coordinates.x, calloutData.Coordinates.y, calloutData.Coordinates.z-0.5), fireSize, fireType)
|
||||
DebugPrint("Created fire with SmartFiresLite with ID: "..fireId)
|
||||
table.insert(fireList, fireId)
|
||||
|
||||
-- Build smoke
|
||||
local chanceOnASmoke = 50
|
||||
if math.random(1, 100) <= chanceOnASmoke then
|
||||
local smokeSize = Config.RandomMediumFireOrSmokeSize[math.random(#Config.RandomMediumFireOrSmokeSize)]
|
||||
local smokeType = "normal"
|
||||
local smokeId = exports['SmartFiresLite']:CreateSmoke(vector3(calloutData.Coordinates.x, calloutData.Coordinates.y, calloutData.Coordinates.z-0.5), smokeSize, smokeType)
|
||||
|
||||
DebugPrint("Created smoke with ID: "..smokeId)
|
||||
table.insert(smokeList, smokeId)
|
||||
end
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
}
|
||||
@@ -1,75 +0,0 @@
|
||||
Config.Callouts["roxwood_waterpark_incident"] = {
|
||||
|
||||
Enabled = true,
|
||||
CalloutName = "Waterpark Incident",
|
||||
CalloutDescriptions = {
|
||||
"Emergency response needed at the waterpark; individual requiring immediate medical attention.",
|
||||
"Alert: medical emergency reported at waterpark facilities; units requested for immediate response.",
|
||||
"Units needed: incident reported at waterpark involving an injured person.",
|
||||
"Emergency situation at waterpark; medical assistance required for park visitor.",
|
||||
"Alert: waterpark incident in progress; medical response team needed on scene.",
|
||||
"First responders requested at waterpark location; medical emergency reported.",
|
||||
"Respond to waterpark emergency; coordinate with on-site staff for immediate assistance.",
|
||||
"Situation alert: medical incident at waterpark facilities requiring urgent response.",
|
||||
"Emergency services needed at waterpark; injured person requiring immediate attention.",
|
||||
"Response needed: waterpark incident involving injured visitor; medical assistance required.",
|
||||
},
|
||||
CalloutUnitsRequired = {
|
||||
description = "Ambulance.",
|
||||
policeRequired = false,
|
||||
ambulanceRequired = true,
|
||||
fireRequired = false,
|
||||
towRequired = false,
|
||||
},
|
||||
CalloutLocations = {
|
||||
[1] = vector3(-283.4168, 7742.1196, 4.7899),
|
||||
[2] = vector3(-355.4387, 7813.5391, 4.4505),
|
||||
[3] = vector3(-285.5687, 7806.6489, 6.3981),
|
||||
[4] = vector3(-294.5287, 7814.0903, 6.4198),
|
||||
[5] = vector3(-253.2503, 7772.4219, 6.4892),
|
||||
[6] = vector3(-207.7762, 7791.9185, 11.1117),
|
||||
[7] = vector3(-314.7422, 7720.8774, 6.3765),
|
||||
[8] = vector3(-372.0792, 7815.6128, 6.3837),
|
||||
[9] = vector3(-314.7273, 7838.0542, 27.3287),
|
||||
[10] = vector3(-260.1914, 7839.4521, 14.3411),
|
||||
|
||||
},
|
||||
PedChanceToFleeFromPlayer = 0, -- Value between 0 and 100 -> Lower is less chance.
|
||||
PedChanceToAttackPlayer = 0, -- Value between 0 and 100 -> Lower is less chance.
|
||||
PedChanceToSurrender = 0, -- Value between 0 and 100 -> Lower is less chance.
|
||||
PedChanceToObtainWeapons = 0, -- Value between 0 and 100 -> Lower is less chance.
|
||||
PedActionMinimumTimeoutInMs = 0, -- Milliseconds for the minimum timeout time to start the secondary action listed above.
|
||||
PedActionMaximumTimeoutInMs = 1000, -- Milliseconds for the maximum timeout time to start the secondary action. Must be a higher number than the minimum!
|
||||
PedActionOnNoActionFound = "none", -- When no action of the above options is found. It'll perform this action after the set timeout. Options: "none", "attack", "flee", "surrender"
|
||||
PedWeaponData = { -- The ped will be given one randomly selected weapon (in hand) from these weapons if PedChanceToObtainWeapons passed.
|
||||
"weapon_unarmed",
|
||||
},
|
||||
|
||||
client = function(plyPed, pedList, vehicleList, playersList, objectList, propList, fireList, smokeList, calloutDataClient)
|
||||
|
||||
for index, pedNetId in pairs(pedList) do
|
||||
local ped = NetToPed(pedNetId)
|
||||
if DoesEntityExist(ped) then
|
||||
ERS_RequestNetControlForEntity(ped)
|
||||
SetEntityHealth(ped, 0)
|
||||
end
|
||||
end
|
||||
|
||||
ERS_CreateTemporaryBlipForEntities(pedList, 15000)
|
||||
ERS_PerformTimedActionOnPed(calloutDataClient, pedList)
|
||||
|
||||
end,
|
||||
server = function(request, src, calloutData, pedList, vehicleList, objectList, propList, playersList, fireList, smokeList)
|
||||
|
||||
-- Build ped`
|
||||
local bathingPedModels = {"a_f_m_beach_01", "a_f_m_bodybuild_01", "a_f_m_fatcult_01", "a_f_y_beach_01", "a_m_m_tranvest_01", "a_m_y_acult_02", "a_m_y_jetski_01", "a_m_y_musclbeac_01", "a_m_y_stwhi_01"}
|
||||
local pedModel = bathingPedModels[math.random(1, #bathingPedModels)]
|
||||
local pedCoords = vector3(calloutData.Coordinates.x, calloutData.Coordinates.y, calloutData.Coordinates.z+1.0)
|
||||
local pedHeading = math.random(360)
|
||||
local pedNetId = ERS_CreatePed(pedModel, pedCoords, pedHeading)
|
||||
local ped = NetworkGetEntityFromNetworkId(pedNetId)
|
||||
table.insert(pedList, pedNetId)
|
||||
|
||||
return true
|
||||
end
|
||||
}
|
||||
@@ -1,72 +0,0 @@
|
||||
Config.Callouts["roxwood_wounded_adventurer"] = {
|
||||
|
||||
Enabled = true,
|
||||
CalloutName = "Wounded adventurer",
|
||||
CalloutDescriptions = {
|
||||
"Emergency responders have located a wounded adventurer and are providing assistance.",
|
||||
"Authorities report that a wounded adventurer has been found, requiring immediate medical attention.",
|
||||
"A wounded adventurer has been located, necessitating urgent action to ensure their safety.",
|
||||
"Critical situation with a wounded adventurer located; medical personnel are needed for support.",
|
||||
"Immediate response needed to provide medical assistance to the wounded adventurer.",
|
||||
"A wounded adventurer has been found, posing a severe threat to their health; medical reinforcements are necessary.",
|
||||
"Emergency crews are requesting medical backup to assist in providing care to the wounded adventurer.",
|
||||
"An urgent call for help has been issued to handle a wounded adventurer and ensure their well-being.",
|
||||
"Responders are on the scene with a wounded adventurer and need extra support to provide necessary care.",
|
||||
"A serious emergency involving a wounded adventurer demands swift action to provide medical attention and ensure their recovery.",
|
||||
},
|
||||
CalloutUnitsRequired = {
|
||||
description = "Police, Ambulance, Fire.",
|
||||
policeRequired = true,
|
||||
ambulanceRequired = true,
|
||||
fireRequired = true,
|
||||
towRequired = false,
|
||||
},
|
||||
CalloutLocations = {
|
||||
[1] = vector3(-2018.5511, 7298.9761, 33.5327),
|
||||
[2] = vector3(-1760.0613, 7586.3652, 144.0277),
|
||||
[3] = vector3(-1436.0414, 7666.9263, 322.1493),
|
||||
[4] = vector3(-1310.2694, 7819.0005, 112.6630),
|
||||
[5] = vector3(-1512.3247, 8080.1509, 42.6374),
|
||||
[6] = vector3(-1986.1616, 8326.9473, 53.5735),
|
||||
[7] = vector3(-2109.8350, 8310.7412, 39.0122),
|
||||
[8] = vector3(-2905.3364, 7596.4253, 14.0765),
|
||||
[9] = vector3(-3712.5322, 7523.3833, 30.1363),
|
||||
[10] = vector3(-3044.6580, 7873.9575, 57.8766),
|
||||
},
|
||||
PedChanceToFleeFromPlayer = 0, -- Value between 0 and 100 -> Lower is less chance.
|
||||
PedChanceToAttackPlayer = 0, -- Value between 0 and 100 -> Lower is less chance.
|
||||
PedChanceToSurrender = 0, -- Value between 0 and 100 -> Lower is less chance.
|
||||
PedChanceToObtainWeapons = 0, -- Value between 0 and 100 -> Lower is less chance.
|
||||
PedActionMinimumTimeoutInMs = 0, -- Milliseconds for the minimum timeout time to start the secondary action listed above.
|
||||
PedActionMaximumTimeoutInMs = 1000, -- Milliseconds for the maximum timeout time to start the secondary action. Must be a higher number than the minimum!
|
||||
PedActionOnNoActionFound = "none", -- When no action of the above options is found. It'll perform this action after the set timeout. Options: "none", "attack", "flee", "surrender"
|
||||
PedWeaponData = { -- The ped will be given one randomly selected weapon (in hand) from these weapons if PedChanceToObtainWeapons passed.
|
||||
"weapon_unarmed",
|
||||
},
|
||||
client = function(plyPed, pedList, vehicleList, playersList, objectList, propList, fireList, smokeList, calloutDataClient)
|
||||
for index, pedNetId in pairs(pedList) do
|
||||
local ped = NetToPed(pedNetId)
|
||||
if DoesEntityExist(ped) then
|
||||
ERS_RequestNetControlForEntity(ped)
|
||||
TaskSetBlockingOfNonTemporaryEvents(ped, true)
|
||||
ERS_ApplyBloodToPed(ped)
|
||||
local scenario = ERS_SelectRandomWoundedPersonScenario()
|
||||
TaskStartScenarioInPlace(ped, scenario, 0, true)
|
||||
end
|
||||
end
|
||||
|
||||
ERS_CreateTemporaryBlipForEntities(pedList, 5000) -- short, to make it harder to find. :)
|
||||
ERS_PerformTimedActionOnPed(calloutDataClient, pedList)
|
||||
end,
|
||||
server = function(request, src, calloutData, pedList, vehicleList, objectList, propList, playersList, fireList, smokeList)
|
||||
-- Build ped
|
||||
local pedModel = ERS_GetRandomModel(Config.randomPeds)
|
||||
local pedCoords = vector3(calloutData.Coordinates.x, calloutData.Coordinates.y, calloutData.Coordinates.z)
|
||||
local pedHeading = math.random(360)
|
||||
local pedNetId = ERS_CreatePed(pedModel, pedCoords, pedHeading)
|
||||
local ped = NetworkGetEntityFromNetworkId(pedNetId)
|
||||
table.insert(pedList, pedNetId)
|
||||
|
||||
return true
|
||||
end
|
||||
}
|
||||
@@ -0,0 +1,125 @@
|
||||
Config.Callouts["smoking_weed"] = {
|
||||
|
||||
Enabled = true,
|
||||
CalloutName = "Reports of a person smoking weed",
|
||||
CalloutDescriptions = {
|
||||
"Investigate reports of a person smoking weed; locate the individual and assess the situation.",
|
||||
"Alert: dispatch units to check on reports of marijuana use in a public area; ensure compliance with laws.",
|
||||
"Units required: respond to reports of someone smoking weed and evaluate the circumstances.",
|
||||
"Notice: check reports of a person using marijuana; take necessary actions to maintain public order.",
|
||||
"Alert: respond promptly to reports of marijuana use; prioritize community safety and proper assessment.",
|
||||
"Incident reported: look into reports of a person smoking weed to understand the context and legality.",
|
||||
"Investigate reports of marijuana use; coordinate with local authorities to address the situation.",
|
||||
"Situation alert: address reports of a person smoking weed; work with relevant authorities if needed.",
|
||||
"Alert: handle reports of marijuana use and adhere to protocols for ensuring public safety and compliance.",
|
||||
"Response needed: investigate reports of a person smoking weed and take steps to ensure community standards are upheld.",
|
||||
},
|
||||
CalloutUnitsRequired = {
|
||||
description = "Police",
|
||||
policeRequired = true,
|
||||
ambulanceRequired = false,
|
||||
fireRequired = false,
|
||||
towRequired = false,
|
||||
},
|
||||
CalloutLocations = {
|
||||
[1] = vector3(558.51, -2590.25, 6.19),
|
||||
[2] = vector3(314.44, -997.08, 29.18),
|
||||
[3] = vector3(195.41, -948.04, 30.09),
|
||||
[4] = vector3(171.31, -1077.74, 29.19),
|
||||
[5] = vector3(34.17, -1025.83, 29.47),
|
||||
[6] = vector3(-137.15, -1180.85, 25.25),
|
||||
[7] = vector3(-306.71, -1167.35, 23.26),
|
||||
[8] = vector3(-318.98, -1334.59, 31.34),
|
||||
[9] = vector3(-356.58, -1483.50, 30.16),
|
||||
[10] = vector3(-342.61, -1566.72, 25.22),
|
||||
[11] = vector3(-429.75, -1721.61, 19.05),
|
||||
[12] = vector3(-575.62, -1793.78, 22.73),
|
||||
[13] = vector3(-249.28, -1939.75, 29.95),
|
||||
[14] = vector3(-331.26, -2171.95, 10.32),
|
||||
[15] = vector3(-809.27, -2328.58, 14.57),
|
||||
[16] = vector3(-1148.01, -1984.79, 13.16),
|
||||
[17] = vector3(-1247.68, -1711.14, 4.47),
|
||||
[18] = vector3(-1216.14, -1525.44, 4.26),
|
||||
[19] = vector3(-1285.50, -1408.50, 4.45),
|
||||
[20] = vector3(-1493.06, -1369.73, 2.15),
|
||||
[21] = vector3(-1817.37, -1240.33, 13.02),
|
||||
[22] = vector3(-1654.58, -362.49, 49.48),
|
||||
[23] = vector3(-1318.32, -152.82, 46.39),
|
||||
[24] = vector3(-516.12, -446.37, 34.19),
|
||||
[25] = vector3(-302.33, -262.08, 32.42),
|
||||
[26] = vector3(-188.07, -88.38, 52.18),
|
||||
[27] = vector3(-43.71, -12.89, 69.87),
|
||||
[28] = vector3(83.45, 33.97, 73.51),
|
||||
[29] = vector3(243.14, 117.53, 102.62),
|
||||
[30] = vector3(323.57, 174.77, 103.61),
|
||||
[31] = vector3(193.88, 296.12, 105.62),
|
||||
[32] = vector3(173.28, 387.58, 109.38),
|
||||
[33] = vector3(206.88, 777.59, 205.56),
|
||||
[34] = vector3(1221.91, 2722.65, 38.00),
|
||||
[35] = vector3(1771.69, 3306.27, 41.17),
|
||||
[36] = vector3(1633.14, 3559.25, 35.15),
|
||||
[37] = vector3(1646.57, 3725.12, 34.34),
|
||||
[38] = vector3(1767.44, 3754.12, 33.83),
|
||||
[39] = vector3(1978.10, 3759.90, 32.18),
|
||||
[40] = vector3(2461.98, 4063.67, 38.06),
|
||||
[41] = vector3(2108.17, 4767.26, 41.17),
|
||||
[42] = vector3(1695.52, 4784.01, 42.01),
|
||||
[43] = vector3(1669.93, 4768.75, 41.85),
|
||||
[44] = vector3(1429.15, 4384.90, 44.18),
|
||||
[45] = vector3(1684.00, 6422.10, 32.27),
|
||||
[46] = vector3(131.79, 6636.05, 31.81),
|
||||
[47] = vector3(76.80, 6347.70, 31.37),
|
||||
[48] = vector3(-18.15, 6392.06, 31.44),
|
||||
[49] = vector3(-104.94, 6256.18, 31.35),
|
||||
[50] = vector3(-252.48, 6213.64, 31.49),
|
||||
[51] = vector3(-329.01, 6222.01, 31.48),
|
||||
},
|
||||
PedChanceToFleeFromPlayer = 25, -- Value between 0 and 100 -> Lower is less chance.
|
||||
PedChanceToAttackPlayer = 25, -- Value between 0 and 100 -> Lower is less chance.
|
||||
PedChanceToSurrender = 10, -- Value between 0 and 100 -> Lower is less chance.
|
||||
PedChanceToObtainWeapons = 10, -- Value between 0 and 100 -> Lower is less chance.
|
||||
PedActionMinimumTimeoutInMs = 10000, -- Milliseconds for the minimum timeout time to start the secondary action listed above.
|
||||
PedActionMaximumTimeoutInMs = 15000, -- Milliseconds for the maximum timeout time to start the secondary action. Must be a higher number than the minimum!
|
||||
PedActionOnNoActionFound = "flee", -- When no action of the above options is found. It'll perform this action after the set timeout. Options: "none", "attack", "flee", "surrender"
|
||||
PedWeaponData = { -- The ped will be given one randomly selected weapon (in hand) from these weapons if PedChanceToObtainWeapons passed.
|
||||
"weapon_bat",
|
||||
"weapon_hammer",
|
||||
"weapon_wrench",
|
||||
"weapon_pistol",
|
||||
},
|
||||
|
||||
client = function(plyPed, pedList, vehicleList, playersList, objectList, propList, fireList, smokeList, calloutDataClient)
|
||||
|
||||
for index, pedNetId in pairs(pedList) do
|
||||
local ped = NetToPed(pedNetId)
|
||||
if DoesEntityExist(ped) then
|
||||
ERS_RequestNetControlForEntity(ped)
|
||||
local scenario = ERS_SelectRandomSmokeScenario()
|
||||
TaskStartScenarioInPlace(ped, scenario, 0, true)
|
||||
end
|
||||
end
|
||||
|
||||
ERS_CreateTemporaryBlipForEntities(pedList, 15000)
|
||||
|
||||
ERS_PerformTimedActionOnPed(calloutDataClient, pedList)
|
||||
|
||||
end,
|
||||
server = function(request, src, calloutData, pedList, vehicleList, objectList, propList, playersList, fireList, smokeList)
|
||||
|
||||
local diameter = 10
|
||||
|
||||
-- Build suspects
|
||||
local suspects = math.random(1, 3)
|
||||
for i = 1, suspects do
|
||||
local coords = ERS_GetRandomCoordinateWithinRangeOfCoordinate(calloutData.Coordinates, diameter)
|
||||
local pedModel = ERS_GetRandomModel(Config.randomGangPeds)
|
||||
local pedCoords = vector3(coords.x, coords.y, coords.z+1.0)
|
||||
local pedHeading = math.random(360)
|
||||
local pedNetId = ERS_CreatePed(pedModel, pedCoords, pedHeading)
|
||||
local ped = NetworkGetEntityFromNetworkId(pedNetId)
|
||||
table.insert(pedList, pedNetId)
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
}
|
||||
@@ -190,6 +190,8 @@ function OnNPCGivesGear(data)
|
||||
end
|
||||
end
|
||||
|
||||
exports("OnNPCGivesGear", OnNPCGivesGear)
|
||||
|
||||
-- ============================================
|
||||
-- FUNCTIONS
|
||||
-- ============================================
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -21,6 +21,11 @@ exports('getIsPlayerAttachedToCallout', function()
|
||||
return isAttachedToCallout
|
||||
end)
|
||||
|
||||
exports('getIsPlayerOfferedACallout', function()
|
||||
-- Returns: true or false
|
||||
return isOfferedCallout
|
||||
end)
|
||||
|
||||
exports('getIsPlayerTrackingUnit', function()
|
||||
-- Returns: true or false
|
||||
return isTrackingUnit.isTracking
|
||||
@@ -82,6 +87,10 @@ exports('ERS_ConnectClosestVehicle', function()
|
||||
ERS_ConnectClosestVehicle()
|
||||
end)
|
||||
|
||||
exports('getIsImperialEnabled', function()
|
||||
return Config.UseImperial
|
||||
end)
|
||||
|
||||
--====================== TEST COMMANDS ======================--
|
||||
|
||||
-- RegisterCommand('testclientexports', function()
|
||||
|
||||
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.
@@ -2,15 +2,15 @@ Config = Config or {}
|
||||
|
||||
Config = {
|
||||
|
||||
ConfigVersion = "1.8.1",
|
||||
ConfigVersion = "1.8.3",
|
||||
|
||||
Debug = false, -- Enable or disable Debug, recommended to set to false for improved gameplay (resmon is very high in debug mode).
|
||||
EventPrefix = "night_ers", -- Leave this be.
|
||||
Language = "us", -- Available languages: en | us | nl | de | fr | he | cs | pt-br | sv | (Ajust text in config/translations.lua)
|
||||
SoundLanguage = "us", -- Available languages: en | us | fr | de | (Ajust text in config/sound-config.lua)
|
||||
DOBFormat = "us", -- Options: en | us
|
||||
Language = "US", -- Available languages: en | us | nl | de | fr | he | cs | pt-br | sv | (Ajust text in config/translations.lua)
|
||||
SoundLanguage = "US", -- Available languages: en | us | fr | de | (Ajust text in config/sound-config.lua)
|
||||
DOBFormat = "US", -- Options: en | us
|
||||
UseImperial = false, -- Options: true = feet (mi) | false = meters (km) (Determines whether to display distances in feet (true) or meters (false))
|
||||
Timezone = "Europe/London", -- Set the timezone which the script uses. https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
|
||||
Timezone = "America/Los_Angeles", -- Set the timezone which the script uses. https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
|
||||
|
||||
--[[ IMPORTANT: https://docs.fivem.net/natives/?_0xA0F2201F
|
||||
[OPTIONS FOR ServerLockDownMode (below)]
|
||||
@@ -270,6 +270,9 @@ Config = {
|
||||
|
||||
-- Tow Tools
|
||||
ConnectClosestVehicle = "", -- Button to connect the closest vehicle to the towing vehicle. (None by default)
|
||||
|
||||
-- Redisplay Last Module
|
||||
RedisplayLastModule = "TAB", -- Button to redisplay the last shown module (ID card, vehicle info, or inventory).
|
||||
},
|
||||
|
||||
Commands = {
|
||||
@@ -328,6 +331,9 @@ Config = {
|
||||
-- Tow Tools
|
||||
ConnectClosestVehicle = "ccv",
|
||||
|
||||
-- Redisplay Last Module
|
||||
RedisplayLastModule = "redisplaylastmodule",
|
||||
|
||||
-- Hints
|
||||
ToggleHints = "togglehints",
|
||||
},
|
||||
@@ -387,6 +393,9 @@ Config = {
|
||||
-- Tow Tools
|
||||
ConnectClosestVehicle = "Command used to connect the closest vehicle to the towing vehicle.",
|
||||
|
||||
-- Redisplay Last Module
|
||||
RedisplayLastModule = "Command used to redisplay the last shown module (ID card, vehicle info, or inventory).",
|
||||
|
||||
-- Hints
|
||||
ToggleHints = "Command used to toggle hints at certain events.",
|
||||
},
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user