Save score of each team
Good afternoon, how could I save the points of each team at a specific time, then use the saved values, would it be better to use an array or fvault?
|
Re: Save score of each team
You can just use a simple file and save it there.
It can also get better statistics. Like map's name, current message log time & players, results and even count all winings of both teams and retrieve a specific win ratio & the percentage of wins. Personally I would go for the magical fopen |
Re: Save score of each team
New file system is better.
|
Re: Save score of each team
Quote:
g_ScoreTeamCt (and a value) g_ScoreTeamTr (and a value) to later be able to use the "global", how would I do this with fopen? or with nfvault? Could you give me a small example? |
Re: Save score of each team
What's the purpose of this? I mean what you tryna reach?
|
Re: Save score of each team
If I understand correctly, you have 2 global arrays which each hold player values, one array for each team. You want to save this on map change/shutdown or something and restore the values?
There are many options, I'd personally save the array data to a binary file or use nvault array. This is based on what I know, if there other things going on then SQL may be better. |
Re: Save score of each team
Quote:
|
Re: Save score of each team
If there is any way to "count" how many times the event is called already help, since I can set the global == called times.
sorry for bump. |
Re: Save score of each team
Quote:
PHP Code:
|
Re: Save score of each team
If I understand correctly you do not need to store the scores in a file since you only temporarily need to store them eg. not between maps/shut down/different day etc. This code is basically taking the team scoring out of the servers hands and overriding the scoreboard with variable values. If you want to actually set team scores you can use orpheu or something.
This will use the scoreboard as normal for gameplay. When you want to start a knife battle use the /start chat command. The team scores will reset to 0:0 and will keep score accordingly for each team. When done with the knife battle, use the /stop command. Scores will go back to what they were before the knife battle started. Additional conditions can be added based on the scores of each team. Map start, T=0 CT=0 Regular play results in T=3 CT=6 Knife battle start, T=0 CT=0 Knife battle results in T=6 CT =2 Knife battle end, scores go back to T=3 CT=6 PHP Code:
|
| All times are GMT -4. The time now is 04:32. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.