How to Store a Basic Data.
#1

I Have Seen a Fair Bit about Dini Ect.

But I Havent come up with a Way to Store Info for a Single Variable.

Heres What I Want to Store:
Код:
new PassPort[MAX_PLAYERS];
This is the Code Where its Set To a Higher Number.
Код:
					if (strcmp("/upgradepass", cmdtext, true) == 0)
	{
	SendClientMessage(playerid, 0xFFFF00AA,"Set To Passport Stage 2");
	PassPort[playerid] = 2;
		return 1;
	}
So its Set to Stage 2, Now. When the Person Leaves and the Server can be Restarted. This Data is Restored when the person connect to my server with that Name,
I Do Not want a Register or Login command, Dont call me a Fool. But I Dont.

Anyway, is there any Methods Avaliable That could Allow me to Save This Data?
Reply
#2

Save it like how you save your stuff in your server. Aren't you a "Pretty Nice Scripter"?
Reply
#3

just use this:
pInfo[playerid][pPassPort] = 2;
i use pInfo..
Reply
#4

Okay, That dosent make much Sense. Youre saying If I Put the Word pInfo into it It will Save Automaticly? And Retardedworld, Saving is Pretty Much my Major Flaw. Dont be a Dickhead

-Edit.
Im not using an Enumerator.
Shouldent I Be able to save data without one?
Reply
#5

no it wont save but it will set the passport to 2, so you make when player leaves save the stuff and when player connects load the stuff too.
Or you can use a timer if you want it to save automaticly, like 1 save per 5mins.
Reply
#6

I See, But the question is Simply. How To Save that Data?
I Know it could be a large tutorial. and if it is, just give me a link if Possible.
Reply
#7

first search plz
https://sampforum.blast.hk/showthread.php?tid=191967
Reply
#8

thanks mate
Reply
#9

Oh Sorry, But That Tutorial Didnt explain how for that To Take Affect to All the People that Connect to my Server. Just for One Name.
And I Experimented with [MAX_PLAYERS] To Get it to Work But Nope.

So any Help to store that Single peice of Data per person would be loved
Reply
#10

There are many, many tutorials that use dini look through them and adapt it to suite your needs. Search tutorial section for the word "dini" and just search thread names. Theres more info on what you need in them tutorials than people will give here. Just try learn, the info is already out there.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)