/siren not creating object specified +rep help please.
#1

Hello guys, so I have a /siren cmd:
PHP код:
                    VehSirenState[vehicleid] = 1;
                    
VehSirenObject[vehicleid] = CreateDynamicObject(1864610.010.010.0000);
AttachDynamicObjectToVehicle(VehSirenObject[vehicleid], vehicleid0.225000,0.524999,0.375000,0.000000,0.000000,0.000000); Blah blah blah 
Note that this command worked good before I added an interior with mapping to the gamemode.

This command (it's not all in there) will activate, create and attach that object "18646", the lil siren. The problem is that when I use /siren, a random object gets spawned and attached to the vehicle, and it's so annoying. I thought it could be a problem with interiors or something, but I have no idea. Any help is appreciated, and I'll +rep for sure if you can help me. Thank you
Reply
#2

Make sure you create the dynamic object near the vehicle and the player. so it streams correct object.

Get the coordinates from GetVehiclePos on vehicleid then use the x y z on CreateDynamicObject.

You can also check using Streamer_IsItemVisible to see if the created dynamic object is streamed for the player.
Reply
#3

Hey man, thank you for your response, I found out what was happening, and it was that I was using AttachObjectToVehicle instead of AttachDynamicObjectToVehicle for an streamer object. Anyway thanks for your help.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)