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

can i change "maxplayers" for certain maps ?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
HelllBoy
Member
Join Date: Aug 2006
Location: Romania
Old 11-12-2006 , 02:20   can i change "maxplayers" for certain maps ?
Reply With Quote #1

i have a big server with respawn(csdm) mode and ofcourse i use amxmodx

my question is can i change "maxplayers" for certain maps ? why ? because :

the server is made for 24+2 players and for big map is not a problem , but to many people like small maps like mini_dust2 , dust2_long etc but my server makes lag or crashes .

for this i want to put 18 players for small maps and 24 for the big ones

so its working or not ?
HelllBoy is offline
sub
Senior Member
Join Date: Nov 2004
Location: Morristown, New Jersey
Old 11-12-2006 , 02:34   Re: can i change "maxplayers" for certain maps ?
Reply With Quote #2

yeah somethign like
Code:
public check_map() {      new map = get_mapname()      if(map = de_dust){            server_cmd("maxplayers 16")      }      if(map = de_dust2){            server_cmd("maxplayers 32")      } }
Or soemthign liek that, that was compltly off th etop my head. Probly aint gonan work, just owrk off of it.
sub is offline
Send a message via AIM to sub Send a message via MSN to sub
p3tsin
Senior Member
Join Date: Sep 2005
Location: Finland
Old 11-12-2006 , 08:00   Re: can i change "maxplayers" for certain maps ?
Reply With Quote #3

maxplayers cant be changed after the server is created
u could try doing "map de_dust2;maxplayers 18", tho that would close the server and kick all players

a better solution would be using sv_visiblemaxplayers and kicking everybody trying to join the srv after theres 18 players connected
__________________
plop
p3tsin is offline
schnitzelmaker
Senior Member
Join Date: Apr 2006
Location: HERE
Old 11-12-2006 , 09:06   Re: can i change "maxplayers" for certain maps ?
Reply With Quote #4

here a way to do it:
Code:
public check_map() {//not recommend      new map = get_mapname()      if(equali(map,"de_dust")){            server_cmd("sv_visiblemaxplayers 16")      }      if(equali(map,"de_dust2")){            server_cmd("sv_visiblemaxplayers 32")      } } public client_connect(id) {      new map = get_mapname()      new players = get_playersnum(1)      if(equali(map,"de_dust") && players >= 16){            server_cmd("kick #%d ^"No open Slot^"", get_user_userid(id))      }      if(equali(map,"de_dust2") && players >= 32){            server_cmd("kick #%d ^"No open Slot^"", get_user_userid(id))      } }
__________________

Last edited by schnitzelmaker; 11-12-2006 at 09:08.
schnitzelmaker is offline
[ --<-@ ] Black Rose
ANNIHILATED
Join Date: Sep 2005
Location: Stockholm, Sweden.
Old 11-12-2006 , 09:06   Re: can i change "maxplayers" for certain maps ?
Reply With Quote #5

Quote:
Originally Posted by sub
Code:
public check_map() {      new map = get_mapname()      if(map = de_dust){            server_cmd("maxplayers 16")      }      if(map = de_dust2){            server_cmd("maxplayers 32")      } }
Code:
public check_map() {         new map[32]     get_mapname(map, 31)         if ( equali(map, "de_dust") )         server_cmd("maxplayers 16")             if ( equali(map, "de_dust2") )         server_cmd("maxplayers 32")         }
[ --<-@ ] Black Rose is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 11-12-2006 , 13:56   Re: can i change "maxplayers" for certain maps ?
Reply With Quote #6

As far as I know the only way to change maxplayers in game is with this plugin: http://forums.alliedmods.net/showthread.php?t=46276 (appropiately titled "Change maxplayers INGAME")
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
schnitzelmaker
Senior Member
Join Date: Apr 2006
Location: HERE
Old 11-12-2006 , 14:40   Re: can i change "maxplayers" for certain maps ?
Reply With Quote #7

Quote:
As far as I know the only way to change maxplayers in game is with this plugin: http://forums.alliedmods.net/showthread.php?t=46276 (appropiately titled "Change maxplayers INGAME")
This only work for Windows.
__________________
schnitzelmaker is offline
HelllBoy
Member
Join Date: Aug 2006
Location: Romania
Old 11-12-2006 , 15:12   Re: can i change "maxplayers" for certain maps ?
Reply With Quote #8

pfff i i have linux server
HelllBoy is offline
HelllBoy
Member
Join Date: Aug 2006
Location: Romania
Old 11-12-2006 , 15:22   Re: can i change "maxplayers" for certain maps ?
Reply With Quote #9

Quote:
Originally Posted by [ --<-@ ] Black Rose View Post
Code:
</p><p>public check_map() {</p><p>&nbsp;</p><p>&nbsp;&nbsp;&nbsp;&nbsp;new map[32]</p><p>&nbsp;&nbsp;&nbsp;&nbsp;get_mapname(map, 31)</p><p>&nbsp;</p><p>&nbsp;&nbsp;&nbsp;&nbsp;if ( equali(map, "de_dust") )</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;&nbsp;server_cmd("maxplayers 16")</p><p>&nbsp;</p><p>&nbsp;&nbsp;&nbsp;&nbsp;if ( equali(map, "de_dust2") )</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;&nbsp;server_cmd("maxplayers 32")</p><p>&nbsp;</p><p>}

man where i must edit i dont know what script need edit ?
HelllBoy is offline
k007
BANNED
Join Date: Mar 2006
Location: bacon?
Old 11-12-2006 , 15:45   Re: can i change "maxplayers" for certain maps ?
Reply With Quote #10

O M G... u can't change the max players from a server console.. u could only change it from the command line. and yeah ava is true
k007 is offline
Send a message via MSN to k007
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 17:07.


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