Vice City: Multiplayer

Server Development => Scripting and Server Management => Topic started by: KAKAN on Jul 25, 2015, 10:41 AM

Title: CreateVehicle
Post by: KAKAN on Jul 25, 2015, 10:41 AM
I want to spawn a vehicle, how can I?
for ex
else if ( cmd == "cbike" )
{
CreateVehicle( 6401, player.World, player.Pos, 0, 12, 13 )
}

Now tell me how can I spawn the vehicle, the code given there isn't working, I have tried with default vehicles too, nothing works
Can anyone tell me how to spawn a vehicle
Title: Re: CreateVehicle
Post by: [VSS]Shawn on Jul 25, 2015, 10:56 AM
http://forum.vc-mp.org/?topic=1122.new#new

Title: Re: CreateVehicle
Post by: DizzasTeR on Jul 25, 2015, 11:07 AM
The vehicle IDs Start from 130 to 236, So I suppose its not working due to an invalid ID.
Title: Re: CreateVehicle
Post by: MacTavish on Jul 25, 2015, 11:22 AM
Quote from: Doom_Killer on Jul 25, 2015, 11:07 AMThe vehicle IDs Start from 130 to 236, So I suppose its not working due to an invalid ID.

Thats the custom vehice

@KAKAN try

else if ( cmd == "cbike" )
{
CreateVehicle( 6401, player.World, Vector(player.Pos.x, player.Pos.y, player.Pos.z), 0, 12, 13 );
}
Title: Re: CreateVehicle
Post by: KAKAN on Jul 25, 2015, 12:44 PM
Oh my god thanks man, it worked!
I have spawnveh cmd, but it works only if I type the ID, anyways thanks again