Raised This Month: $51 Target: $400
 12% 

Show Time!


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   General Purpose       
doondook
Member
Join Date: Dec 2010
Old 02-10-2015 , 04:25   Show Time!
Reply With Quote #1


Show Time!
version 1.0 (February 11, 2015)

Description
Shows user's timezone based real time instead of round time.
Installation
Compile it locally. For AMX version 1.8.2 and older you have to use additional module: geoip.
Copy GeoTimezones.txt to your amxmodx/data folder.
Note
The plugin does not change actual round time, it changes the HUD which shows it. Round time will continue ticking at the background.
Since there is no API in geoip to determine UTC offsets by timezone, the plugin gets this information from the plain-text file based on http://en.wikipedia.org/wiki/List_of...ase_time_zones.
Attached Files
File Type: txt GeoTimezones.txt (12.5 KB, 623 views)
File Type: sma Get Plugin or Get Source (showtime.sma - 780 views - 4.6 KB)

Last edited by doondook; 02-11-2015 at 08:42. Reason: version 1.0
doondook is offline
tousif
AlliedModders Donor
Join Date: Nov 2014
Location: India
Old 02-10-2015 , 05:06   Re: Show Time!
Reply With Quote #2

Errors :/

PHP Code:
Plugin failed to compilePlease try contacting the author.
Welcome to the AMX Mod X 1.8.1-300 Compiler.
 
Copyright (c1997-2006 ITB CompuPhaseAMX Mod X Team  
/home/forums/content/files/1/0/1/7/2/6/142279.attach(69) : error 017undefined symbol "geoip_timezone" 
/home/forums/content/files/1/0/1/7/2/6/142279.attach(69) : error 088number of arguments does not match definition  
2 Errors

Could not locate output file /home/groups/amxmodx/public_html/compiled3/142279.amx (compile failed). 
Author plzz Mention to compile it locally

Last edited by tousif; 02-10-2015 at 05:16.
tousif is offline
JusTGo
Veteran Member
Join Date: Mar 2013
Old 02-10-2015 , 05:14   Re: Show Time!
Reply With Quote #3

Quote:
Originally Posted by tousif View Post
Errors :/

PHP Code:
Plugin failed to compilePlease try contacting the author.
Welcome to the AMX Mod X 1.8.1-300 Compiler.
 
Copyright (c1997-2006 ITB CompuPhaseAMX Mod X Team  
/home/forums/content/files/1/0/1/7/2/6/142279.attach(69) : error 017undefined symbol "geoip_timezone" 
/home/forums/content/files/1/0/1/7/2/6/142279.attach(69) : error 088number of arguments does not match definition  
2 Errors

Could not locate output file /home/groups/amxmodx/public_html/compiled3/142279.amx (compile failed). 
i guess you need this modules installed https://forums.alliedmods.net/showthread.php?t=95665
btw you amxx version is out dated update to 1.8.2 better.
__________________
JusTGo is offline
tousif
AlliedModders Donor
Join Date: Nov 2014
Location: India
Old 02-10-2015 , 05:16   Re: Show Time!
Reply With Quote #4

Quote:
Originally Posted by JusTGo View Post
i guess you need this modules installed https://forums.alliedmods.net/showthread.php?t=95665
btw you amxx version is out dated update to 1.8.2 better.

I used online compiler ^_^ and its comping locally author didnt mention too compile locally
tousif is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 02-10-2015 , 06:14   Re: Show Time!
Reply With Quote #5

@doondook:

You should said clearly it requires a third-party module for <1.8.2 users.

- Parsing file each time a client connects is likely not a good idea, cache datas. A Trie seems appropriate.
- For permanent task, this would be recommended to use either one task with "b" flag (insertion is slow) or better create an entity to play timer's role (more precise).
- Is it really necessary to retrieve each time server time instead of adding +0.5? Using an entity as timer, this should be enough precise.
- Cleanup your code, you don't use *UserAlive.

This is really too bad we can't provide a negative number and RoundTime would increase time.
__________________
Arkshine is offline
JusTGo
Veteran Member
Join Date: Mar 2013
Old 02-10-2015 , 06:26   Re: Show Time!
Reply With Quote #6

also MAXPLAYERS already defined in amx 1.8.3dev so you should add a check for amxx version.
__________________
JusTGo is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 02-10-2015 , 06:28   Re: Show Time!
Reply With Quote #7

It's okay, compiler won't whine. You would get a warning if such define would be redefined in plugin with different value than the one in 1.8.3 include, but this is not the case anymore.
__________________

Last edited by Arkshine; 02-10-2015 at 06:29.
Arkshine is offline
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Old 02-10-2015 , 06:37   Re: Show Time!
Reply With Quote #8

Quote:
Originally Posted by Arkshine View Post
This is really too bad we can't provide a negative number and RoundTime would increase time.
In CZ offline missions there is a timer upside round time that actually goes up instead of down.
Idk if such message exists in cs and if it is hookable.
__________________

Last edited by Jhob94; 02-10-2015 at 07:25. Reason: quoted wrong post lol
Jhob94 is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 02-10-2015 , 07:56   Re: Show Time!
Reply With Quote #9

Not sure why you quoted something unrelated to what you say.

It's probably TaskTime, but yeah it seems like it would work only if you're running single missions.
__________________
Arkshine is offline
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Old 02-10-2015 , 08:54   Re: Show Time!
Reply With Quote #10

Quote:
Originally Posted by Arkshine View Post
Not sure why you quoted something unrelated to what you say.

It's probably TaskTime, but yeah it seems like it would work only if you're running single missions.
It's related, if tasktime works for cs and can be hooked in mp, then this plugin could simply disable round time and use task time.
__________________
Jhob94 is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 00:55.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode