[HELP]DestroyVehicle and other question
#1

In my script i have a CreateVehicle and then a DestroyVehicle for that Car...Does desroy vehicle remove it from the script or simply respawn it?


also, in these code am i carrying the Car id for the created vehicle propaly..

car being made
Код:
	new carcreated = CreateVehicle(CarId,Carx,Cary,Carz,Carangle,randcolor,randcolor,10000);
	
	playercarid[playerid] = GetPlayerVehicleID(carcreated);
and this is being destroyed

Код:
	new carid = playercarid[playerid];
	
	DestroyVehicle(carid);
Reply
#2

Destroying a vehicle removes it from the server. It is gone and the vehicle id is marked as invalid or something. It doesn't like physically remove it from the script if that's what you're asking. It doesn't set it to respawn, it just deletes it. And your second question, yes, that is how you would do it.
Reply
#3

If You Want to Respawn your Vehicle Use this :

Код:
#define RESPAWN_TIME 10000 // 10 Seconds
new randcolor = -1; // -1 of Random Car Color

new Car = CreateVehicle(CarId,Carx,Cary,Carz,Carangel,randcolor,randcolor,RESPAWN_TIME);
new Vi = GetPlayerVehicleID(playerid, Car);
SetVehicleToRespawn(Vi);
regards
[GM]The_Don
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)