Fix vehlock cmd, add passenger cmd
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user