Raised This Month: $ Target: $400
 0% 

I don't know why it's not working


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
killergirl
Senior Member
Join Date: Jul 2010
Old 11-28-2010 , 16:39   Re: I don't know why it's not working
Reply With Quote #1

Yes is there in plugin_init(). Really I don't get it... why the plugin works with "end night & start night" and the "check the number of players" it's not working. Sorry for my expression, I can't explain it better.

PHP Code:
#include <amxmodx>
#include <amxmisc>

#define SELECTMAPS  5

#define charsof(%1) (sizeof(%1)-1)

new Array:g_mapName;
new 
g_mapNums;

new 
g_nextName[SELECTMAPS]
new 
g_voteCount[SELECTMAPS 2]
new 
g_mapVoteNum
new g_teamScore[2]
new 
g_lastMap[32]

new 
g_coloredMenus
new bool:g_selected false

new pcvar_end_night;
new 
pcvar_start_night;
new 
pcvar_min_players;

public 
plugin_init()
{
    
register_plugin("Nextmap Chooser"AMXX_VERSION_STR"AMXX Dev Team")
    
register_dictionary("mapchooser.txt")
    
register_dictionary("common.txt")
    
    
g_mapName=ArrayCreate(32);
    
    new 
MenuName[64]
    
    
format(MenuName63"%L""en""CHOOSE_NEXTM")
    
register_menucmd(register_menuid(MenuName), (-1^(-1<<(SELECTMAPS+2))), "countVote")
    
register_cvar("amx_extendmap_max""90")
    
register_cvar("amx_extendmap_step""15")
    
pcvar_start_night register_cvar("start_night""0")
    
pcvar_end_night register_cvar("end_night""11")
    
pcvar_min_players register_cvar("min_players""6")

    if (
cstrike_running())
        
register_event("TeamScore""team_score""a")

    
get_localinfo("lastMap"g_lastMap31)
    
set_localinfo("lastMap""")

    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")
    }
      }
    
g_coloredMenus colored_menus()
    

killergirl is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 11-28-2010 , 17:56   Re: I don't know why it's not working
Reply With Quote #2

That answer is the same as I said before, there are ZERO players on the server during plugin_init().
__________________
fysiks 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 11:16.


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