Cars don't respawn modded
#1

Hello,
In our server we use stream vehicles which when you mod the respawn modded forever, but with sa-mp 0.3 RC-1-5 the cars don't respawn modded... is that a problem with our script or sa-mp 0.3? We have tested and checked our script and it stayed the same as it always were, we used backups and all but still same results.

Please answer weather its our script or sa-mp so we can proceed into fixing it.

Thanks,
AF1
Reply
#2

this isnt a bug (well, maybe it is) its like that since the first time addstaticcomponent (or something like that) apeared.
on OnVehicleSpawn ( or something like that ) add those addstaticcomponent agen
Reply
#3

Well i have the function under OnVehicleSpawn(); modvehicle(vehicleid); to re-mod the vehicle on spawn.. but i guess i'll try a few things, but thanks for the reply

AF1
Reply
#4

Quote:
Originally Posted by Seif_ [adream-rp.com
]
Make sure you re-mod them in OnVehicleStreamIn.
Thanks for the reply seif but still same thing, i have run a test and i see that when a vehicle is modded its not writting the data to the files anymore, dam all this is weird used to work fine.. it doesn't write the modding data to the file anymore but it does write the data for who owns it and the cords x, y, z of where it has been parked, but the modding isn't. What could be the problem?

Thanks,
AF1
Reply
#5

Quote:
Originally Posted by Seif_ [adream-rp.com
]
Make sure you re-mod them in OnVehicleStreamIn.
This is not true. You don't need to reapply vehicle mods unless they respawn. Streaming the mods is automatically handled by the server.
Reply
#6

Quote:
Originally Posted by Kye
Quote:
Originally Posted by Seif_ [adream-rp.com
]
Make sure you re-mod them in OnVehicleStreamIn.
This is not true. You don't need to reapply vehicle mods unless they respawn. Streaming the mods is automatically handled by the server.
Thank for the reply Kye, but i have tried both ways as onvehiclespawn to mod the vehicles or without still same. But i'll have to keep trying cause, this server was gonna be a blast so i needed this problem to be fixed A.S.A.P.. So thanks anyways guys, for all.

AF1
Reply
#7

Works fine for me at the moment, however I use a timer of 3 seconds under OnVehicleSpawn to set the mods.
Reply
#8

I think it's better to remod the vehicle in OnPlayerStreamIn than with a timer, but only ONCE. So you have to set a flag saying that the vehicle is already modded and don't touch it anymore if the flag is present.
I do it this way as i already have such flag.
Reply
#9

Quote:
Originally Posted by Wicko
I think it's better to remod the vehicle in OnPlayerStreamIn than with a timer, but only ONCE. So you have to set a flag saying that the vehicle is already modded and don't touch it anymore if the flag is present.
I do it this way as i already have such flag.
The vehicle is already modded when it streams in. The only time mods are removed is when it respawns. So even though the system is rewritten it should work exactly as it did in 0.2X but now you can get access to individual mods in each slot.
Reply
#10

We can't mod vehicles directly in OnVehicleSpawn, so we've been looking for ways around this and many developers have used timers to mod vehicles after their spawn. However now we've got OnVehicleStreamIn, which is called after OnVehicleSpawn from what I've experienced, so we may leave timers and mod the vehicle in (only) the first call of OnVehicleStreamIn after OnVehicleSpawn for this particular vehicle.

This is what i mean Regards.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)