13.09.2010, 11:08
(
Последний раз редактировалось mick88; 12.12.2010 в 23:01.
Причина: Update
)
MTA .map loader
by mick88
This is an easy to use include that allows you to load objects directly from .map file without need to convert. The script can load not only objects but also vehicles. Pickups and checkpoints are not currently supported. The vehicles will load with all applied modifications (rims, nitrous, hydraulics, spoilers etc) and paintjobs. by mick88
Pastebin download: http://pastebin.com/xa7AJ6Nv
SSCANF2 plugin by ****** is required to use this filterscript!available here: https://sampforum.blast.hk/showthread.php?tid=120356[/CENTER]
Changes in version 0.2:
- Added support for SA-MP 0.3c objects
- Added storing object/vehicle IDs
- Added function to unload single map
- This script is now an include
- Added support for custom vehicle numberplates (SA-MP 0.3c only)
- Added function to unload all current map files
- Added function checking if map is loaded
- Support for Incognito's streamer
Код:
LoadMtaMap(file[], convert03c=false) IsMapLoaded(file[]) UnloadMtaMap(file[]) UnloadAll()
* Place mtamap.inc in pawno/include folder
* Put #include mtamap on top of your gamemode script
* place all your .map files in the scriptfiles folder
* Use LoadMtaMap("filename.map") anywhere in your script to load map.
* compile and run your script, the objects will be loaded from file. You can unload filterscript after map is loaded
example:
Код:
public OnGameModeInit() { LoadMtaMap("LosSantos.map"); LoadMtaMap("LasVenturas.map"); LoadMtaMap("Island.map"); LoadMtaMap("03ctest.map", true); }
All you have to do is include streamer.inc before mtamap.inc nad put streamer in server.cfg. Script will detect it automatically and start using it. Default streaming distance is 300.0, you can change it in #define.
SA-MP 0.3c Support added
New version adds support for 0.3c objects and numberplaters. To convert object ids from MTA to 0.3c simply add true as second parameter in LoadMtaMap():
Код:
LoadMtaMap("03ctest.map", true);