Guest Posted January 5, 2008 Share Posted January 5, 2008 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
Silentlink Posted January 5, 2008 Share Posted January 5, 2008 No, .AMX files are from the scripting language PAWN that SA-MP uses. MTA uses Lua. Link to comment
[email protected] Posted January 6, 2008 Share Posted January 6, 2008 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
eAi Posted January 6, 2008 Share Posted January 6, 2008 There's no real issue with guests being able to create their own accounts. You'd probably want to wrap it in a nice GUI though. Link to comment
BrokenGlass Posted January 6, 2008 Share Posted January 6, 2008 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. Link to comment
[email protected] Posted January 6, 2008 Share Posted January 6, 2008 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
Caneman Posted January 6, 2008 Share Posted January 6, 2008 Is their a function to get the players Facing angle in LUA? for the spawnPlayer function? Link to comment
BrokenGlass Posted January 6, 2008 Share Posted January 6, 2008 R@bbit i mean like, say im walking around and i want the place im standing at coordinates to be saved. thats what i mean Link to comment
Nissandrifter Posted January 6, 2008 Share Posted January 6, 2008 R@bbit i mean like, say im walking around and i want the place im standing at coordinates to be saved. thats what i mean I coded something like this, but I can't get it to write to files correctly. 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