Capsinurass Posted January 23, 2008 Share Posted January 23, 2008 (edited) I think this has been done b4, but my one is better. This script is a bit like the one in SA MP but this saves in in the format used in .map files so that you can quickly make a map. Here is an example of what is saves... <vehicle id="Banshee" model="429" posX="-715.73126220703" posY="964.32232666016" posZ="12.198879241943" rotX="0" rotY="0" rotZ="90.26904296875" color="1 0 0 0" /> The file gets saved in your MTA San Andreas\server\mods\deathmatch\resources\position folder. This script will spawn you so all you need to do is run it and then start to save your cars. You can spawn cars with the admin panel and it will save there id's, name, color position and rotation. Also you dont need to be in a car to save your position. If your not in a car and you /save it will put a NGR-500 by default. Commands: "/save mapcar" will save like this.... <vehicle id="NRG-500" model="522" posX="-708" posY="964" posZ="12.478223800659" rotX="0" rotY="0" rotZ="90" color="1 1 0 0" /> "/save luacar" will save like this.... createVehicle ( 522, -708, 964, 12.478223800659, 0, 0, 90 ) "/save mapspawn" will save like this.... <spawnpoint id="spawnpoint1" posX="-708" posY="964" posZ="12.478223800659" rot="0" model="184" /> "/save luaspawn" will save like this.... spawnPlayer ( player, -708, 964, 12.478223800659, 0, 184) "/save pos" will save like this.... X:-708 Y:964 Z:12.478223800659 RX:0 RY:0 RZ:90 "/save luaweap" will save like this.... createPickup ( -708, 963, 12.477979660034, 2 , 30, 666, 1337) "luaweap" can also take extra input to make the respawn and ammo time what you want. in the above the command was "/save luaweap 666 1337" this will give you a respawn time of 666 milliseconds and 1337 ammo! if nothing is given there is a defalt of 30000 respawn and 100 ammo well thats about all. hope its helps a lot of people out. if you would like me to add anything to my script just ask! **UPDATE** ver 1.3.1 fixed mapcar bug! **UPDATE** ver 1.3 chaged command names and added "luaweap" this gets your current weapon and ammo and saves it so you can create a pickup spawn with it You can also add a comment to any of the commands by putting your comment at the end of the command, as long as it is one word. eg. /save luacar im-am-1337 ( With luaweap you have to give the respawn and ammo if you want to comment on it. ) To see list of command just type go into you console and type save **UPDATE** ver 1.2 changed command system to /save **UPDATE** ver 1.1 added /save2 this will save in the lua function format like this... createVehicle ( 522, -708, 963, 12.477979660034, 0, 0, 90 ) please tell me if you find bugs and how you made them appear! http://rapidshare.com/files/86454799/position.zip.html Edited January 25, 2008 by Guest Link to comment
XetaQuake Posted January 23, 2008 Share Posted January 23, 2008 realy nice, but can you make a secondary version that shows the correct code for a script like (this is for a object, but i guess vor spawns) createObject( 691, -1231.505859375,211.43759155273,14.1484375 ) ? Link to comment
Capsinurass Posted January 23, 2008 Author Share Posted January 23, 2008 (edited) done and done! just type /save2 and it will save in that way Edited January 24, 2008 by Guest Link to comment
XetaQuake Posted January 23, 2008 Share Posted January 23, 2008 So fast? i love you ^^ THX //edit: it is possibly that the script save a PlayerSpawn (with currently player skin ID) when i not in a vehicle? Link to comment
Capsinurass Posted January 23, 2008 Author Share Posted January 23, 2008 What do you mean? please give me an example! Link to comment
XetaQuake Posted January 23, 2008 Share Posted January 23, 2008 for /save: http://development.mtasa.com/index.php? ... es#Example (on # 2.1.1 Example) for /save2: http://development.mtasa.com/index.php? ... pawnPlayer (i don't know if that correct to set a PlayerSpawn, i don't have coding for MTA) Link to comment
Capsinurass Posted January 24, 2008 Author Share Posted January 24, 2008 ok i changed a lot of stuff in it now. insted of /save, /save2 i changed it. now what you do is add an command on the end of save hear is the list... "/save mveh" will save like this.... <vehicle id="NRG-500" model="522" posX="-708" posY="964" posZ="12.478223800659" rotX="0" rotY="0" rotZ="90" color="1 1 0 0" /> "/save cveh" will save like this.... createVehicle ( 522, -708, 964, 12.478223800659, 0, 0, 90 ) "/save mpl" will save like this.... <spawnpoint id="spawnpoint1" posX="-708" posY="964" posZ="12.478223800659" rot="0" model="184" /> "/save cpl" will save like this.... spawnPlayer ( player, -708, 964, 12.478223800659, 0, 184) and if you leave /save blank it will save like this.... X:-708 Y:964 Z:12.478223800659 RX:0 RY:0 RZ:90 Link to comment
XetaQuake Posted January 24, 2008 Share Posted January 24, 2008 now your script is 100000.000.000% PERFECT! THX for all Link to comment
Capsinurass Posted January 24, 2008 Author Share Posted January 24, 2008 lol thx, tell me if you want something else put in! Link to comment
XetaQuake Posted January 24, 2008 Share Posted January 24, 2008 hi, i have 3 proposals ^^ 1. its better you create a readme with the commands, because the forum can crash or anything 2. /save mveh /save cveh /save mpl and /save cpl are not easy to remember, i have alternative names: /save mveh = /save mapcar /save cveh = /save luacar /save mpl = /save mapspawn /save cpl = /save luaspawn 3. it is possibly that the script saves a description, like /save Example: /save car-station Link to comment
XetaQuake Posted January 24, 2008 Share Posted January 24, 2008 nice! i have only 1 bug found: /save luacar /save mapcar dont work to the rest: ALL working perfectly! thx! Link to comment
Capsinurass Posted January 24, 2008 Author Share Posted January 24, 2008 it works for me, are you sure your not putting /save luacar in console? if you put it in console all you need is "save luacar" and if not can you please put "debugscript 3" into your console then type one of the commands and tell me what it says! Link to comment
XetaQuake Posted January 24, 2008 Share Posted January 24, 2008 lol now it works by me too, sorry it was a mistake...i dont know why it have not work last time so now the script is perfect from my side! thx for it, its the best postion savescript on the world, for ever because no script can make it better, its already perfect Thx XetaQuake Link to comment
ALBERT_NERI Posted January 25, 2008 Share Posted January 25, 2008 o no! i have errors! HELP ME! [08:19:46] WARNING: position.lua: Bad 'player' pointer @ 'spawnPlayer'(1) - Line: 64 [08:19:46] ERROR: .../mods/deathmatch/resourcecache/position/position.lua:64: stack overflow [08:20:08] ERROR: .../mods/deathmatch/resourcecache/position/position.lua:176: attempt to concatenate local 'color4' (a nil value) HELP ME PLZ! Link to comment
Capsinurass Posted January 25, 2008 Author Share Posted January 25, 2008 hmm i know how to fix... [08:20:08] ERROR: .../mods/deathmatch/resourcecache/position/position.lua:176: attempt to concatenate local 'color4' (a nil value) but the bad player pointer, what were you doing when this happend? here is the fix for the mapcar bug http://rapidshare.com/files/86454799/position.zip.html Link to comment
ALBERT_NERI Posted January 26, 2008 Share Posted January 26, 2008 Capsinuras, big thx u for this script. it work perfect! but i wait map editor ps sorry for english Link to comment
Xierra Posted April 12, 2010 Share Posted April 12, 2010 Damn another 2 year old bump. Btw, the built in map editor has what it needs. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now