Jump to content

[REL] /save. Saves your Position and Rotation. VER 1.3.1


Capsinurass

Recommended Posts

I think this has been done b4, but my one is better. :D 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 by Guest
Link to comment

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

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

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
  • 2 years later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...