Fix vehlock cmd, add passenger cmd

This commit is contained in:
Vortrex
2020-12-24 19:37:27 -06:00
parent 16b11a72f0
commit f22410881c

View File

@@ -193,7 +193,8 @@ function createTemporaryVehicleCommand(command, params, client) {
function vehicleLockCommand(command, params, client) {
let vehicle = getClosestVehicle(getPlayerPosition(client));
if(!getPlayerVehicle(client) && getVehiclePosition(vehicle).distance(getPlayerPosition(client)) > getServerConfig().vehicleLockDistance) {
if(!getPlayerVehicle(client) && getDistance(getVehiclePosition(vehicle), getPlayerPosition(client)) > getServerConfig().vehicleLockDistance) {
messageClientError(client, "You need to be in or near a vehicle!");
return false;
}
@@ -432,6 +433,12 @@ function rentVehicleCommand(command, params, client) {
// ---------------------------------------------------------------------------
function enterVehicleAsPassengerCommand(command, params, client) {
triggerNetworkEvent("ag.passenger", client);
}
// ---------------------------------------------------------------------------
function stopRentingVehicleCommand(command, params, client) {
//getClientCurrentSubAccount(client).cash -= getVehicleData(vehicle).rentPrice;
let vehicle = getClientCurrentSubAccount(client).rentingVehicle;