Vehicle bug text
#1

Hi, i made an update where i players can put theirs name on the vehicle, but when the personal vehicle of player is being despawned the vehicle's name appear on other vehicle created with commands: here i have a link how the bug appears: https://*********/0UopwWj857k anyone can help me? When a player despawn his vehicle the text is being destroyed with DestroyObject and the vehicle have id 135 and and another vehicle is being created instead of id 135 the text from the vehicle destroyed appears on the new vehicle created.
Reply
#2

Not properly destroyed or the text is being recreated. Vehicleids are reused so if you destroy the vehicle in slot 135 then that slot opens up for a new vehicle.
Reply
#3

Quote:
Originally Posted by Vince
Посмотреть сообщение
Not properly destroyed or the text is being recreated. Vehicleids are reused so if you destroy the vehicle in slot 135 then that slot opens up for a new vehicle.
But how i can fix that? I don't want the text from the personal vehicle to appears on other vehicles spawned.
Reply
#4

OnVehicleSpawn(vehicleid) >
Код:
if(IsValidDynamicObject(Vehicle[vid][vehicle_label]) DestroyDynamicObject(Vehicle[vid][vehicle_label]);
Or in custom deletevehicle function, i dont saw your code.
You have to place code like that everywhere you destroying vehicle.
Reply
#5

Quote:
Originally Posted by raydx
Посмотреть сообщение
OnVehicleSpawn(vehicleid) >
Код:
if(IsValidDynamicObject(Vehicle[vid][vehicle_label]) DestroyDynamicObject(Vehicle[vid][vehicle_label]);
Or in custom deletevehicle function, i dont saw your code.
You have to place code like that everywhere you destroying vehicle.
Same, nothing changed.
Reply
#6

Quote:
Originally Posted by Morpheine
Посмотреть сообщение
Same, nothing changed.
Where have you put this, and what did you do in order to make it bug up?
Reply
#7

Quote:
Originally Posted by denNorske
Посмотреть сообщение
Where have you put this, and what did you do in order to make it bug up?
I put it on OnVehicleDeath(vehicleid) and on OnvehicleSpawn
Reply
#8

A vehicle that dies, is not "destroyed" unless you define it to do so.
It will eventually respawn at some point, and the car ID remains taken.

The only function that destroys a vehicle, is DestroyVehicle.

So whenever you destroy a vehicle, you may add that code.

What are you doing at "OnVehicleSpawn" ?
Reply
#9

I solved it, i removed the system.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)