Some new unfinished stuff

This commit is contained in:
Vortrex
2021-10-25 13:08:51 -05:00
parent 9f0cb3d949
commit 9c051c0d70
3 changed files with 37 additions and 0 deletions

View File

View File

@@ -0,0 +1,28 @@
// ===========================================================================
// Vortrex's Roleplay Resource
// https://github.com/VortrexFTW/gtac_roleplay
// ===========================================================================
// FILE: taxi.js
// DESC: Provides taxi driver NPC interaction and functionality
// TYPE: Server (JavaScript)
// ===========================================================================
function attemptToSignalToNearbyTaxi(client) {
if(!isPlayerLoggedIn(client)) {
return false;
}
if(!isPlayerSpawned(client)) {
return false;
}
let nearbyTaxis = getVehicles().filter((v) > getPlayerPosition(client).distance(v.position) <= 15 && isTaxiVehicle(v));
let closestTaxi = nearbyTaxis.reduce((i, j) => (i.position.distance(pos) < j.position.distance(pos)) ? i : j);
if(!closestTaxi.getOccupant(0).isType(ELEMENT_PLAYER)) {
setVehicleCruiseSpeed(closestTaxi, 0.0);
setVehicleLockedState(closestTaxi, false);
}
}
// ===========================================================================

9
scripts/server/theme.js Normal file
View File

@@ -0,0 +1,9 @@
// ===========================================================================
// Vortrex's Roleplay Resource
// https://github.com/VortrexFTW/gtac_roleplay
// ===========================================================================
// FILE: theme.js
// DESC: Provides server theme content
// TYPE: Server (JavaScript)
// ===========================================================================