SA-MP Forums Archive
Default vehicle streamer - 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: Default vehicle streamer (/showthread.php?tid=106286)



Default vehicle streamer - Jokel317 - 02.11.2009

Hello all I was wondering if anybody could help me figure out how turn the grandlarc vehicle system into a working filterscript for other gamemodes. Thanks for looking.





Код:
#include "../include/gl_common.inc"

new total_vehicles_from_files=0;

public OnFilterScriptInit()
{

// SPECIAL
	total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/trains.txt");
	total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/pilots.txt");

  	// LAS VENTURAS
   total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/lv_law.txt");
  total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/lv_airport.txt");
  total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/lv_gen.txt");

  // SAN FIERRO
  total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/sf_law.txt");
  total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/sf_airport.txt");
  total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/sf_gen.txt");

  // LOS SANTOS
  total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/ls_law.txt");
  total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/ls_airport.txt");
  total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/ls_gen_inner.txt");
  total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/ls_gen_outer.txt");

  // OTHER AREAS
  total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/whetstone.txt");
  total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/bone.txt");
  total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/flint.txt");
  total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/tierra.txt");
  total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/red_county.txt");

  printf("Total vehicles from files: %d",total_vehicles_from_files);

	return 1;
}



Re: Default vehicle streamer - dugi - 02.11.2009

This script is not for any streamer but it's for loading vehicles from files, all the vehicle streaming is done by the server.


Re: Default vehicle streamer - Jokel317 - 02.11.2009

Yea I understand what you mean. But I met I need it if it`s possible as a filterscript for a complex gamemode im using thanks.


Re: Default vehicle streamer - Pho3niXx - 02.11.2009

if you had any complex gamemode, you wouldn't ask for such a thing... :P


Re: Default vehicle streamer - Jokel317 - 02.11.2009

It`s already setup, it is a complex gamemode but i took all the vehicles out and wanted spawns across whole SA so it can be used better for what i wanted it for.


Re: Default vehicle streamer - Cartermcpyro - 02.11.2009

Quote:
Originally Posted by Jokel317
Yea I understand what you mean. But I met I need it if it`s possible as a filterscript for a complex gamemode im using thanks.
Quote:
Originally Posted by dugi
This script is not for any streamer but it's for loading vehicles from files, all the vehicle streaming is done by the server.



Re: Default vehicle streamer - Badger(new) - 05.11.2009

You mean you want to load all the vehicles that get loaded on grandlarc?
The line:
pawn Код:
#include "../include/gl_common.inc"
Includes the function to load the vehicles and the other lines load them from the files, and count how many you load.


Re: Default vehicle streamer - Jokel317 - 06.11.2009

That`s correct thanks.