SA-MP Forums Archive
Make StaticVehiclesFromFile into a team vehicle - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Make StaticVehiclesFromFile into a team vehicle (/showthread.php?tid=144418)



Make StaticVehiclesFromFile into a team vehicle - boelie - 27.04.2010

Hello,

I wonder if theres any way to set the vehicles you load from a file into a value.
I tried this;

Код:
new taxi;
Код:
taxi = total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/lv_taxi.txt");
then under onplayerstatechange

Код:
	if(newstate == PLAYER_STATE_DRIVER)
	{	
new bam = GetPlayerVehicleID(playerid);	
if(bam == taxi)
{
blablabla
 		{
eventually i want to make them into a team or lock them all


Re: Make StaticVehiclesFromFile into a team vehicle - boelie - 28.04.2010

hmm...can anyone please help me?


Re: Make StaticVehiclesFromFile into a team vehicle - dice7 - 28.04.2010

It is possible to pass an array as reference to the function (you'll need to edit the function first to make it save the vehicle ids into the array), but this is very unhandy, since the array will need to be a set size, while the vehicle count in a file can be unlimited


Re: Make StaticVehiclesFromFile into a team vehicle - boelie - 28.04.2010

Hmm ye... i'll better look for an alternative i guess
thanks man