Vehicle IDs
#1

Well I'm just curious. Does it make sense to set a vehicleid to 0 when the vehicle gets destroyed?
Example:

pawn Код:
for(new i=0; i<8; i++)
{
    DestroyVehicle(OrgInfo[orgid][Vehicle][i]);
    OrgInfo[orgid][Vehicle][i] = 0;
}
Reply
#2

actually yes.. i think yes because when you destroy it it's actually dissapeared so it's actually vehicleid 0 dunno prbbly yes
Reply
#3

Well okay, anyone else has the same opinion?
Reply
#4

I don't think there's anything wrong with it, but if a car is destroyed accidently and you want it back - then leaving it with the original ID may help to bring it back to you (if you have the command for it, that is )

But yeah, it's your choice - I guess!
Reply
#5

That's ok because normal IDs start from 1 and over. So this won't cause any bugs and you will be able to use it like "YourVehicle == 0" to know if it's alive.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)