#define FILTERSCRIPT #include <a_samp> #include <dini>
new value[32]; //Define an string, Its the name of your db. format(value,sizeof(value),"where to make db, Ex: "/Accounts/MyFile.txt""); //Format your string and set db file for save your values dini_Create(value); //create your first dini database.
// these lines needs something else ill explain just down dini_Set(value,"Password",Key); //to set player password as an string at first, Key is player password dini_IntSet(value,"Money",200000); //to set player money at first login ... and it will give player automatically 200000$ for start. its an action to save Integers dini_IntSet(value,"Score",100); //to set player score , just like before dini_IntSet(value,"Skin",271); //to set player skin, just like before
new value[32]; new pname[MAX_PLAYER_NAME]; GetPlayerName(playerid,pname,sizeof(pname)); format(value,sizeof(value),"/Accounts/%s.txt",pname); dini_Create(value);
//to get an string you must format it new string[64]; format(string,sizeof(string),"%s",dini_Get(value,"Password")); // string is now player password new mny = dini_Int(value,"Money"); new scr = dini_Int(value,"Score"); new skn = dini_Int(value,"Skin");
it was easy, wasnt it ? 
|
Appreciate your effort but a) wrong section and b) terribly outdated and slow method that no one should ever use anymore.
|
)
)