Radio Gag System
3 Attachment(s)
Radio Gag System Description:
Commands Usage:
Screenshot: |
Re: Radio Gag System
good idea but poorly executed
very hardcoded and i recommend browsing the web api and in this case reading about Trie array... https://www.amxmodx.org/api https://forums.alliedmods.net/showthread.php?t=201872 and since youre blocking `STEAM_ID_LAN` and `localhost` where this only happens when youre running a lan server than theres a function that detects just that `is_dedicated_server` |
Re: Radio Gag System
Quote:
But regarding dynamic arrays I actually intended to work with it, but I changed my mind and put static arrays Because I didn't trust the plugin_end function And you know that the server works 24/24 and 7/7 If there is an error in the plugin_end function, the memory will fill up with arrays. This will do more harm than good. That's why I decided to put static Detecting the IP using the is_dedicated_server function is a good idea, but I think I will not update it for this reason only. As for the percentage of STEAM_ID_LAN and others You are completely wrong, because I have seen cases of some players entering the server with these IDs Regarding the latter, above all this, this code is a quote from the official admincmd.sma |
Re: Radio Gag System
in order to occupy around 1mb of ram memory you need an array of 20-30k entries so its safe to say that memory isnt an excuse not that it ever has been something to consider especially working on mods for games.
the last major update admincmd.sma file has had was when 1.75 was introduced according to some sources and this was in 2007 or 2008. since then there've been minor edits and additions. theres no such cases as players having STEAM_ID_LAN on multiplayer, unless you account for reunion or dproto which is against ToS. |
Re: Radio Gag System
Quote:
image link You get this picture. Don't deny it, I saw it myself, my friend |
Re: Radio Gag System
PHP Code:
30000 * 4 = 120000 120000 Bytes -> 0.114 Megabytes 64-bit system: 0.228 Megabytes |
Re: Radio Gag System
Quote:
Second you should read rules, we do not support non-steam. If people use, we don’t care, but we do not support it so don’t say that kind of things. Third, no one is idiot for wanting steam only servers, they are cleaner. |
Re: Radio Gag System
Quote:
+ 39*32*4=4992 ....(2) (1) + (2) = 9088 Bytes ************************ 24 * 60 = 1440 minutes map time = 10 minutes 1440/10 ======> have 144 map in one day so 9088 * 144 = 1308672 Bytes = 1.25 mb in one day so 1.25 * 30 = 37.5 mb in 1 month so 37.5*12=450 mb This is just what we calculated on my plugin So what if we count the other plugins? Also, the system and the server software, we assume that they both carry 750 MB without taking into account additional other plugins, and I add only my 450 MB program to them. That means the total is 1.2 GB Imagine that the server only has 1 GB of RAM It's strange to see a programmer bragging about memory loss like you Didn't you study web programming and learn from it that you should do your best to reduce the volume, even if it is small? |
Re: Radio Gag System
Quote:
Quote:
PHP Code:
ive been mining steam ids using nvault to save certain values and this has been going on from around 3 years and ive accumulated around 7000 unique players. this includes players who connected to the server by mistake, players having multiple accounts and those using family sharing with friends. now do the math |
Re: Radio Gag System
Quote:
These calculations you did makes no sense man. PHP Code:
Their memory is allocated in the moment they are created, and deallocated/deleted/freed as soon as the function execution ends. All this is handled by your server computer at runtime. Differently of this, global variables memory usage is kept during all the time your plugin is running and their memory usage does not change during gameplay. PHP Code:
This memory will be released only when the server shuts down. For example, this is what occurs supposing your function is called every time a player connects: Using local variables (RAM friendly, CPU expensive) PHP Code:
Using global variables (RAM expensive, CPU friendly) PHP Code:
|
All times are GMT -4. The time now is 20:31. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.