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(vehicleid, killerid)
{
DestroyVehicle(vehicleid); // Vehicle is destroyed
return 1;
}
Re: How to create car without respawn? -
Moudix - 14.07.2015
PHP код:
(modelid, Float:x, Float:y, Float:z, Float:angle, color1, color2, respawn_delay, addsiren=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 seconds. Using -1 will prevent the vehicle from respawning.
addsiren Added in 0.3.7; will not work in earlier versions. Has a default value 0. Enables the vehicle to have a siren, providing 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(vehicleid, killerid)
{
DestroyVehicle(vehicleid); // Vehicle is destroyed
return 1;
}
|
thanks it worked

i was using on veh respawn -.-