Changing Objects
#1

Hey guys!

I have an object attached to a vehicle:
Код:
    SirenC = CreateObject(19419, 10.0, 10.0, 10.0, 0, 0, 0);
    AttachObjectToVehicle(SirenC, SDVehicle[i], -0.032000, -0.209999, 0.829999, 0.000000, 0.000000, 0.000000);
I want to make it so that when someone presses the button 'H', the object switches from 19419 to 19420.
Is this possible? If so, How can I do it?
Reply
#2

Use the callback OnPlayerKeyStateChange. When you switch between the objects, don't forget to destroy the old object attached on your car BEFORE creating a new one. I think you got what I meant.

Good luck!
Reply
#3

Could you help me make that code really quickly? :P
Reply
#4

Quote:
Originally Posted by Jigsaw123
Посмотреть сообщение
Could you help me make that code really quickly? :P
Yes, but you need to wait some hours until I get at my home!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)