Setcarmodel
#1

Okay, I use the vortex RP gamemode, anyways I hate that you cant delete spawned vehicles, so I was wondering if there was a way to create a command, /setcarmodel, and you can specify the ID of the vehicle and change the model of it.

For example car ID 10 is a huntley, and its saved to the vehicles.json file, and I wanted to turn it into an infernus, I can type /setcarmodel 10 411 and it will edit the vehicles.json file to find V_10 and change "Model":HUNTLEYID to
"model":411 and respawn the vehicle.

Syntax: /setcarmodel [CarID] [NewModel]

Vortex is used with DCMD
Reply
#2

In the command, you can delete the vehicle, and respawn a new model in its place. This will be effective immediately. Or you can have it modify the file and it will work the next time the vehicles load.
Reply
#3

Well, I have /despawncar but it doesnt remove the vehicle from the vehicles file. But if you could get it to work to remove the vehicle from the files and then spawn a new car there.

Or.. you can just have it delete the vehicle from the vehicles file...
Reply
#4

Basically, on the CMD, get the ID of the current car and the new model he typed for /setcarmodel, then use the DestroyVehicle function and have it AddStaticVehicle (or whatever you want to use) and make it the car model they requested. But you may also want to think about the car's colors..
Reply
#5

No.. I said already that /despawncar doesnt destroy the vehicle.. And /despawncar uses DestroyVehicle...
Its saved to a file and you cant despawn it <.<
Reply
#6

Quote:
Originally Posted by patfay
Посмотреть сообщение
No.. I said already that /despawncar doesnt destroy the vehicle.. And /despawncar uses DestroyVehicle...
Its saved to a file and you cant despawn it <.<
then make a file that uses the djRemove(

Quote:
Originally Posted by patfay
Посмотреть сообщение
Vortex is used with DCMD
wrong, its ZCMD
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)