Use cmd arg/param util

This commit is contained in:
Vortrex
2022-01-09 17:42:57 -06:00
parent b24a591046
commit 64b3628b25
17 changed files with 153 additions and 211 deletions

View File

@@ -464,9 +464,8 @@ function vehicleAdminColourCommand(command, params, client) {
return false;
}
let splitParams = params.split(" ");
let colour1 = toInteger(splitParams[0]) || 0;
let colour2 = toInteger(splitParams[1]) || 0;
let colour1 = toInteger(getParam(params, " ", 1)) || 0;
let colour2 = toInteger(getParam(params, " ", 2)) || 0;
takePlayerCash(client, getGlobalConfig().resprayVehicleCost);
updatePlayerCash(client);
@@ -542,7 +541,6 @@ function vehicleAdminLiveryCommand(command, params, client) {
return false;
}
let splitParams = params.split(" ");
let livery = toInteger(params) || 3;
takePlayerCash(client, getGlobalConfig().resprayVehicleCost);