SA-MP Forums Archive
How to create car without respawn? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: How to create car without respawn? (/showthread.php?tid=581615)



How to create car without respawn? - karemmahmed22 - 14.07.2015

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


Re: How to create car without respawn? - karemmahmed22 - 14.07.2015

BIMP!


Re: How to create car without respawn? - X337 - 14.07.2015

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




Re: How to create car without respawn? - Moudix - 14.07.2015

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.


Re: How to create car without respawn? - karemmahmed22 - 14.07.2015

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);




Re: How to create car without respawn? - karemmahmed22 - 14.07.2015

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 -.-