07.09.2012, 07:08
Код:
// Declaring SirenObject1,2,3,etc. (Top of Script somewhere) static SirenObject1[2000]; // change 2000 to the number of vehicles in your server though static SirenObject2[2000]; static SirenObject3[2000]; // Siren On Code: SirenObject1[VID] = CreateObject();// Of course you'll need to fill in the object info :P SirenObject2[VID] = CreateObject(); SirenObject3[VID] = CreateObject(); // Siren Off Code: DestroyObject(SirenObject1[VID]); DestroyObject(SirenObject2[VID]); DestroyObject(SirenObject3[VID]);
There are far greater ways to do this, but kept it real simple so you can grasp the basic concept
(But it will be vital later on to practice good optimized code and learning everything about mem/cpu usage etc.)
As for moving attached objects inside the vehicle, I've never attempted this, so I don't know if possible or not. But just play around with the cordinates and see what can be done. If you cant seem to move the object inside at all, then it's not likely possible... (Try placing the object way in the vehicle just to see if its even possible)
EDIT: Just noticed the REP comment, but I responded to help, not to gain REP (That part is completely optional)