Check cash for renting veh
This commit is contained in:
@@ -569,6 +569,11 @@ function rentVehicleCommand(command, params, client) {
|
||||
}
|
||||
}
|
||||
|
||||
if(getVehicleData(vehicle).rentPrice > getPlayerCurrentSubAccount(client).cash) {
|
||||
messagePlayerError(client, getLocaleString(client, "NotEnoughCashNeedAmountMore", getVehicleData(vehicle).rentPrice-getPlayerCurrentSubAccount(client).cash));
|
||||
return false;
|
||||
}
|
||||
|
||||
getVehicleData(vehicle).rentedBy = client;
|
||||
getPlayerData(client).rentingVehicle = vehicle;
|
||||
getVehicleData(vehicle).rentStart = getCurrentUnixTimestamp();
|
||||
|
||||
Reference in New Issue
Block a user