[REQ] Play Time
Hi. I want a plugin when a player played more than 48 hours gets TZ flag(VIP).
|
Re: [REQ] Play Time
Untested and I'm not sure what flag you want, so you need to update that part in the code.
PHP Code:
|
Re: [REQ] Play Time
I changed it 10 seconds for testing and It didn't work.
|
Re: [REQ] Play Time
Did you disconnect and reconnect. And how do you know it didnt work? The message gets displayed immediately upon connecting so you wouldn't see it, I will need to add a delay.
|
Re: [REQ] Play Time
Yes I did. After 10 seconds there was no message and also I checked it via amx_who
|
Re: [REQ] Play Time
Try the updated code
|
Re: [REQ] Play Time
Not working also no messages shown
|
Re: [REQ] Play Time
Are there any errors? Steam?
|
Re: [REQ] Play Time
No errors also I have the latest hlds (build 7561)
|
Re: [REQ] Play Time
My hlds sometimes crashes after adding this plugin
|
Re: [REQ] Play Time
Fixed. I found 2 things that were wrong. Shutdown your server and delete the vault file otherwise you will get a crash.
|
Re: [REQ] Play Time
Thanks It's working but It doesn't save VIP in users.ini and when I changed my name I wasn't VIP anymore. I want it to set VIP by steam ID.
|
Re: [REQ] Play Time
It will not modify users.ini but the player will get the flag once they connect. Name change will not impact this.
|
Re: [REQ] Play Time
Can you make it to modify users.ini? Where does it save now?
|
Re: [REQ] Play Time
It doesn't save anywhere, the plugin adds the flag to the player when he connects. As long as the plugin is running he will get the flag.
|
Re: [REQ] Play Time
If I want to remove a flag from specific player how can I do this? Cause it's not in users.ini
|
Re: [REQ] Play Time
I̶ ̶t̶h̶i̶n̶k̶ ̶y̶o̶u̶ ̶c̶a̶n̶ ̶b̶l̶a̶c̶k̶l̶i̶s̶t̶ ̶t̶h̶e̶ ̶p̶e̶o̶p̶l̶e̶ ̶f̶r̶o̶m̶ ̶u̶s̶i̶n̶g̶ ̶t̶h̶i̶s̶ ̶b̶y̶ ̶s̶i̶m̶p̶l̶y̶ ̶a̶d̶d̶i̶d̶n̶g̶ ̶t̶h̶e̶m̶ ̶t̶o̶ ̶u̶s̶e̶r̶s̶.̶i̶n̶i̶ ̶w̶i̶t̶h̶ ̶f̶l̶a̶g̶ ̶z̶
|
Re: [REQ] Play Time
Quote:
|
Re: [REQ] Play Time
Can you add mysql to this plugin? I mean the plugin writes playtime and steamID to database and reads it from database.
|
Re: [REQ] Play Time
Quote:
|
Re: [REQ] Play Time
Cause when server shuts down the playtime for all players resets.
|
Re: [REQ] Play Time
The play time should never reset.
|
Re: [REQ] Play Time
Made a small fix where the previous players play time would be given to the next player if the player has never been to the server before.
|
Re: [REQ] Play Time
How to remove a player if it's vip? So the player must play again to be vip.
|
Re: [REQ] Play Time
I can add a command for that, too.
|
Re: [REQ] Play Time
Ok add it.
|
Re: [REQ] Play Time
Added blacklist and remove commands. Untested.
PHP Code:
|
Re: [REQ] Play Time
Thank you so much It's working. But I need to see who is in vip list so that I can remove it. Can you make a menu for ptv_removevip that shows all vips thus I can delete the vip I want.
|
Re: [REQ] Play Time
Bugsy can you please add a feature when a player becomes vip after 48 hours remove it's vip.
|
Re: [REQ] Play Time
Quote:
Quote:
|
Re: [REQ] Play Time
Quote:
|
Re: [REQ] Play Time
@Bugsy
Sorry for jumping in, but, do you have any idea why sometimes nVault plugins crash the server and don't start until you remove the vault file? Didn't wanna create a thread just for this problem. |
Re: [REQ] Play Time
Check if the key isn't empty before saving the data. I can confirm this is happening.
|
Re: [REQ] Play Time
Usually a corrupt vault file. Easiest fix is to delete the vault file and start fresh and make sure you are properly closing the vault when the map changes @ plugin_end(). I suppose a server crash could cause this to happen since the vault is not getting a graceful close.
I was testing something else today and accidentally saved a vault record with a blank key and it did not give me any errors. |
Re: [REQ] Play Time
Not sure why and when it happens, but adding a blank check definitely prevents it. I did some testing a while ago.
|
Re: [REQ] Play Time
It happened to me without setting a blank key, I was saving my Levels & XP on SteamID. After I closed the vault in plugin_end it didn't crash anymore but I'm not sure how to reproduce it.
|
Re: [REQ] Play Time
Not closing in plugin_end(), saving data for bots and possibly blank keys - I have experienced corrputing in these cases.
|
Re: [REQ] Play Time
Having a stack trace from say GDB would help a lot in solving that problem if it's true.
|
Re: [REQ] Play Time
Added menu for removing VIP and blacklisted, including both online and offline players. I have only done basic testing since I do not run a server and only have access to bots.
The plugin now requires nVault Utility and nVault Array. Those not running a dev build of AMX-X must use a fixed version of the nVault module.
Spoiler
|
Re: [REQ] Play Time
There are two errors in compiling
PHP Code:
|
All times are GMT -4. The time now is 11:21. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.