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

City Temperature on join | Updated Nov 26th 2022


Post New Thread Reply   
 
Thread Tools Display Modes
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 11-02-2019 , 09:09   Re: City Temperature on join. | Updated ML (11/02/2019)
Reply With Quote #31

Remade a bunch of stuff. Most notably the plugin won't crash if it is installed without the databases or other files.
__________________

Last edited by DJEarthQuake; 02-05-2020 at 12:07.
DJEarthQuake is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 04-07-2020 , 12:21   Re: City Temperature on join. | Updated ML (Sat 04/04/2020)
Reply With Quote #32

Add measure units such as Farenheit or Celsius. 15° farenheit is pretty cold, as 15° Celcius is a whole lot warmer.
__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 04-09-2020 , 11:47   Re: City Temperature on join. | Updated ML (Sat 04/04/2020)
Reply With Quote #33

Quote:
Originally Posted by Napoleon_be View Post
Add measure units such as Farenheit or Celsius. 15° farenheit is pretty cold, as 15° Celcius is a whole lot warmer.
Have you looked at the script? Both already exist.
Code:
92     g_cvar_units = register_cvar("sv_units", "imperial"); 254     get_pcvar_string(g_cvar_units, buf, charsmax(buf)); 255     if (containi(buf, "imperial") > -1 ) 256     { 257     iRED_TEMP = 70; 258     iBLU_TEMP = 45; 259     iGRN_HI = 69; 260     iGRN_LO = 46; 261     } 262     else if (containi(buf, "metric") > -1 ) 263     { 264     iRED_TEMP = 15; 265     iBLU_TEMP = -15; 266     iGRN_HI  = 14; 267     iGRN_LO = -14; 268     }
__________________
DJEarthQuake is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 04-10-2020 , 04:50   Re: City Temperature on join. | Updated ML (Sat 04/04/2020)
Reply With Quote #34

Add it to your description or screenshot.
__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 04-10-2020 , 06:47   Re: City Temperature on join. | Updated ML (Sat 04/04/2020)
Reply With Quote #35

Taken care of. What else?
__________________
DJEarthQuake is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 04-10-2020 , 06:50   Re: City Temperature on join. | Updated ML (Sat 04/04/2020)
Reply With Quote #36

Quote:
Originally Posted by DJEarthQuake View Post
Taken care of. What else?
That was all :p
__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 01-17-2021 , 10:00   Re: City Temperature on join | Updated 10/04/2020
Reply With Quote #37

Gave plugin a queue. It cuts down on socket turbulence. Socket is set to busy with a boolean and the queue runs every so often to assure all the players' temps have been read and not duplicated. The socket function independently makes itself busy when being used and later reschedules other calls for temp readings on other players if pinged when in use. If in debugging mode, the sockets are a lot more descriptive in console with what player is using the socket and what point through the process are they.


new cvars
temp_long 0|1 is for acquiring temperature off longitude and latitude instead of city. Amxx182 cannot do that with GeoIP+ module so it is set to city by default.
temp_debug 0|1 Debugging is at the convenience of a CVAR instead of the nuisance of recompiling.

Old news but worth mentioning in case it is new to you.
  • Chinese translation
  • Speaks the temp (updated to handle sub zero)
  • Dynamically switches units Celsius or Fahrenheit on a per player basis as they connect instead of CVAR.


Developer footnote.
Next version. Stream-lining player by steamID like this. Instead of PLAYER_INDEX+CONSTANT_INTEGER. Minimizes data meshing. Sometimes Amxx never closes the socket right and the netstat will show CLOSE_WAIT indefinitely until process is killed not restarted. kILLeD!

Spoiler
__________________

Last edited by DJEarthQuake; 01-17-2021 at 10:11.
DJEarthQuake is offline
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 06-23-2021 , 23:50   Re: City Temperature on join | Updated 06/20/2021
Reply With Quote #38

Found a socket related crash bug even with a queue locking down the socket so no other players can get their temp simultaneous. The timing needed advanced. Posting much needed update. Feel free to PM me.
__________________
DJEarthQuake is offline
Reply


Thread Tools
Display Modes

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 02:50.


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