Raised This Month: $ Target: $400
 0% 

Auto Change cvars/amxx files [Fixed]


Post New Thread Reply   
 
Thread Tools Display Modes
grimvh2
Veteran Member
Join Date: Nov 2007
Location: Fishdot Nation
Old 09-09-2008 , 15:55   Re: Auto Change cvars/amxx files
Reply With Quote #11

Like the idea
__________________
I am out of order!
grimvh2 is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 09-26-2008 , 17:56   Re: Auto Change cvars/amxx files
Reply With Quote #12

1. I suggest using client_putinserver() instead of client_connect().
Sometimes, a client does not connect for a few moments later due to server downloads or slow connection between the client and the server.


2. You forgot to check if the command "amx_autoc_load_config" user has access.
If the cvar is enabled, anyone can use the command.


3. Instead of get_playersnum(), I suggest a global variable counting each client as they [dis]connect.
That way, 1 less native and same reason as #1.


4. Inside write_to_config(), you open a file.
But, if something goes wrong, such as player asks for the "guide" or some arguments are incorrect, the file is never closed.
That will cause issues with file handling later on.


5. 256 is an unnecessary length for a filename that only reaches the configs directory:
Code:
123456789012345678901234567890123456789
addons/amxmodx/configs/auto_change.ini
That's 38 characters.
Code:
new filename[39];
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
DruGzOG
Veteran Member
Join Date: Nov 2007
Location: Unknown
Old 09-26-2008 , 20:17   Re: Auto Change cvars/amxx files
Reply With Quote #13

Works Fine on my test server
__________________
DruGzOG is offline
Send a message via AIM to DruGzOG
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 09-29-2008 , 22:44   Re: Auto Change cvars/amxx files
Reply With Quote #14

I'll give 48 more hours after this post (5 days after my last post of fixes) for those fixes to be implemented, or this will be unapproved until fixed.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Styles
Veteran Member
Join Date: Jul 2004
Location: California
Old 10-01-2008 , 10:46   Re: Auto Change cvars/amxx files
Reply With Quote #15

Approved! if fixed like exolent said!
Styles is offline
Send a message via AIM to Styles
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 10-02-2008 , 07:22   Re: Auto Change cvars/amxx files
Reply With Quote #16

Wasn't updated. Unapproved until fixed.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 10-02-2008 , 07:34   Re: Auto Change cvars/amxx files
Reply With Quote #17

Quote:
Originally Posted by Exolent[jNr] View Post
5. 256 is an unnecessary length for a filename that only reaches the configs directory:
Code:
123456789012345678901234567890123456789
addons/amxmodx/configs/auto_change.ini
That's 38 characters.
Code:
new filename[39];
I would let at least 64, as the path is not hardcoded and as configs folder can be something else than addons/amxmodx/configs/
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 10-02-2008 , 10:58   Re: Auto Change cvars/amxx files
Reply With Quote #18

Nevertheless, 200 is unnecessary.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Dores
Veteran Member
Join Date: Jun 2008
Location: You really don't wanna k
Old 10-09-2008 , 17:19   Re: Auto Change cvars/amxx files
Reply With Quote #19

Texnux's last post at: 30-08-08.
This post at: 10-10-08.

I would guess he is no longer supporting this plugin, or he took a long vacation.


P.S: Congrats on "Excellent" karma, Exo...
Should be "Exolent" (but you've already heard this joke).
__________________
O o
/Ż________________________
| IMMA FIRIN' MAH LAZOR!!!
\_ŻŻŻ
Dores is offline
Texnux
Member
Join Date: Mar 2008
Location: Denmark
Old 10-29-2008 , 14:47   Re: Auto Change cvars/amxx files
Reply With Quote #20

Quote:
Originally Posted by Exolent[jNr] View Post
1. I suggest using client_putinserver() instead of client_connect().
Sometimes, a client does not connect for a few moments later due to server downloads or slow connection between the client and the server.
Done.

Quote:
Originally Posted by Exolent[jNr] View Post
2. You forgot to check if the command "amx_autoc_load_config" user has access.
If the cvar is enabled, anyone can use the command.
Fixed.

Quote:
Originally Posted by Exolent[jNr] View Post
3. Instead of get_playersnum(), I suggest a global variable counting each client as they [dis]connect.
That way, 1 less native and same reason as #1.
Done.

Quote:
Originally Posted by Exolent[jNr] View Post
4. Inside write_to_config(), you open a file.
But, if something goes wrong, such as player asks for the "guide" or some arguments are incorrect, the file is never closed.
That will cause issues with file handling later on.
Fixed.

Quote:
Originally Posted by Exolent[jNr] View Post
5. 256 is an unnecessary length for a filename that only reaches the configs directory:
Code:
123456789012345678901234567890123456789
addons/amxmodx/configs/auto_change.ini
That's 38 characters.
Code:
new filename[39];
Reduced to 64 if some one wants to change the direction, wasn't supposed to be that big anyway, c+p error


Quote:
Originally Posted by Dores View Post
Texnux's last post at: 30-08-08.
This post at: 10-10-08.

I would guess he is no longer supporting this plugin, or he took a long vacation.
Long story short, all my steam files got wiped, including all my works or several plugins, so I took a break from steam all together, but I'm back now.


New version, 1.1.2, only bug fixed, but very important!

- Texnux
Texnux 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 15:17.


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