Правила форума Гаранты форума
Размещение рекламы AMX-X компилятор

Здравствуйте, гость Вход | Регистрация

Наши новости:

14-дек
24-апр
10-апр
11-апр

Ищу но слепой

Статус пользователя Connect1507
сообщение 8.3.2012, 20:44
Сообщение #1
Стаж: 14 лет

Сообщений: 172
Благодарностей: 2
Полезность: 22

В общем скачал плагин для смены карт и хочу поменять звуки до отсчёта голосования, но ненайду их оО.
Кто этим занимался подскажите плз в какой строчке по счёту они ?)Если такое вообще есть.
часть1
Код
#pragma semicolon 1
#include <amxmodx>
#include <amxmisc>

new const PLUGIN[]  = "DeagsMapManager";
new const VERSION[] = "3.23";
new const AUTHOR[]  = "Deags/AMXX Community";

// Comment out the following line to disable the dedicated log file
#define DEDICATED_LOG_ENABLED

#define MAX_MAPS_AMOUNT 600
#define ADMIN_DMAP ADMIN_LEVEL_A
#define ADMIN_SUPER_DMAP ADMIN_LEVEL_F

new const DMAP_MENU_TITLE[] = "DMAP_MENU_TITLE";

#define DMAP_VOTE_TIME 20        // Total time (in seconds) from vote start to checking votes

#define DMAP_TASKID_VTR 10000        // Vote Time Remaining
// non-DEFINE ids currently used:
// 123400, 123450, 123452, 127600(+id), 127600(+idreal),333333, 444444, 454500,
// 454510, 459100, 459200, 765100, 986100, 986200, 987111, 987300, 987456

new maps_to_select, isbuytime = 0, isbetween = 0;
new ban_last_maps = 0, quiet = 0;    //quiet=0 (words and sounds) quiet=1 (words only, no sound) quiet=2 (no sound, no words)
new Float:rtvpercent, Float:thespeed, Float:oldtimelimit;
new minimum = 1, minimumwait = 10, enabled = 1, cycle = 0, dofreeze = 1, maxnom = 3, maxcustnom = 5, frequency = 3, oldwinlimit = 0, addthiswait = 0;
new mapsurl[64], amt_custom = 0;
new isend = 0, isspeedset = 0, istimeset = 0, iswinlimitset = 0, istimeset2 = 0, mapssave = 0, atstart;
new usestandard = 1, currentplayers = 0, activeplayers = 0, counttovote = 0, countnum = 0;
new inprogress = 0, rocks = 0, rocked[33], hasbeenrocked = 0, waited = 0;
new pathtomaps[64];
new custompath[50];
new nmaps[MAX_MAPS_AMOUNT][32];
new listofmaps[MAX_MAPS_AMOUNT][32];
new totalbanned = 0;
new banthesemaps[MAX_MAPS_AMOUNT][32];
new totalmaps = 0;
new lastmaps[100 + 1][32];
new bannedsofar = 0;
new standard[50][32];
new standardtotal = 0;
new nmaps_num = 0;    //this is number of nominated maps
new nbeforefill;
new nmapsfill[MAX_MAPS_AMOUNT][32];
new num_nmapsfill;    //this is number of maps in users admin.cfg file that are valid
new bool:bIsCstrike;
new nnextmaps[10];
new nvotes[12];        // Holds the number of votes for each map
new nmapstoch, before_num_nmapsfill = 0, bool:mselected = false;
#if defined DEDICATED_LOG_ENABLED
new logfilename[256];
#endif
new teamscore[2], last_map[32];
new Nominated[MAX_MAPS_AMOUNT];        //?
new whonmaps_num[MAX_MAPS_AMOUNT];
new curtime = 0, staytime = 0, curplayers = 0, currounds = 0;

new pDmapStrict;        // Pointer to dmap_strict
new pEmptyMap;            // Pointer to amx_emptymap
new pEmptymapAllowed;        // Pointer to emptymap_allowed
new pEnforceTimelimit;        // Pointer to enforce_timelimit
new pExtendmapMax;        // Pointer to amx_extendmap_max
new pExtendmapStep;        // Pointer to amx_extendmap_step
new pIdleTime;            // Pointer to amx_idletime"
new pNominationsAllowed;    // Pointer to nominations_allowed
new pShowActivity;        // Pointer to amx_show_activity
new pWeaponDelay;        // Pointer to weapon_delay

new g_TotalVotes;        // Running total used to calculate percentages
new bool:g_AlreadyVoted[33];    // Keep track of who voted in current round
new g_VoteTimeRemaining;    // Used to set duration of display of vote menu

forward public hudtext16(textblock[], colr, colg, colb, posx, posy, screen, time, id);
forward bool:isbanned(map[]);
forward bool:iscustommap(map[]);
forward bool:islastmaps(map[]);
forward bool:isnominated(map[]);
forward public handle_nominate(id, map[], bool:bForce);
forward available_maps();
forward public getready();
forward public timetovote();
forward public messagefifteen();
forward public messagenominated();
forward public messagemaps();
forward public stopperson();
forward public countdown();
forward public rock_it_now();
forward public timedisplay();
forward public messagethree();

public client_connect(id) {
    if (!is_user_bot(id)) {
        currentplayers++;
    }
    return PLUGIN_CONTINUE;
}

public loopmessages() {
    if (quiet == 2) {    //quiet=0 (words and sounds) quiet=1 (words only, no sound) quiet=2 (no sound, no words)
        return PLUGIN_HANDLED;
    }
    new timeleft = get_timeleft();
    new partialtime = timeleft % 370;
    new maintime = timeleft % 600;
    if ((maintime > 122 && maintime < 128) && timeleft > 114) {
        set_task(1.0, "timedisplay", 454510, "", 0, "a", 5);
    }
    if ((partialtime > 320 && partialtime < 326) && !cycle) {
        set_task(3.0, "messagethree", 987300);    //, "", 0, "a", 4)
        return PLUGIN_HANDLED;
    }
    return PLUGIN_HANDLED;
}

public timedisplay() {
    new timeleft = get_timeleft();
    new seconds = timeleft % 60;
    new minutes = floatround((timeleft - seconds) / 60.0);
    if (timeleft < 1) {
        remove_task(454510);
        remove_task(454500);
        remove_task(123452);
        remove_task(123499);
        return PLUGIN_HANDLED;
    }
    if (timeleft > 140) {
        remove_task(454500);
    }
    if (timeleft > 30) {
        set_hudmessage(255, 255, 220, 0.02, 0.2, 0, 1.0, 1.04, 0.0, 0.05, 3);
    } else {
        set_hudmessage(210, 0 ,0, 0.02, 0.15, 0, 1.0, 1.04, 0.0, 0.05, 3);
        //Flashing red:set_hudmessage(210, 0, 0, 0.02, 0.2, 1, 1.0, 1.04, 0.0, 0.05, 3);
    }
    show_hudmessage(0, "%L", LANG_PLAYER, "DMAP_TIME_LEFT", minutes, seconds);
    if (timeleft < 70 && (timeleft % 5) == 1) {
        new smap[32];
        get_cvar_string("amx_nextmap", smap, 31);
        set_hudmessage(0, 132, 255, 0.02, 0.27, 0, 5.0, 5.04, 0.0, 0.5, 4);
        show_hudmessage(0, "%L", LANG_PLAYER, "DMAP_NEXTMAP", smap);
    }
    return PLUGIN_HANDLED;
    
}

public messagethree() {
    new timeleft = get_timeleft();
    new time2 = timeleft - timeleft % 60;
    new minutesleft = floatround(float(time2) / 60.0);
    new mapname[32];
    get_mapname(mapname, 31);
    new smap[32];
    get_cvar_string("amx_nextmap", smap, 31);
    if (minutesleft >= 2 && !mselected) {
        client_print(0, print_chat, "%L", LANG_PLAYER, "DMAP_NEXTMAP_VOTE_REMAINING",
          (minutesleft == 3 || minutesleft == 2) ? timeleft -100 : minutesleft - 2, (minutesleft == 3 || minutesleft == 2) ? "seconds" : "minutes");
    } else {
        if (mselected) {
            client_print(0, print_chat, "%L", LANG_PLAYER, "DMAP_NEXTMAP_VOTED", smap, timeleft);
        } else {
            if (minutesleft <= 2 && timeleft) {
                client_print(0, print_chat, "%L", LANG_PLAYER, "DMAP_CURRENT_MAP", mapname);
            }
        }
    }
}

public client_putinserver(id) {
    if (!is_user_bot(id)) {
        activeplayers++;
    }
    return PLUGIN_CONTINUE;
}

public client_disconnect(id) {
    remove_task(987600 + id);
    remove_task(127600 + id);
    if (is_user_bot(id)) {
        return PLUGIN_CONTINUE;
    }
    currentplayers--;
    activeplayers--;
    g_AlreadyVoted[id] = false;
    if (rocked[id]) {
        rocked[id] = 0;
        rocks--;
    }
    if (get_timeleft() > 160) {
        if (!mselected && !hasbeenrocked && !inprogress) {
            check_if_need();
        }
    }
    new kName[32];
    get_user_name(id, kName, 31);

    new n = 0;
    while (Nominated[id] > 0 && n < nmaps_num) {
        if (whonmaps_num[n] == id) {
            if (get_timeleft() > 50 && quiet != 2) {    //quiet=0 (words and sounds) quiet=1 (words only, no sound) quiet=2 (no sound, no words)
                client_print(0, print_chat, "%L", LANG_PLAYER, "DMAP_PLAYER_LEFT", kName, nmaps[n]);
#if defined DEDICATED_LOG_ENABLED
                log_to_file(logfilename, "%s has left; %s is no longer nominated", kName, nmaps[n]);
#endif
            }

            new j = n;
            while (j < nmaps_num - 1) {
                whonmaps_num[j] = whonmaps_num[j + 1];
                nmaps[j] = nmaps[j + 1];
                j++;
            }
            nmaps_num--;
            Nominated[id] = Nominated[id] - 1;
        } else {
            n++;
        }
    }
    return PLUGIN_CONTINUE;
}

public timer(id) {
    if (get_playersnum() == 0) {
        curtime++;
        if (curtime >= staytime) {
            change_maps();
        }
    } else {
        new i, noncounted, players = get_playersnum();
        for (i = 1; i <= get_maxplayers(); i++) {
            if ((get_user_time(i, 1) >= (get_pcvar_num(pIdleTime) * 216000)) || is_user_bot(i) || is_user_hltv(i)) {
                noncounted++;
            }
        }
        if (players == noncounted) {
            curtime++;
            if (curtime >= staytime) {
                change_maps();
            }
        } else {
            curtime = 0;
        }
    }
    return curtime;
}

public change_maps() {

    new map[51], curmap[51];
    get_mapname(curmap,50);
    get_pcvar_string(pEmptyMap, map, 31);

    if (get_pcvar_num(pEmptymapAllowed) == 1 && strlen(map) > 0) {
        server_cmd("changelevel %s", map);
    }
}

public list_maps(id) {
    new m, iteration = 0;
    client_print(id, print_chat, "%L", id, "DMAP_LISTMAPS", totalmaps);
    if (totalmaps - (50 * iteration) >= 50) {
        console_print(id, "%L", id, "DMAP_LISTMAPS_MAPS", iteration * 50 + 1, iteration * 50 + 50);
    } else {
        console_print(id, "%L", id, "DMAP_LISTMAPS_MAPS", iteration * 50 + 1, iteration * 50 + (totalmaps - iteration * 50));
    }
    
    for (m = 50 * iteration; (m < totalmaps && m < 50 * (iteration + 1)); m += 3)
        if (m + 1 < totalmaps) {
            if (m + 2 < totalmaps) {
                console_print(id, "   %s   %s   %s", listofmaps[m], listofmaps[m + 1], listofmaps[m + 2]);
            } else {
                console_print(id, "   %s   %s", listofmaps[m], listofmaps[m + 1]);
            }
        } else {
            console_print(id, "   %s", listofmaps[m]);
        }
    if (50 * (iteration + 1) < totalmaps) {
        new kIdfake[32];
        num_to_str((id + 50 * (iteration + 1)), kIdfake, 31);
        client_print(id, print_console, "%L", id, "DMAP_LISTMAPS_MORE");
        set_task(4.0, "more_list_maps", 127600 + id, kIdfake, 6);
    }
    return PLUGIN_CONTINUE;
}

public more_list_maps(idfakestr[]) {
    new idreal = str_to_num(idfakestr);
    new m, iteration = 0;
    while (idreal >= 50) {
        idreal -= 50;
        iteration++;
    }    //Now idreal is the real id of client

    if (totalmaps - (50 * iteration) >= 50) {
        console_print(idreal, "%L", idreal, "DMAP_LISTMAPS_MAPS", iteration * 50 + 1, iteration * 50 + 50);
    } else {
        console_print(idreal, "%L", idreal, "DMAP_LISTMAPS_MAPS", iteration * 50 + 1, iteration * 50 + (totalmaps - iteration * 50));
    }

    for (m = 50 * iteration; (m < totalmaps && m < 50 * (iteration + 1)); m += 3) {
        if (m + 1 < totalmaps) {
            if (m + 2 < totalmaps) {
                console_print(idreal, "   %s   %s   %s", listofmaps[m], listofmaps[m + 1], listofmaps[m + 2]);
            } else {
                console_print(idreal, "   %s   %s", listofmaps[m], listofmaps[m + 1]);
            }
        } else {
            console_print(idreal, "   %s", listofmaps[m]);
        }
    }
        
    if (50 * (iteration + 1) < totalmaps) {
        new kIdfake[32];
        num_to_str((idreal + 50 * (iteration + 1)), kIdfake, 31);
        client_print(idreal, print_console, "%L", idreal, "DMAP_LISTMAPS_MORE");
        set_task(2.0, "more_list_maps", 127600 + idreal, kIdfake, 6);
    } else {    //Base case has been reached
        client_print(idreal, print_console, "%L", idreal, "DMAP_LISTMAPS_FINISHED", totalmaps);
    }
}

public say_nextmap(id) {
    new timeleft = get_timeleft();
    new time2 = timeleft - timeleft % 60;
    new minutesleft = floatround(float(time2) / 60.0);
    new mapname[32];
    get_mapname(mapname,31);
    new smap[32];
    get_cvar_string("amx_nextmap", smap, 31);
    if (minutesleft >= 2 && !mselected)
    if (get_pcvar_num(pNominationsAllowed) == 1) {
        client_print(0, print_chat, "%L", LANG_PLAYER, "DMAP_SAY_NOMINATIONS",
          (minutesleft == 3 || minutesleft == 2) ? timeleft - 100 : minutesleft - 2, (minutesleft == 3 || minutesleft == 2) ? "sec." : "min.");
    } else {
        if (mselected) {
            client_print(0, print_chat, "%L", LANG_PLAYER, "DMAP_NEXTMAP_VOTED", smap, timeleft);
        } else {
            if (inprogress) {
                client_print(0, print_chat, "%L", LANG_PLAYER, "DMAP_CURRENT_MAP", mapname);
            }
        }
    }
    return PLUGIN_HANDLED;
}

public check_if_need() {
    new Float:ratio = rtvpercent;
    new needed = floatround(float(activeplayers) * ratio + 0.49);
    new timeleft = get_timeleft();
    new Float:minutesleft = float(timeleft) / 60.0;
    new Float:currentlimit = get_cvar_float("mp_timelimit");
    new Float:minutesplayed = currentlimit - minutesleft;
    new wait;
    wait = minimumwait;
    if ((minutesplayed + 0.5) >= (float(wait))) {
        if (rocks >= needed && rocks >= minimum) {
            client_print(0, print_chat, "%L", LANG_PLAYER, "DMAP_RTV_STARTING", rocks);
            set_hudmessage(222, 70, 0, -1.0, 0.3, 1, 10.0, 10.0, 2.0, 4.0, 4);
            show_hudmessage(0, "%L", LANG_PLAYER, "DMAP_RTV_START", rocks);
            hasbeenrocked = 1;
            inprogress = 1;
            mselected = false;
            set_task(10.0, "rock_it_now", 765100);
        }
    }
}

public rock_the_vote(id) {
    new Float:ratio = rtvpercent;
    new needed = floatround(float(activeplayers) * ratio + 0.49);
    new kName[32];
    get_user_name(id, kName, 31);
    new timeleft = get_timeleft();
    new Float:minutesleft = float(timeleft) / 60.0;
    new Float:currentlimit = get_cvar_float("mp_timelimit");
    new Float:minutesplayed = currentlimit - minutesleft;
    new wait;
    wait = minimumwait;
    if (cycle) {
        client_print(id, print_chat, "%L", id, "DMAP_VOTING_DISABLED");
        return PLUGIN_CONTINUE;
    }
    if (!enabled) {
        client_print(id, print_chat, "%L", id, "DMAP_RTV_DISABLED");
        return PLUGIN_CONTINUE;
    }
    if (inprogress) {
        client_print(id, print_chat, "%L", id, "DMAP_VOTE_BEGINNING");
        return PLUGIN_CONTINUE;
    }
    if (mselected) {
        new smap[32];
        get_cvar_string("amx_nextmap", smap, 31);
        client_print(id, print_chat, "%L", id, "DMAP_VOTING_COMPLETED", smap, get_timeleft());
        return PLUGIN_CONTINUE;
    }
    if (hasbeenrocked) {
        client_print(id, print_chat, "%L", id, "DMAP_MAP_ALREADY_ROCKED", kName);
        return PLUGIN_CONTINUE;
    }
    if (timeleft < 120) {
        if (timeleft > 1) {
            client_print(id, print_chat, "%L", id, "DMAP_NOT_ENOUGH_TIME");
        } else {
            client_print(id, print_chat, "%L", id, "DMAP_NO_TIMELIMIT");
        }
        return PLUGIN_CONTINUE;
    }
    if ((minutesplayed + 0.5) < (float(wait))) {
        if (float(wait) - 0.5 - minutesplayed > 0.0) {
            client_print(id, print_chat, "%L", id, "DMAP_RTV_WAIT",
              kName, (floatround(float(wait) + 0.5-minutesplayed) > 0) ? (floatround(float(wait) + 0.5 - minutesplayed)) : (1));
        } else {
            client_print(id, print_chat, "%L", id, "DMAP_RTV_1MIN");
        }
        if ((get_user_flags(id) & ADMIN_MAP)) {
            console_print(id, "%L", id, "DMAP_RTV_ADMIN_FORCE", kName);
        }
        return PLUGIN_CONTINUE;
    }
    if (!rocked[id]) {
        rocked[id] = 1;
        rocks++;
    } else {
        client_print(id, print_chat, "%L", id, "DMAP_ALREADY_ROCKED", kName);
        return PLUGIN_CONTINUE;
    }
    if (rocks >= needed && rocks >= minimum) {
        client_print(0, print_chat, "%L", LANG_PLAYER, "DMAP_RTV_STARTING", rocks);
        set_hudmessage(222, 70,0, -1.0, 0.3, 1, 10.0, 10.0, 2.0, 4.0, 4);
        show_hudmessage(0, "%L", LANG_PLAYER, "DMAP_RTV_START", rocks);
        hasbeenrocked = 1;
        inprogress = 1;
        mselected = false;
        set_task(15.0, "rock_it_now", 765100);
    } else {
        client_print(0, print_chat, "%L", LANG_PLAYER, "DMAP_RTV_NEEDED", ((needed-rocks) > (minimum-needed)) ? (needed-rocks) : (minimum-rocks));
    }
    return PLUGIN_CONTINUE;
}

public rock_it_now() {
    new temprocked = hasbeenrocked;
    hasbeenrocked = 1;
    new timeleft = get_timeleft();
    new Float:minutesleft=float(timeleft) / 60.0;
    new Float:currentlimit = get_cvar_float("mp_timelimit");
    new Float:minutesplayed = currentlimit-minutesleft;
    new Float:timelimit;
    counttovote = 0;
    remove_task(459200);
    remove_task(459100);
    timelimit = float(floatround(minutesplayed + 1.5));
    if (timelimit > 0.4) {
        oldtimelimit = get_cvar_float("mp_timelimit");
        istimeset = 1;
        set_cvar_float("mp_timelimit", timelimit);
        if (quiet != 2) {
            console_print(0, "%L", LANG_PLAYER, "DMAP_TIMELIMIT_CHANGED", floatround(get_cvar_float("mp_timelimit")));
        }
#if defined DEDICATED_LOG_ENABLED
        log_to_file(logfilename, "Time limit changed to %d to enable vote to occur now", floatround(get_cvar_float("mp_timelimit")));
#endif
    } else {
        console_print(0, "%L", LANG_PLAYER, "DMAP_TIMELIMIT_NOTCHANGED");
#if defined DEDICATED_LOG_ENABLED
        log_to_file(logfilename, "Will not set a timelimit of %d, vote is not rocked, seconds left on map:%d", floatround(timelimit), timeleft);
#endif
        new inum, players[32], i;
        get_players(players, inum, "c");
        for (i = 0; i < inum; ++i) {
            rocked[i] = 0;
        }
        rocks = 0;
        hasbeenrocked = temprocked;
        return PLUGIN_HANDLED;
    }
    timeleft = get_timeleft();
    inprogress = 1;
    mselected = false;
    if (quiet != 2) {
        set_hudmessage(0, 222,50, -1.0, 0.23, 1, 6.0, 6.0, 1.0, 1.0, 4);
        show_hudmessage(0, "%L", LANG_PLAYER, "DMAP_START_MAPVOTE");
    } else {
        client_print(0, print_chat, "%L", LANG_PLAYER, "DMAP_START_MAPVOTE");
    }
    if (quiet == 0) {
        client_cmd(0, "spk ^"get red(e80) ninety(s45) to check(e20) use _comma(e10) bay(s18) mass(e42) cap(s50)^"");
    }
    set_task(3.5, "getready", 459100);
    set_task(10.0, "startthevote");
    remove_task(454500);
    remove_task(123452);
    rocks = 0;
    new inum, players[32], i;
    get_players(players, inum, "c");
    for (i = 0; i < inum; ++i) {
        rocked[i] = 0;
    }
    set_task(2.18, "calculate_custom");
    return PLUGIN_HANDLED;
}

public admin_rockit(id, level, cid) {
    if (!cmd_access(id, level, cid, 1)) {
        return PLUGIN_HANDLED;
    }

    new arg[32];
    read_argv(1, arg, 31);
    new kName[32], timeleft = get_timeleft();
    get_user_name(id, kName, 31);

    if (timeleft < 180.0) {
        console_print(id, "%L", id, "DMAP_NOT_ENOUGH_TIME");
        return PLUGIN_HANDLED;
    }
    if (inprogress || hasbeenrocked || isend) {
        console_print(id, "%L", id, "DMAP_ALREADY_VOTING");
        return PLUGIN_HANDLED;
    }
    if (cycle) {
        console_print(id, "%L", id, "DMAP_ENABLE_VOTEMODE");
        return PLUGIN_HANDLED;
    }
    if (!mselected) {
        switch(get_pcvar_num(pShowActivity)) {
            case 2: client_print(0, print_chat, "%L", LANG_PLAYER, "DMAP_VOTE_ROCKED_BY_ADMIN", kName);
            case 1: client_print(0, print_chat, "%L", LANG_PLAYER, "DMAP_RTV_USED_BY_ADMIN");
        }
    } else {
        switch(get_pcvar_num(pShowActivity)) {
            case 2: client_print(0, print_chat, "%L", LANG_PLAYER, "DMAP_REVOTE_BY_ADMIN", kName);
            case 1: client_print(0, print_chat, "%L", LANG_PLAYER, "DMAP_REVOTE");
        }
    }
    remove_task(123450);
    remove_task(123400);
    remove_task(123452);
    remove_task(123499);
    counttovote = 0;
    remove_task(459200);
    remove_task(459100);
#if defined DEDICATED_LOG_ENABLED
    log_to_file(logfilename, "Admin: <%s> calls rockthevote with %d seconds left on map", kName, timeleft);
#endif
    inprogress = 1;
    mselected = false;
    set_task(15.0, "rock_it_now", 765100);
    set_task(0.18, "calculate_custom");
    return PLUGIN_HANDLED;
}

public check_votes() {
    new timeleft = get_timeleft();
    new b = 0, a;
    for (a = 0; a < nmapstoch; ++a) {
        if (nvotes[b] < nvotes[a]) {
            b = a;
        }
    }
    if (nvotes[maps_to_select] > nvotes[b]) {
        new mapname[32];
        get_mapname(mapname, 31);
        new Float:steptime = get_pcvar_float(pExtendmapStep);
        set_cvar_float("mp_timelimit", get_cvar_float("mp_timelimit") + steptime);
        //oldtimelimit = get_cvar_float("mp_timelimit");
        istimeset = 1;

        if (quiet != 2) {
            set_hudmessage(222, 70,0, -1.0, 0.4, 0, 4.0, 10.0, 2.0, 2.0, 4);
            show_hudmessage(0, "%L", LANG_PLAYER, "DMAP_MAP_EXTENDED", steptime);
            if (quiet != 1) {
                client_cmd(0, "speak ^"barney/waitin^"");
            }
        }
        client_print(0, print_chat, "%L", LANG_PLAYER, "DMAP_MAP_EXTENDED2", steptime);
#if defined DEDICATED_LOG_ENABLED
        log_to_file(logfilename, "Vote: Voting for the nextmap finished. Map %s will be extended to next %.0f minutes", mapname, steptime);
#endif
        inprogress = isend = 0;
        nmaps_num = nbeforefill;
        num_nmapsfill = before_num_nmapsfill;
        return PLUGIN_HANDLED;
    }
    if (nvotes[b] && nvotes[maps_to_select+1] <= nvotes[b]) {
        set_cvar_string("amx_nextmap", nmaps[nnextmaps[b]]);
        new smap[32];
        get_cvar_string("amx_nextmap", smap, 31);
        new players[32], inum;
        get_players(players, inum, "c");
        if (quiet != 2) {
            if (timeleft <= 0 || timeleft > 300) {
                set_hudmessage(222, 70,0, -1.0, 0.36, 0, 4.0, 10.0, 2.0, 2.0, 4);
                show_hudmessage(0, "%L", LANG_PLAYER, "DMAP_MAP_WINS", nmaps[nnextmaps[b]], nvotes[b], timeleft);
            } else {
                set_hudmessage(0, 152, 255, -1.0, 0.22, 0, 4.0, 7.0, 2.1, 1.5, 4);
                if (get_pcvar_float(pEnforceTimelimit) == 1.0 && bIsCstrike) {
                    show_hudmessage(0, "%L %L", LANG_PLAYER, "DMAP_MAP_WINS2", nmaps[nnextmaps[b]], nvotes[b], LANG_PLAYER, "DMAP_IN_SECONDS", timeleft);
                } else {
                    show_hudmessage(0, "%L %L", LANG_PLAYER, "DMAP_MAP_WINS2", nmaps[nnextmaps[b]], nvotes[b], LANG_PLAYER, "DMAP_SHORTLY");
                }
                if (iscustommap(nmaps[nnextmaps[b]]) && usestandard) {
                    client_print(0, print_notify, "%L", LANG_PLAYER, "DMAP_DOWNLOAD_CUSTOM_MAP");
                }
            }
            if ((containi(mapsurl, "www") != -1 || containi(mapsurl, "http") != -1) && iscustommap(nmaps[nnextmaps[b]])) {
                //set_hudmessage(0, 152, 255, -1.0, 0.70, 1, 4.0, 12.0, 2.1, 1.5, 7);
                client_print(0, print_chat, "%L", LANG_PLAYER, "DMAP_DOWNLOAD_MAPS_URL", mapsurl);
            }
            if (quiet != 1) {
                client_cmd(0, "speak ^"barney/letsgo^"");    //quiet=0 (words and sounds) quiet=1 (words only, no sound) quiet=2 (no sound, no words)
            }
        }
    }

    new smap[32];
    get_cvar_string("amx_nextmap", smap, 31);
    client_print(0, print_chat, "%L", LANG_PLAYER, "DMAP_CHOOSING_FINISHED", smap);
#if defined DEDICATED_LOG_ENABLED
    log_to_file(logfilename, "Vote: Voting for the nextmap finished. The nextmap will be %s", smap);
#endif
    inprogress = waited = 0;
    isend = 1;
    //WE ARE near END OF MAP; time to invoke Round mode ALgorithm
    //set_task(2.0, "endofround", 123452, "", 0, "b");
    new waituntilready = timeleft - 60;
    if (waituntilready > 30) {
        waituntilready = 30;
    }
    if (waituntilready <= 0 || get_cvar_num("mp_winlimit")) {
        addthiswait = 4;
        set_task(4.0, "RoundMode", 333333);
    } else {
        set_task(float(waituntilready), "RoundMode", 333333);
        addthiswait = waituntilready;
    }
    nmaps_num = nbeforefill;
    num_nmapsfill = before_num_nmapsfill;
    set_task(2.18, "calculate_custom");
    return PLUGIN_HANDLED;
}

public show_timer() {
    set_task(1.0, "timedis2", 454500, "", 0, "b");
}

public timedis2() {
    new timeleft = get_timeleft();
    if ((timeleft % 5) == 1) {
        new smap[32];
        get_cvar_string("amx_nextmap", smap, 31);
        set_hudmessage(0, 132, 255, 0.02, 0.27, 0, 5.0, 5.04, 0.0, 0.5, 4);
        show_hudmessage(0, "%L", LANG_PLAYER, "DMAP_NEXTMAP", smap);
        if (waited < 90) {
            set_hudmessage(255, 215, 190, 0.02, 0.2, 0, 5.0, 5.04, 0.0, 0.5, 3);
        } else {
            set_hudmessage(210, 0 ,0, 0.02, 0.15, 0, 5.0, 5.04, 0.0, 0.5, 3);
            //Flashing red:set_hudmessage(210, 0 ,0, 0.02, 0.2, 1, 1.0, 1.04, 0.0, 0.05, 3);
        }
        show_hudmessage(0, "%L", LANG_PLAYER, "DMAP_LAST_ROUND");
    }
    return PLUGIN_HANDLED;
}

public timedis3() {
    new timeleft = get_timeleft();
    if ((timeleft % 5) == 1) {
        new smap[32];
        get_cvar_string("amx_nextmap", smap, 31);
        set_hudmessage(0, 132, 255, 0.02, 0.27, 0, 5.0, 5.04, 0.0, 0.5, 4);
        show_hudmessage(0, "%L", LANG_PLAYER, "DMAP_NEXTMAP", smap);
        if (timeleft > 30) {
            set_hudmessage(255, 215, 190, 0.02, 0.2, 0, 5.0, 5.04, 0.0, 0.5, 3);
        } else {
            set_hudmessage(210, 0 ,0, 0.02, 0.15, 0, 5.0, 5.04, 0.0, 0.5, 3);
            //Flashing red:set_hudmessage(210, 0, 0, 0.02, 0.2, 1, 5.0, 5.04, 0.0, 0.5, 3);
        }
        //countdown when "Enforcing timelimit"
        new seconds = timeleft % 60;
        new minutes = floatround((timeleft - seconds) / 60.0);
        show_hudmessage(0, "%L", LANG_PLAYER, "DMAP_TIME_LEFT", minutes, seconds);
    }
    return PLUGIN_HANDLED;
}

public RoundMode() {
    if (get_cvar_float("mp_timelimit") > 0.1 && get_pcvar_num(pEnforceTimelimit)) {
        remove_task(333333);
        remove_task(454500);
        new timeleft = get_timeleft();
        if (timeleft < 200) {
            set_task(float(timeleft) - 5.8, "endofround");
            set_task(1.0, "timedis3", 454500, "", 0, "b");
        }
        return PLUGIN_HANDLED;
    } else {
        if (waited == 0) {
            set_task(1.0, "show_timer");
        }
        if (isbetween || isbuytime || (waited + addthiswait) > 190 || (!bIsCstrike && (waited + addthiswait) >= 30) || activeplayers < 2) {    //Time to switch maps!!!!!!!!
            remove_task(333333);
            remove_task(454500);
            if (isbetween) {
                set_task(3.9, "endofround");
            } else {
                endofround();    //switching very soon!
            }
        } else {
            waited += 5;
            //if (waited >= 15 && waited <= 150 && get_timeleft() < 7) {
            if ((waited + addthiswait) <= 190 && get_timeleft() >= 0 && get_timeleft() <= 15) {
                istimeset2 = 1;
                set_cvar_float("mp_timelimit", get_cvar_float("mp_timelimit") + 2.0);
                if (bIsCstrike) {
                    client_print(0, print_chat, "%L", LANG_PLAYER, "DMAP_FINISHING_CUR_ROUND");
                }
            }
            set_task(5.0, "RoundMode", 333333);
        }
    }
    return PLUGIN_HANDLED;
}

public vote_count(id, key) {
    if (get_cvar_float("amx_vote_answers")) {
        new name[32];
        get_user_name(id, name, 31);
        if (key == maps_to_select) {
            client_print(0, print_chat, "%L", LANG_PLAYER, "DMAP_CHOSE_MAPEXTENDING", name);
        } else if (key < maps_to_select) {
            client_print(0, print_chat, "%L", LANG_PLAYER, "DMAP_CHOSE_MAP", name, nmaps[nnextmaps[key]]);
        }
    }
    nvotes[key] += 1;
    g_TotalVotes += 1;
    g_AlreadyVoted[id] = true;
    show_vote_menu(false);

    return PLUGIN_HANDLED;
}

bool:isinmenu(id) {
    new a;
    for (a = 0; a < nmapstoch; ++a) {
        if (id == nnextmaps[a]) {
            return true;
        }
    }
    return false;
}

public dmapcancelvote(id, level, cid) {
    if (!cmd_access(id, level, cid, 0)) {
        return PLUGIN_HANDLED;
    }
    if (task_exists(765100, 1)) {
        new authid[32], name[32];

        get_user_authid(id, authid, 31);
        get_user_name(id, name, 31);
#if defined DEDICATED_LOG_ENABLED
        log_to_file(logfilename, "ADMIN <%s> cancelled the map vote.", name);
#endif
        client_print(0, print_chat, "%L", LANG_PLAYER, "DMAP_ADMIN_CANCELLED", name);
        remove_task(765100, 1);
        set_hudmessage(222, 70,0, -1.0, 0.3, 1, 10.0, 10.0, 2.0, 4.0, 8);
        show_hudmessage(0, "%L", LANG_PLAYER, "DMAP_ADMIN_CANCELLED", name);
        hasbeenrocked = 0;
        inprogress = 0;
        mselected = true;

        return PLUGIN_CONTINUE;
    } else {
        client_print(id, print_chat, "%L", id, "DMAP_NO_CURRENT_VOTE");
    }
    return PLUGIN_HANDLED;
}

public dmapnominate(id, level, cid) {
    if (!cmd_access(id, level, cid, 2)) {
        return PLUGIN_HANDLED;
    }

    new sArg1[32];
    read_argv(1, sArg1, 31);

    handle_andchange(id, sArg1, true);    // Force nomination

    return PLUGIN_HANDLED;
}

public levelchange() {
    if (istimeset2 == 1) {    //Allow automatic map change to take place.
        set_cvar_float("mp_timelimit", get_cvar_float("mp_timelimit") - 2.0);
        istimeset2 = 0;
    } else {
        if (get_cvar_float("mp_timelimit") >= 4.0) {    //Allow automatic map change to take place.
            if (!istimeset) {
                oldtimelimit = get_cvar_float("mp_timelimit");
            }
            set_cvar_float("mp_timelimit", get_cvar_float("mp_timelimit") - 3);
            istimeset = 1;
        } else {
            if (get_cvar_num("mp_winlimit")) {    //Allow automatic map change based on teamscores
                new largerscore;
                largerscore = (teamscore[0] > teamscore[1]) ? teamscore[0] : teamscore[1];
                iswinlimitset = 1;
                oldwinlimit = get_cvar_num("mp_winlimit");
                set_cvar_num("mp_winlimit", largerscore);
            }
        }
    }
    //If we are unable to achieve automatic level change, FORCE it.
    set_task(2.1, "DelayedChange", 444444);
}

public changeMap() {    //Default event copied from nextmap.amx, and changed around.
    set_cvar_float("mp_chattime", 3.0);    // make sure mp_chattime is long
    remove_task(444444);
    set_task(1.85, "DelayedChange");
}

public DelayedChange() {
    new smap[32];
    get_cvar_string("amx_nextmap", smap, 31);
    server_cmd("changelevel %s", smap);
}

public endofround() {    //Call when ready to switch maps in (?) seconds
    remove_task(123452);
    remove_task(987111);
    remove_task(333333);
    remove_task(454510);
    remove_task(454500);
    remove_task(123499);
    new smap[32];
    get_cvar_string("amx_nextmap", smap, 31);
    set_task(6.0, "levelchange");    //used to be 7.0
    if (quiet != 2) {
        countnum = 0;
        set_task(1.0, "countdown", 123400, "", 0, "a", 6);
        if (quiet != 1) {
            client_cmd(0, "speak ^"loading environment on to your computer^"");
        }
    } else {
        client_print(0, print_chat, "%L", LANG_PLAYER, "DMAP_MAP_ABOUT_CHANGE");
    }
    ///////////////////////////////////////////////
    client_print(0, print_chat, "%L", LANG_PLAYER, "DMAP_NEXTMAP2", smap);
    if ((containi(mapsurl, "www") != -1 || containi(mapsurl, "http") != -1) && iscustommap(smap)) {
        client_print(0, print_chat, "%L", LANG_PLAYER, "DMAP_DOWNLOAD_MAPS_URL2", smap, mapsurl);
    }
    ///////////////////////////////////////////////
    if (dofreeze) {
        isspeedset = 1;
        thespeed = get_cvar_float("sv_maxspeed");
        set_cvar_float("sv_maxspeed", 0.0);
        new players[32], inum, i;
        get_players(players, inum, "c");
        for (i = 0; i < inum; ++i) {
            client_cmd(players[i], "drop");
            client_cmd(players[i], "+showscores");
        }
    }
    if (dofreeze) {
        set_task(1.1, "stopperson", 123450, "", 0, "a", 2);
    }
    return PLUGIN_HANDLED;
}

public countdown() {
    new smap[32];
    get_cvar_string("amx_nextmap", smap, 31);
    countnum++;
    set_hudmessage(150, 120, 0, -1.0, 0.3, 0, 0.5, 1.1, 0.1, 0.1, 4);
    show_hudmessage(0, "%L", LANG_PLAYER, "DMAP_MAP_CHANGING_IN", smap, 7 - countnum);
    return PLUGIN_HANDLED;
}

public stopperson() {
    new players[32], inum, i;
    get_players(players, inum, "c");
    if (isspeedset >= 0 && isspeedset < 2) {
        thespeed = get_cvar_float("sv_maxspeed");
        isspeedset++;
        set_cvar_float("sv_maxspeed", 0.0);
    }
    for (i = 0; i < inum; ++i) {
        client_cmd(players[i], "drop");
    }
    return PLUGIN_HANDLED;
}

public display_message() {
    new timeleft = get_timeleft();
    new parttime = timeleft % (frequency * 60 * 2);    //460//period(minutes/cycle) * 60 seconds/minute = period in seconds
    //if frequency = 2 (every 2 minutes one message will appear) THIS FUNCTION COVERS 2 MESSAGES WHICH MAKES ONE CYCLE
    //parttime=timeleft%240;
    new addition = frequency * 60;
    if (mselected || inprogress || cycle) {
        return PLUGIN_CONTINUE;
    }
    //if (parttime > 310 && parttime < 326 && timeleft > 132)
    if (parttime > (40 + addition) && parttime < (56 + addition) && timeleft > 132) {
        set_task(3.0, "messagenominated", 986100);    //, "", 0, "a", 4)
    } else {
        //if (parttime > 155 && parttime < 171 && timeleft > 132)
        if (parttime > 30 && parttime < 46 && timeleft > 132) {
            set_task(10.0, "messagemaps", 986200, "", 0, "a", 1);
        } else if (timeleft >= 117 && timeleft < 132) {
            messagefifteen();
        }
    }
    return PLUGIN_CONTINUE;
}

// THIS IS UNTESTED, BUT SHOULD WORK
/* 1.6 hudtext function
Arguments:
textblock: a string containing the text to print, not more than 512 chars (a small calc shows that the max number of letters to be displayed is around 270 btw)
colr, colg, colb: color to print text in (RGB format)
posx, posy: position on screen * 1000 (if you want text to be displayed centered, enter -1000 for both, text on top will be posx=-1000 & posy=20
screen: the screen to write to, hl supports max 4 screens at a time, do not use screen+0 to screen+3 for other hudstrings while displaying this one
time: how long the text shoud be displayed (in seconds)
*/

public hudtext16(textblock[] ,colr, colg, colb, posx, posy, screen, time, id) {
    new y;
    if (contain(textblock, "^n") == -1) {    // if there is no linebreak in the text, we can just show it as it is
        set_hudmessage(colr, colg, colb, float(posx) / 1000.0, float(posy) / 1000.0, 0, 6.0, float(time), 0.2, 0.2, screen);
        show_hudmessage(id, textblock);
    } else {    // more than one line
        new out[128], rowcounter = 0, tmp[512], textremain = true;
        y = screen;
        new i = contain(textblock, "^n");
        copy(out, i, textblock);    // we need to get the first line of text before the loop
        do {    // this is the main print loop
            setc(tmp, 511, 0);    // reset string
            copy(tmp, 511, textblock[i + 1]);    // copy everything AFTER the first linebreak (hence the +1, we don't want the linebreak in our new string)
            setc(textblock, 511, 0);    // reset string
            copy(textblock, 511, tmp);    // copy back remaining text
            i = contain(textblock, "^n");    // get next linebreak position
            if ((strlen(out) + i < 64) && (i != -1)) {    // we can add more lines to the outstring if total letter count don't exceed 64 chars (decrease if you have a lot of short lines since the leading linbreaks for following lines also take up one char in the string)
                add(out, 127, "^n");    // add a linebreak before next row
                add(out, strlen(out) + i, textblock);
                rowcounter++;    // we now have one more row in the outstring
            } else {    // no more lines can be added
                set_hudmessage(colr, colg, colb, float(posx) / 1000.0, float(posy) / 1000.0, 0, 6.0, float(time), 0.2, 0.2, screen);    // format our hudmsg
                if ((i == -1) && (strlen(out) + strlen(textblock) < 64)) {
                    add(out, 127, "^n");    // if i == -1 we are on the last line, this line is executed if the last line can be added to the current string (total chars < 64)
                } else {    // not the last line or last line must have it's own screen
                    if (screen-y < 4) {
                        show_hudmessage(id, out);    // we will only print the hudstring if we are under the 4 screen limit
                    }
                    screen++;    // go to next screen after printing this one
                    rowcounter++;    // one more row
                    setc(out, 127, 0);    // reset string
                    for (new j = 0; j < rowcounter; j++) {
                        add(out, 127, "^n");    // add leading linebreaks equal to the number of rows we already printed
                    }
                    if (i == -1) {
                        set_hudmessage(colr, colg, colb, float(posx) / 1000.0, float(posy) / 1000.0, 0, 6.0, float(time), 0.2, 0.2, screen);    // format our hudmsg if we are on the last line
                    } else {
                        add(out, strlen(out) + i, textblock);    // else add the next line to the outstring, before this, out is empty (or have some leading linebreaks)
                    }
                }
                if (i == -1) {    // apparently we are on the last line here
                    add(out, strlen(out) + strlen(textblock), textblock);    // add the last line to out
                    if (screen - y < 4) show_hudmessage(id, out);    // we will only print the hudstring if we are under the 4 screen limit
                    textremain = false;    // we have no more text to print
                }
            }
        } while (textremain);
    }
    return screen - y;    // we will return how many screens of text we printed
}

public messagenominated() {
    if (quiet == 2) {
        return PLUGIN_CONTINUE;
    }

    new string[256], string2[256], string3[512];
    if (nmaps_num < 1) {
        formatex(string3, 511, "%L", LANG_SERVER, "DMAP_NO_MAPS_NOMINATED");
    } else {
        new n = 0, foundone = 0;
        formatex(string, 255, "%L", LANG_SERVER, "DMAP_NOMINATIONS");
        while (n < 3 && n < nmaps_num) {
            formatex(string, 255, "%s   %s", string, nmaps[n++]);
        }
        while (n < 6 && n < nmaps_num) {
            foundone = 1;
            format(string2, 255, "%s   %s", string2, nmaps[n++]);
        }
        if (foundone) {
            formatex(string3, 511, "%s^n%s", string, string2);
        } else {
            formatex(string3, 511, "%s", string);
        }
    }
    hudtext16(string3, random_num(0, 222), random_num(0, 111), random_num(111, 222), -1000, 50, random_num(1, 4), 10, 0);
    return PLUGIN_CONTINUE;
}

public listnominations(id) {
    if (get_pcvar_num(pNominationsAllowed) == 1) {
        new a = 0, string3[512], string1[96], name1[33];
        if (a < nmaps_num) {
            //show_hudmessage(id, "The following maps have been nominated for the next map vote:");
            formatex(string3, 255, "%L", id, "DMAP_NOMINATED_MAPS");
        }
        while (a < nmaps_num) {
            get_user_name(whonmaps_num[a], name1, 32);
            //set_hudmessage(255, 0, 0, 0.12, 0.3 + 0.08 * float(a), 0, 15.0, 15.04, 1.5, 3.75, 2 + a);
            //show_hudmessage(id, "%s by: %s", nmaps[a], name1);
            formatex(string1, 95, "%L", id, "DMAP_MAP_BY", nmaps[a], name1);
            add(string3, 511, string1, 95);
            a++;
        }
        hudtext16(string3, random_num(0, 222), random_num(0, 111), random_num(111, 222), 300, 10, random_num(1, 4), 15, id);
    }
}

public messagemaps() {
    if (quiet == 2) {
        return PLUGIN_CONTINUE;
    }

    new string[256], string2[256], string3[512];
    new n = 0;
    new total = 0;

    if ((totalmaps - 6) > 0) {
        n = random_num(0, totalmaps - 6);
    }
    while (total < 3 && total < totalmaps && is_map_valid(listofmaps[n]) && n < totalmaps) {
        if (!islastmaps(listofmaps[n]) && !isbanned(listofmaps[n]) && !isnominated(listofmaps[n])) {
            format(string, 255, "%s   %s", string, listofmaps[n]);
            total++;
        }
        n++;
    }
    while (total < 6 && n < totalmaps && is_map_valid(listofmaps[n]) && !isnominated(listofmaps[n])) {
        if (!islastmaps(listofmaps[n]) && !isbanned(listofmaps[n])) {
            format(string2, 255, "%s     %s", string2, listofmaps[n]);
            total++;
        }
        n++;
    }
    if (total > 0) {
        //show_hudmessage(0, "The following maps are available to nominate:^n%s", string);
        new temp[256];
        formatex(temp, 255, "%L", LANG_SERVER, "DMAP_AVAILABLE_MAPS");
        add(string3, 511, temp, 100);
        add(string3, 511, string, 100);
        add(string3, 511, "^n");
    }
    if (total > 3) {
        add(string3, 511, string2, 100);
    }

    hudtext16(string3, random_num(0, 222), random_num(0, 111), random_num(111, 222), -1000, 50, random_num(1, 4), 10, 0);
    return PLUGIN_CONTINUE;
}

public messagefifteen() {
    if (quiet == 2) {
        client_print(0, print_chat, "%L", LANG_PLAYER, "DMAP_VOTING_IN_15SEC");
        return PLUGIN_HANDLED;
    }
    set_hudmessage(0, 222, 50, -1.0, 0.23, 1, 6.5, 6.5, 1.0, 3.0, 4);
    show_hudmessage(0, "%L", LANG_PLAYER, "DMAP_VOTING_IN_15SEC");
    if (quiet == 0) {
        client_cmd(0, "spk ^"get red(e80) ninety(s45) to check(e20) use bay(s18) mass(e42) cap(s50)^"");
    }
    set_task(8.7, "getready", 459100);
    return PLUGIN_HANDLED;
}

public getready() {
    if (!cycle) {
        set_task(0.93, "timetovote", 459200, "", 0, "a", 5);
    }
}

public timetovote() {
    counttovote++;
    new speak[5][] = {"one", "two", "three", "four", "five"};

    if (get_timeleft() > 132 || counttovote > 5 || cycle || isbuytime) {
        counttovote = 0;
        remove_task(459200);
        remove_task(459100);
        return PLUGIN_HANDLED;
    } else {
        if (counttovote > 0 && counttovote <= 5) {
            set_hudmessage(0, 222, 50, -1.0, 0.13, 0, 1.0, 0.94, 0.0, 0.0, 4);
            show_hudmessage(0, "%L", LANG_PLAYER, "DMAP_VOTING_IN_XSEC", 6 - counttovote);
            if (quiet != 1) {
                client_cmd(0, "spk ^"fvox/%s^"", speak[5 - counttovote]);
            }
        }
    }
    return PLUGIN_HANDLED;
}

available_maps() {    //return number of maps that havent that have been added yet
    new num = 0, isinlist;
    new current_map[32], a, i;
    get_mapname(current_map, 31);
    for (a = 0; a < num_nmapsfill; a++) {
        if (is_map_valid(nmapsfill[a])) {
            isinlist = 0;
            for (i = 0; i < nmaps_num; i++) {
                if (equali(nmapsfill[a], nmaps[i])) {
                    isinlist = 1;
                }
            }
            if (!isinlist) {
                num++;
            }
        }
    }
    return num;
}

!
Предупреждение:
+25%
Нарушение 4 пункта правил форума.
Тема: Ссылка
Была в: Звуки
Перемещена в: Скриптинг
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
   Цитировать сообщение
Статус пользователя STR@TEG
сообщение 8.3.2012, 20:55
Сообщение #2
Стаж: 16 лет

Сообщений: 4186
Благодарностей: 1763
Полезность: 837

Код
public timetovote() {
    counttovote++;
    new speak[5][] = {"one", "two", "three", "four", "five"};

    if (get_timeleft() > 132 || counttovote > 5 || cycle || isbuytime) {
        counttovote = 0;
        remove_task(459200);
        remove_task(459100);
        return PLUGIN_HANDLED;
    } else {
        if (counttovote > 0 && counttovote <= 5) {
            set_hudmessage(0, 222, 50, -1.0, 0.13, 0, 1.0, 0.94, 0.0, 0.0, 4);
            show_hudmessage(0, "%L", LANG_PLAYER, "DMAP_VOTING_IN_XSEC", 6 - counttovote);
            if (quiet != 1) {
                client_cmd(0, "spk ^"fvox/%s^"", speak[5 - counttovote]);
            }
        }
    }
    return PLUGIN_HANDLED;
}


Connect1507,
Тебе предупреждение за нарушение 4 пункта правил форума.
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
   + Цитировать сообщение
Статус пользователя Connect1507
сообщение 8.3.2012, 21:19
Сообщение #3
Стаж: 14 лет

Сообщений: 172
Благодарностей: 2
Полезность: 22

STR@TEG, блин. Я хотел поменять с музыкой а не исправить что то...... можно 25% убрать?>.< а то уже 50%выходит. Буду знать.
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
   + Цитировать сообщение
  Тема закрытаНачать новую тему
 
0 пользователей и 1 гостей читают эту тему: