How to create car without respawn?
#1

The title saying everything, i need to create this vehicle

Код:
CreateVehicle( 496,2040.804,y+3,z,facing,0,0,-1);
Without respawning ( even when destroyed, i already made it dont respawn if i left it but, i need when the car destroyed it dont respawn) is this possible? and how? i tried smth in OnVehicleSpawn callback
Код:
 DestroyVehicle(vehicleid);
but no thing works
Reply
#2

BIMP!
Reply
#3

Use OnVehicleDeath callback.
Example :
PHP код:
public OnVehicleDeath(vehicleidkillerid)
{
    
DestroyVehicle(vehicleid); // Vehicle is destroyed
    
return 1;

Reply
#4

PHP код:
(modelidFloat:xFloat:yFloat:zFloat:anglecolor1color2respawn_delayaddsiren=0)
modelid    The model for the vehicle.
Float:X    The X coordinate for the vehicle.
Float:Y    The Y coordinate for the vehicle.
Float:Z    The Z coordinate for the vehicle.
Float:angle    The facing angle for the vehicle.
color1    The primary color ID.
color2    The secondary color ID.
respawn_delay    The delay until the car is respawned without a driver in secondsUsing -1 will prevent the vehicle from respawning.
addsiren    Added in 0.3.7will not work in earlier versionsHas a default value 0. Enables the vehicle to have a sirenproviding the vehicle has a horn
Use -1 to prevent it from respawning.
Reply
#5

I mean , if the car BLOWED UP or FALL IN WATER it dont respawn, i already used -1 in respawn delay
Quote:

CreateVehicle( 496,2040.804,y+3,z,facing,0,0,-1);

Reply
#6

Quote:
Originally Posted by X337
Посмотреть сообщение
Use OnVehicleDeath callback.
Example :
PHP код:
public OnVehicleDeath(vehicleidkillerid)
{
    
DestroyVehicle(vehicleid); // Vehicle is destroyed
    
return 1;

thanks it worked
i was using on veh respawn -.-
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)