More help with stat saving and reloading
#1

Alright guys so I have a /stats command that shows stats only problem is it doesn't update until the player disconnect and reconnects, is there anyway to write the players stats at a certain time or each time they die or kill someone then reload the users file so /stats updates?
Reply
#2

First of all which saving system you use.. It looks you aren't using y_ini ..
Reply
#3

you can use a timer which will do the same thing as it does when you disconnect(save the stats).
You can do public and forward. so like after the certain time you decided it to be it would save the stats.. or you can even do an individual save account command that will save the player's account individually to reduce laggs in the server.
Reply
#4

I am using y_ini haha
Reply
#5

stats such as..? can you please show your /stats command.
Reply
#6

Our /stats command shows a list of things like your money,vip,admin,score,etc and when you kill someone/die I want it to update your users file and /stats can get the updated one.
Reply
#7

Quote:
Originally Posted by arathin
Посмотреть сообщение
Our /stats command shows a list of things like your money,vip,admin,score,etc and when you kill someone/die I want it to update your users file and /stats can get the updated one.
Hm basically create a function called SavePlayer(playerid); and in that function save the players stats as same as OnPlayerDisconnect (or however your saving it) Next in OnPlayerDeath, put SavePlayer(playerid); and then on the /stats command in the first line put SavePlayer(playerid);

That should fix your prob.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)