SA-MP Forums Archive
Scripting Help - 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: Scripting Help (/showthread.php?tid=526121)



Scripting Help - kirostar - 15.07.2014

I want to add vehicles for my DM Zone called (War)

So i added AddStaticVehicle and their parameters and compiled without any error!, When i restarted the server the vehicles are not saved!?

Help


Re: Scripting Help - Clad - 15.07.2014

It depends on the Virtual Worlds, Maybe you didn't put the in the right place.


Re: Scripting Help - kirostar - 15.07.2014

No, I'm in the vehicle and typed, /save and opened savedpositions.txt in the gta sanandreas documents.
The other places with vehicles working.!


Re: Scripting Help - kirostar - 15.07.2014

Anyone help me! :/


Re: Scripting Help - kirostar - 15.07.2014




Re: Scripting Help - Dignity - 15.07.2014

Did you put the vehicles in your script?


Re: Scripting Help - kirostar - 15.07.2014

Yes.


Re: Scripting Help - saffierr - 15.07.2014

Then it's a weird problem


Re: Scripting Help - kirostar - 15.07.2014

Yess!!, Do you have any another way to save vehicles!!?


Re: Scripting Help - Jacob756 - 15.07.2014

Hello,

Try this Tutorial

Tutorial:

At top of the script:
Code:
#include blahblahblah whatever
Add this "new carname; ( name it as you want )"

Go to the vehicle lines and add this:

Code:
carname = AddStaticVehicle(blah,blah,blah);
And go to the war command and see its virtual world e.g: My /war is at virtual world 88888

I do this:

Code:
CMD:war(playerid, params[])
{
   SetPlayerPos(playerid,2490.4089,-1662.9949,13.3359);
   SetPlayerVirtualWorld(playerid, 88888);
   GameTextForPlayer(playerid, "~g~Welcome ~y~To ~r~War", 2000, 5);
   return 1;
}
Now that's the tricky part:
Add
Code:
SetVehicleVirtualWorld(carname, 88888);
to the command FOR EACH VEHICLE.

And we're done, compile the script and try

++REP if works