how to make this
#1

/stats cmd
in it
Time Connected: Hours [Number Minutes [Number]
Cash: [cash in hands]
??
Reply
#2

reply please
Reply
#3

You sir, are extremely impatient.
https://sampforum.blast.hk/showthread.php?tid=187229
Reply
#4

can someone post it here? they take ages until they response there
Reply
#5

Quote:
Originally Posted by FerrariII
Посмотреть сообщение
can someone post it here? they take ages until they response there
Life is like that kid, you will have to wait for many things in life, here is one of them
Reply
#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
#7

Grim.. You are a skilled person and all that. But you can't tell a beginner to do what you said, that is simply to hard for them to understand.

Better giving them a piece of code, and force them to read and understand it
Reply
#8

My reason for being here right now is to allow people to get off to the right step to learn what they need to do to create something for themselves. People cannot always expect someone to create something for them, especially for no or little reward. And when people say, "read up on the wiki", it turns them off and we end up with more useless threads created like this one.

People need to start realizing this is not a board to request scripts, there is a specific topic for that, but this is for scripting support. Meaning, if you are having troubles with your script, you will try and get the problem fixed with support from others.

No offense towards you Dolph in any way, I'm just trying to get my point across. I'm sure you understand how frustrating it can be seeing hundreds of threads like these a week.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)