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

[06/04/10] Map Bans


Post New Thread Reply   
 
Thread Tools Display Modes
KadiR
Unnecessary Member
Join Date: Aug 2008
Location: Zürich / Switzerland
Old 12-06-2009 , 05:05   Re: [05/12/09] Map Bans
Reply With Quote #11

I agree with others, nice work!
KadiR is offline
DruGzOG
Veteran Member
Join Date: Nov 2007
Location: Unknown
Old 12-06-2009 , 11:25   Re: [05/12/09] Map Bans
Reply With Quote #12

Quote:
Originally Posted by grimvh2 View Post
What do you mean by this :p?
As in "I would of never thought of someone to come up with this idea"
__________________
DruGzOG is offline
Send a message via AIM to DruGzOG
grimvh2
Veteran Member
Join Date: Nov 2007
Location: Fishdot Nation
Old 12-06-2009 , 15:18   Re: [05/12/09] Map Bans
Reply With Quote #13

Version 1.2 Released.
Version 1.3 Released.
__________________
I am out of order!

Last edited by grimvh2; 12-07-2009 at 07:51.
grimvh2 is offline
minimiller
Veteran Member
Join Date: Aug 2007
Location: United Kingdom
Old 12-07-2009 , 09:31   Re: [05/12/09] Map Bans
Reply With Quote #14

best ban-related plugin evur
gj (Y)
__________________
minimiller is offline
Send a message via MSN to minimiller
grimvh2
Veteran Member
Join Date: Nov 2007
Location: Fishdot Nation
Old 12-08-2009 , 08:45   Re: [05/12/09] Map Bans
Reply With Quote #15

Thanks all.

There have been added a few new translations.
__________________
I am out of order!
grimvh2 is offline
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 12-08-2009 , 09:29   Re: [05/12/09] Map Bans
Reply With Quote #16

  • You can break the while( ) loop after you find the player.
  • You can kick player as server_cmd( "kick ^"%i^" ", get_user_userid( id ) );, it wouldnt require you to use get_user_name
  • Use equal instead of equali, the job will go faster in module (yeah miliseconds, but.. )
  • The num_to_str is not nessesary here.
    Code:
        if(count > 0)         formatex(szData, 49,"%s %s %i",szAuthid, szName, count);     else         formatex(szData, 49,"%s %s 0",szAuthid, szName);
    I would you suggest to do as "%s" "%s" "%i", so it couldnt get f*cked if player have spaces in nick or anything else
  • In load_mapbans( ), you are using str_to_num, and then again num_to_str, you could directly use szCount, or as i said above, use %i and then just count
  • Generate g_szFile just once, in plugin_init
__________________

Last edited by xPaw; 12-08-2009 at 09:36.
xPaw is offline
grimvh2
Veteran Member
Join Date: Nov 2007
Location: Fishdot Nation
Old 12-08-2009 , 09:50   Re: [05/12/09] Map Bans
Reply With Quote #17

Quote:
Originally Posted by xPaw View Post
  • Generate g_szFile just once, in plugin_init
When you unban g_szFile could be anymap so it wont be constant, and I see no reason in it for creating 2 different strings.

Quote:
Originally Posted by xPaw View Post
  • In load_mapbans( ), you are using str_to_num, and then again num_to_str, you could directly use szCount, or as i said above, use %i and then just count
As my code now is I have to do that since count changes from value.
Example : Mapbans left is 3, Then the map hes banned from is played so we remove 1mapban meaning you would get 2 mapbans left (As far as I know you cant count with strings).

But maybe I can better store it as an int.

Quote:
Originally Posted by xPaw View Post
  • Use equal instead of equali, the job will go faster in module (yeah miliseconds, but.. )
Does it do anything else then speeding it up for miliseconds!?
__________________
I am out of order!
grimvh2 is offline
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 12-08-2009 , 10:05   Re: [05/12/09] Map Bans
Reply With Quote #18

Quote:
Originally Posted by grimvh2 View Post
Does it do anything else then speeding it up for miliseconds!?
No But its not nessesary to use equali
__________________
xPaw is offline
grimvh2
Veteran Member
Join Date: Nov 2007
Location: Fishdot Nation
Old 12-08-2009 , 11:04   Re: [05/12/09] Map Bans
Reply With Quote #19

Version 1.4 Released : Optimized + Fixed name with space bugs.

Thanks for pointing that out xPaw.
__________________
I am out of order!
grimvh2 is offline
#8 SickneSS
BANNED
Join Date: Sep 2008
Location: Here
Old 12-10-2009 , 10:50   Re: [05/12/09] Map Bans
Reply With Quote #20

I Like this!

Good Job!
#8 SickneSS is offline
Send a message via MSN to #8 SickneSS Send a message via Skype™ to #8 SickneSS
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 07:53.


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