Raised This Month: $ Target: $400
 0% 

I don't know why it's not working


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
killergirl
Senior Member
Join Date: Jul 2010
Old 11-27-2010 , 13:47   I don't know why it's not working
Reply With Quote #1

I've tried to modify the mapchooser.sma to make a bit better for my server. I modified for date and number of players, but the plugin won't working. When the vote time comes the maps it's extracted from maps_mini.ini, "doesen't cares" about the number of players, and what time is it. I've tested it without "check the number of players", only "check the time", and it's working. I don't know what to do.

PHP Code:
static players[32], playerCount;
new 
maps_ini_file[64];
new 
hourminutesecond;

time(hourminutesecond);
get_players(playersplayerCount"ch");
get_configsdir(maps_ini_file63);

if (
playerCount <= get_pcvar_num(pcvar_min_players)){
    
    
format(maps_ini_file63"%s/maps/maps_mini.ini"maps_ini_file);
    
    if (!
file_exists(maps_ini_file))
    
get_cvar_string("mapcyclefile"maps_ini_file63)
    if (
loadSettings(maps_ini_file))
    
set_task(15.0"voteNextmap"987456""0"b")
    }
    else{
    if (
hour >= get_pcvar_num(pcvar_start_night) && 
        
hour get_pcvar_num(pcvar_end_night)){
    
format(maps_ini_file63"%s/maps/maps_night.ini"maps_ini_file);
    
    if (!
file_exists(maps_ini_file))
        
get_cvar_string("mapcyclefile"maps_ini_file63)
    if (
loadSettings(maps_ini_file))
        
set_task(15.0"voteNextmap"987456""0"b")
    }
    else{
    
format(maps_ini_file63"%s/maps/maps_normal.ini"maps_ini_file);
    
    if (!
file_exists(maps_ini_file))
        
get_cvar_string("mapcyclefile"maps_ini_file63)
    if (
loadSettings(maps_ini_file))
        
set_task(15.0"voteNextmap"987456""0"b")
    }

killergirl is offline
 



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 11:16.


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