SA-MP Forums Archive
[HELP] DestroyVehicle - 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: [HELP] DestroyVehicle (/showthread.php?tid=554145)



[HELP] DestroyVehicle - Last_Shadow - 02.01.2015

I need help.

PHP код:
new Car[3];
*
I createing 3 cars for event
Car
[0] = CreateVehicle(580,2131.9092,1715.0366,10.4514,55.6515,106,122); //
Car[1] = CreateVehicle(580,2131.9092,1715.0366,10.4514,55.6515,106,122); //
Car[2] = CreateVehicle(580,2131.9092,1715.0366,10.4514,55.6515,106,122); //
and when the event is over i want to  Destroy them
DestroyVehicle
(Car[0]);
DestroyVehicle(Car[1]);
DestroyVehicle(Car[2]); 
and its not working,it spawn 3 cars but it wont destroy none of them
if i do
PHP код:
new Car1;
new 
Car2;
new 
Car3;
Car1 CreateVehicle(580,2131.9092,1715.0366,10.4514,55.6515,106,122); //
Car2 CreateVehicle(580,2131.9092,1715.0366,10.4514,55.6515,106,122); //
Car3 CreateVehicle(580,2131.9092,1715.0366,10.4514,55.6515,106,122); //
DestroyVehicle(Car1);
DestroyVehicle(Car2);
DestroyVehicle(Car3); 
it works,spawn 3 cars and destroy them
what i did worng with new Car[3];


Re: [HELP] DestroyVehicle - MrCallum - 02.01.2015

Well your placing the three at the same coordinates

Код:
Car1 = CreateVehicle(580,2131.9092,1715.0366,10.4514,55.6515,106,122); // 
Car2 = CreateVehicle(580,2131.9092,1715.0366,10.4514,55.6515,106,122); // 
Car3 = CreateVehicle(580,2131.9092,1715.0366,10.4514,55.6515,106,122); //



Re : [HELP] DestroyVehicle - Last_Shadow - 02.01.2015

i know i know i just did it for the post, i use diffrent coordinates.
but for the main question what did i do worng?


Re: [HELP] DestroyVehicle - ATGOggy - 02.01.2015

Show your exact codes, not the one you created for showing us.
There is no mistake here so, the mistake would probable be in the real codes.


Re : [HELP] DestroyVehicle - Last_Shadow - 02.01.2015

I cant belive it.. allways the same things!!
the most little thing can bug!! 3-4 hours and what was the bug?
insted of:
CreateVehicle(580,2131.9092,1715.0366,10.4514,55.6 515,106,122);
i was needed to add the ,0 [time for car to respawn].
now when i ass time to respawn
CreateVehicle(580,2131.9092,1715.0366,10.4514,55.6 515,106,122,0);
it work O.0