Set veh respawn delay on ped exit

This commit is contained in:
Vortrex
2021-12-11 20:16:40 -06:00
parent b27513d9fa
commit a49dc41096

View File

@@ -390,6 +390,8 @@ function onPlayerExitedVehicle(client, vehicle) {
}
}
getVehicleData(vehicle).respawnTime = getCurrentUnixTimestamp() + getGlobalConfig().vehicleInactiveRespawnDelay;
logToConsole(LOG_DEBUG, `[VRR.Event] ${getPlayerDisplayForConsole(client)} exited a ${getVehicleName(vehicle)} (ID: ${vehicle.getData("vrr.dataSlot")}, Database ID: ${getVehicleData(vehicle).databaseId})`);
}
@@ -555,9 +557,6 @@ function onPlayerSpawn(client) {
logToConsole(LOG_DEBUG, `[VRR.Event] Sending custom keybinds to ${getPlayerDisplayForConsole(client)}`);
sendAccountKeyBindsToClient(client);
//setTimeout(function() {
// sendAccountKeyBindsToClient(client);
//}, 5000);
logToConsole(LOG_DEBUG, `[VRR.Event] Setting ${getPlayerDisplayForConsole(client)}'s switchchar state to false`);
getPlayerData(client).switchingCharacter = false;