SA-MP Forums Archive
Faction cars goes invisable after server restart/start - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Faction cars goes invisable after server restart/start (/showthread.php?tid=432920)



Faction cars goes invisable after server restart/start - Don_Cage - 24.04.2013

How can i fix this problem? is there any plugin or something that would help me?
It is not all faction cars but many of them. And then i must go respawn them one by one for them to be visable again and that is starting to become pretty boring.. So if anyone got an idea how to fix this i would be very glad to hear it!

This is how i add cars in the script (if that would help)
pawn Код:
armycar[39] = AddStaticVehicleEx(579,193.3994100,1813.5000000,17.7000000,0.0000000,99,1,30000);



Re: Faction cars goes invisable after server restart/start - flyde - 24.04.2013

Are you trying to add them inside an interior?


Re: Faction cars goes invisable after server restart/start - Don_Cage - 24.04.2013

No, Just normal outside


Re: Faction cars goes invisable after server restart/start - Skyrise - 24.04.2013

pawn Код:
SetVehicleToRespawn(A_VEHICLE_ID); // no, do not use A_VEHICLE_ID
Try a loop and have it respawn the vehicles after they are created. Might help.


Re: Faction cars goes invisable after server restart/start - Don_Cage - 24.04.2013

Ok but how do i do that?


Re: Faction cars goes invisable after server restart/start - dannyk0ed - 24.04.2013

Quote:
Originally Posted by Don_Cage
Посмотреть сообщение
Ok but how do i do that?
pawn Код:
for(new i = 0; i < sizeof(armycar); i++)
{
    SetVehicleToRespawn(armycar[i]);
}



Re: Faction cars goes invisable after server restart/start - Don_Cage - 24.04.2013

where do i put that?


Re: Faction cars goes invisable after server restart/start - Skyrise - 24.04.2013

Quote:
Originally Posted by Don_Cage
Посмотреть сообщение
where do i put that?
Quote:
Originally Posted by Skyrise
Посмотреть сообщение
after they are created. Might help.
That. ^


Re: Faction cars goes invisable after server restart/start - Don_Cage - 25.04.2013

Nope, still the same thing. It didnt work


Re: Faction cars goes invisable after server restart/start - jakejohnsonusa - 25.04.2013

The vehicle ID is trying to be added to an interior somewhere in the GM, I can't remember the function for it. Somthing like SetVehicleInterior, find that in the GM and remove the ones that shouldn't be there.

This is a Ravens RP problem...

If you can don't use Ravens RP. It's full of these type of annoying bugs.


Re: Faction cars goes invisable after server restart/start - Don_Cage - 25.04.2013

Yes i know it is, but im using those bugs to learn more about scripting etc, allready fixed alot of them so i dont wanna stop now


Re: Faction cars goes invisable after server restart/start - Don_Cage - 25.04.2013

pawn Код:
LinkVehicleToInterior(84, 7);
    LinkVehicleToInterior(85, 7);
    LinkVehicleToInterior(86, 7);
    LinkVehicleToInterior(87, 7);
    LinkVehicleToInterior(88, 4);
    LinkVehicleToInterior(89, 4);
    LinkVehicleToInterior(90, 4);
    LinkVehicleToInterior(91, 4);
    LinkVehicleToInterior(92, 14);
    LinkVehicleToInterior(93, 14);
    LinkVehicleToInterior(94, 14);
    LinkVehicleToInterior(95, 14);
    LinkVehicleToInterior(96, 14);
this is what i have, i figgured that the last 2 numbers are the interior, but what is the first 2? the id of the car?


Re: Faction cars goes invisable after server restart/start - jakejohnsonusa - 25.04.2013

Well your best bet is to remove all of Find the hotring cars in the Race Stafium, use this function for them, and delete the rest from the list.

This may help: https://sampwiki.blast.hk/wiki/InteriorCars


Re: Faction cars goes invisable after server restart/start - Don_Cage - 25.04.2013

Thanks, helped alot! +REP for you