Add cruise control command and net events

This commit is contained in:
Vortrex
2022-07-23 04:16:19 -05:00
parent d04b5549a6
commit 74062a7d36
4 changed files with 77 additions and 4 deletions

View File

@@ -1859,10 +1859,30 @@ function getVehicleColourInfoString(colour, isRGBA) {
// ===========================================================================
function setVehicleCruiseControlCommand(command, params, client) {
function toggleVehicleCruiseControlCommand(command, params, client) {
if (!isPlayerInAnyVehicle(client)) {
messagePlayerError(client, getLocaleString(client, "MustBeinVehicle"));
return false;
}
if (!isPlayerInVehicleDriverSeat(client)) {
return false;
}
sendPlayerToggleVehicleCruiseControl(client);
}
}
// ===========================================================================
function isPlayerInVehicleDriverSeat(client) {
if (!isPlayerInAnyVehicle(client)) {
return false;
}
if (getPlayerVehicleSeat(client) != 0) {
return false;
}
return false;
}
// ===========================================================================