Raised This Month: $ Target: $400
 0% 

if players < 8 exec small_maps


Post New Thread Closed Thread   
 
Thread Tools Display Modes
Author Message
Caldeum
Senior Member
Join Date: Jul 2010
Location: United Kingdom
Old 08-21-2012 , 02:57   if players < 8 exec small_maps
#1

How to get current online players? if players < 8 server will exec small_maps.ini and on round end change map to one of the map in this file and after change to small map if players will be > than 8 on end of round server will exec big_maps.ini and change to one of the big maps.

I think now how to get players. Because if players will be 6 7 or 3 server will change map all the time. Any ideas how to make it?

Sorry for english I hope you understand me
__________________
Of all the things I lost, I miss my brain the most.
Caldeum is offline
gogicaa
Veteran Member
Join Date: Aug 2011
Location: //
Old 08-21-2012 , 05:30   Re: if players < 8 exec small_maps
#2

http://www.amxmodx.org/funcwiki.php?go=func&id=174
gogicaa is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 08-21-2012 , 19:07   Re: if players < 8 exec small_maps
#3

get_playersnum() would be more appropriate here.
__________________
fysiks is offline
Caldeum
Senior Member
Join Date: Jul 2010
Location: United Kingdom
Old 08-25-2012 , 15:32   Re: if players < 8 exec small_maps
#4

Can anyone help? doesn't work for me. Can anyone tell me better way to get de_ maps if de_dust2_2x2 is small map and de_dust2 is big one?

PHP Code:
#pragma semicolon 1
#include < amxmodx >
#include < amxmisc >
#include < color >

public plugin_init( )
{
register_plugin"Changing map""0.1""alliedmodd" );

register_logevent"endround_event"2"0=World triggered""1=Round_End" );
}

public 
endround_eventid )
{
new 
players;
players get_playersnum( );

new 
Name32 ];
get_mapnameName31 );

if ( 
equaliName"de_" ) && equaliName"cs_office" ) && equaliName"cs_italy" ) )
{
if ( 
equaliName"de_dust2_2x2" ) )
return;

if ( 
players )
{
print_colorid"[AMXX] Server detect that players are less than 8. Next map will be de_dust2_2x2." );
set_task0.15"changesmallmap" );
}
}

if ( 
equaliName"fy_" ) && equaliName"awp_" ) && equaliName"cs_deagle5" ) && 
equaliName"cs_max" ) && equaliName"aim_" ) && equaliName"35hp_" ) && equaliName"de_dust2_2x2" ) )
{
if ( 
players 10 )
{
print_colorid"[AMXX] Server detect that players are more than 10. Next map will be de_dust2." );
set_task0.15"changebigmap" );
}
}
}

public 
changesmallmap( )
{
server_cmd"exec mapcycle_small.txt" );
server_cmd"changelevel de_dust2_2x2" );
}

public 
changebigmap( )
{
server_cmd"exec mapcycle_big.txt" );
server_cmd"changelevel de_dust2" );

__________________
Of all the things I lost, I miss my brain the most.

Last edited by Exolent[jNr]; 08-25-2012 at 21:37.
Caldeum is offline
gogicaa
Veteran Member
Join Date: Aug 2011
Location: //
Old 08-25-2012 , 16:26   Re: if players < 8 exec small_maps
#5

Use || operators instead of && on checking map names !
gogicaa is offline
Caldeum
Senior Member
Join Date: Jul 2010
Location: United Kingdom
Old 08-25-2012 , 16:36   Re: if players < 8 exec small_maps
#6

ohh stupid mistake thanks.
__________________
Of all the things I lost, I miss my brain the most.
Caldeum is offline
lucas_7_94
Leche Loco
Join Date: Mar 2009
Location: Argentina
Old 08-25-2012 , 18:06   Re: if players < 8 exec small_maps
#7

Dont delete your post , that can help to another people that have the same problem.
__________________
ATWWMH - MiniDuels
Madness is like gravity, just need a little push.
lucas_7_94 is offline
Send a message via Skype™ to lucas_7_94
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 08-25-2012 , 21:37   Re: if players < 8 exec small_maps
#8

Post restored.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Closed Thread



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 05:43.


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