Would someone please add a positions save to this script? -
Aerotactics - 21.02.2014
I've tried every tutorial and tried to combine every position saving filterscript I could find, but the variables always shadow some others at a preceding level. I can't figure it out myself after countless tries, so here's what I simply need:
When the player logs in successfully, instead of opening dialog 1 and going through the skin changer, have the player spawn at the coords they logged out with, that's it. The position data should be saved and loaded from the same file as the money and skin file.
Extra Credit:
If you want to go out of your way even further, I would like for you to add a dcmd command that will ask a player if they want to reset their stats -- deleting their ini file, and resetting to show them the registration dialog (or just kicking them and telling them to relog to set up a new account)
Here's the script-- its not mine, but I have made a lot of changes to it already, and still have plenty more to go. I couldn't post it raw because its about 2600 lines of code. I removed the owners credits to try to make the file small enough to load here, but it didnt work, so I'll be re-adding them if I ever decide to release my server:
http://www.mediafire.com/view/ntt7vi...min_Script.txt
Re: Would someone please add a positions save to this script? -
Mriss - 21.02.2014
Well its kinda like this tutorial
https://sampforum.blast.hk/showthread.php?tid=234691
Even though its score saving just read through it and you'll get a hand of it, I think the functions u wwill use for the saving system are if you use Dini [code]dini_IntSet(file, "Location", GetPlayerLocation(playerid))
idk anyways just try that thread mate
Re: Would someone please add a positions save to this script? -
Aerotactics - 21.02.2014
That's true, but saving positions is quite difficult, because you need to save each variable in a float (x y and z) the save that to a file. I can't figure out how to do that properly without getting errors, but thanks for the help.
Re: Would someone please add a positions save to this script? -
Aerotactics - 22.02.2014
Bump
Re: Would someone please add a positions save to this script? -
Ada32 - 22.02.2014
Quote:
Originally Posted by Aerotactics
I removed the owners credits..
|
don't do that..
and it isn't a "do this for me please" section. we don't mind helping you with your code, but we won't do all the work.
Quote:
but the variables always shadow some others at a preceding level.
|
find out what the error means -> fix it (****** will help)
Quote:
When the player logs in successfully, instead of opening dialog 1 and going through the skin changer, have the player spawn at the coords they logged out with, that's it. The position data should be saved and loaded from the same file as the money and skin file.
|
you have y_ini, so load the data from the file, store the values you want setplayerpos and spawn them when they logs in. y_ini has information all over the place and the docs are good, so TRY something first, then post here..
Quote:
I would like for you to add a dcmd command that will ask a player if they want to reset their stats -- deleting their ini file, and resetting to show them the registration dialog (or just kicking them and telling them to relog to set up a new account)
|
you should know how to make a command, so fremove the file and showplayerdialog (which i assume re-creates the file)
Re: Would someone please add a positions save to this script? -
Aerotactics - 22.02.2014
Alright, I'll look back into it, and post to the correct section next time, thanks for your reply.