how to make this
#6

For what you want, you would need to save player's data somehow, whether it be through a file or database. We cannot give you straight code on "how to make a stats command", since there are many variables for us to build on. These include, but are not limited to, the file/database system you are using (dini/dudb/djSon/SII/Y-ini/MySQL(and which plugin)) as well as the variables you are using to store the player's time on the server since connection.

You can use the below steps, which requires not extra libraries or plugins to run. However, this will only be on-connection stats, after disconnecting they will not save and be whipped fresh.
- Add a one second timer to increase a variable of a player by one.
- Make a stats command which displays the number the variable is holding, as well as the cash
-- The variable will return the amount of seconds the player has spent on the server, while using GetPlayerCash will return the amount of money the player is currently carrying.

You will need to have some prior programming knowledge, since I'm not giving you the code directly. It's always best to learn to do it yourself then always having others do it for you - You never know when you will be on your own, and need to do something that you had others do for you all the time before.
Reply


Messages In This Thread
how to make this - by FerrariII - 12.11.2010, 17:01
Re: how to make this - by FerrariII - 12.11.2010, 17:51
Re: how to make this - by Vince - 12.11.2010, 17:57
Re: how to make this - by FerrariII - 12.11.2010, 18:06
Re: how to make this - by The_Moddler - 12.11.2010, 18:53
Re: how to make this - by Grim_ - 12.11.2010, 19:19
Re: how to make this - by Dolph - 12.11.2010, 19:33
Re: how to make this - by Grim_ - 12.11.2010, 19:38

Forum Jump:


Users browsing this thread: 3 Guest(s)