My brain hurts, help with Dini PLEASE..
#1

Okay I've been working on this for 4 hours.. 4 FREAKIN HOURS..

Any help would be great.

I'm trying to make my gamemode save my money OnPlayerDissconnect.

I got my /login to load how much money is saved in the Character file.. Example cash=30000 it will load 30k when you do /login. Although when I disconnect it does not save the money and update my file.

I tryed this, and it didn't work so any help would be nice

Код:
dini_IntSet(file,"Cash", GetPlayerMoney(playerid));
Reply
#2

Dide you define "file" with the correct directory of the players file?
Reply
#3


format(file,sizeof(file),"Accounts/%s.ini",name);

That is what I use in my /register.. I really do not know what you mean xD

The accounts save in a folder in script files named "Accounts"
Reply
#4

Do you have that line under OnPlayerDisconnect aswell?
Reply
#5

Quote:
Originally Posted by _Xerxes_
Do you have that line under OnPlayerDisconnect aswell?
Yeah I did, but it didn't work so I removed everything.

If you could remake it for me it would be nice, I can't get it to work no matter What I do lol.
Reply
#6

public OnPlayerDisconnect(playerid, reason)
{
GetPlayerName(playerid, name, sizeof(name));
format(file, sizeof(file), "Accounts/%s.ini", name);
dini_IntSet(file, "Cash", GetPlayerMoney(playerid));
return 1;
}
Reply
#7

This worked Thank you so much.

I even got my kills and deaths saving using this method
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)