Jump to content

/save command

Guest DeveloperXX

Recommended Posts

Ok guys maybe like some of you know what in sa-mp was script with /save command.

Basically when you type /save command script create txt file where is player saved coord rotation skin type (Maybe if someone can add such things like:cloth type,gun type,stats and some other).But thats in sa-mp so thats why we need same stuff in here.So we can during game save all our stuff.And also i wana ask is there any way how to load AMX files?

Link to comment

Currently I do not have too much free time to create a script like this, but for the other scripters:

I think this can easily be achieved using the setAccountData and getAccountData functions to store and load player-specific data, like money, coordinates, weapons, etc.

a small example and explanation can be found here: http://development.mtasa.com/index.php? ... ccountData

To realize this you need to have players being able to register accounts, and to login to their account. The only concern could be if "guests" actually have the permissions to create an account for themselves.

I'll try to work this out when I have some time if nobody does :)

Link to comment
So is there any way to find out positions on x y and z. for car spawns etc?

i hate using samp debug for it.

Yes there is.

if you wish to find the coordinates of a car, you can try: local vehX, vehY, vehZ = getElementPosition( vehicleObj ), which basically saves the x, y and z coordinate of the vehicle vehicleObj into the variables vehX, vehY and vehZ. Note that a vehicle is also an element.

the function specification: float, float, float getElementPosition ( element theElement )

for the vehicle rotation you can use: local rotX, rotY, rotZ = getVehicleRotation( vehicleObj ), which saves the x, y and z rotations into the corresponding variables, just like the previous function.

and the function specification: float float float getVehicleRotation ( vehicle theVehicle )

Link to comment

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...