Busco Plugin RTV Para CTF
#1
Corazón 
Como el titulo lo dice necesito el RTV para CTF, Es que algunos RTV Cambian de map es cuando se termine la ronda y pues en CTF nunca se terminan la ronda y pues nose cual rtv me recomiendan para ponerlo :/ Tranks..

____________________________________________________
Aprendiendo sobre Scripting y Mapper Mario
SI NO VAS AYUDAR, POR FAVOR NO COMENTARLovepanda
Responder
#2
galileo y gal_endonround 0
Responder
#3
confio mas en este que en el galileo

deagsmapmanager v3.23
[Imagen: 76561197965283388.png]
Responder
#4
(05/08/2019, 04:45 PM)Nelo escribió: galileo y gal_endonround 0
Este es el que quiero usar como le hago para que se cambie de map, al llegar al punto final del timeleft, porque dice es que se cambiara cuando acabe la ronda y como dije son rondas infinitas Roflmao

Código PHP:
#include <amxmodx>
#include <dhudmessage>
#include <fakemeta>

/**===========================================================================================
    ?????????
=============================================================================================*/
new g_szMaps[5][64];
new 
g_Votes[5];
new 
g_iTimerVote[33];
new 
g_szWinMap[64];
new 
g_iNumRTV;
new 
g_iPlayerProcc;
new 
bool:g_LastRound;
new 
b_HasRTV[33];
new 
Float:g_iLastSec[33];
new 
bool:g_Vote;
new 
bool:b_HasAlreadyVoted[33];
new 
iAllVoted;

new const 
szSoundTimer[6][] = {"","fvox/one","fvox/two","fvox/three","fvox/four","fvox/five"}

/**===========================================================================================
    ???????
=============================================================================================*/
#define TimeVote 30 // ¿Cuánto durará la votación?

/**===========================================================================================
    ?????????????
=============================================================================================*/
public plugin_init()
{
    
register_plugin("MapManager""1.0""BlackSmoke");
    
    
register_clcmd("say rtv""RockTheVote")
    
register_clcmd("say /rockthevote""RockTheVote")
    
register_clcmd("say rtv""RockTheVote")
    
register_clcmd("say rockthevote""RockTheVote")
    
    
register_clcmd("say nextmap""Show_Nextmap")
    
register_clcmd("say /nextmap""Show_Nextmap")
    
    
register_menucmd(register_menuid("VoteMenu"), 1023"ActionVoteMenu");
    
    
register_logevent("RoundEnd"2"1=Round_End")
    
    
set_task(121.0"ClCmdVote"___"d")
    
    
register_cvar("amx_nextmap""[No definido]");
    
set_cvar_string("amx_nextmap""[No definido]");
    
    
LoadMapsInVote();
}

/**===========================================================================================
    ?????????? ????????? ?????.
=============================================================================================*/
public Show_Nextmap(id)
{
    new 
cmd[127];
    
get_cvar_string("amx_nextmap"cmd126)
    
ChatColor(0"!g[OFF] !teamSiguiente mapa: !g%s"cmd)
}

/**===========================================================================================
    ????? ??????
=============================================================================================*/
public RoundEnd()
    if(
g_LastRound)
        
set_task(1.0"changelevel");

/**===========================================================================================
    ????????? ????? ?????
=============================================================================================*/
public RockTheVote(id)
{
    if(
g_Vote)
    {
        
ChatColor(id"!g[OFF] !teamLa Votacion Ha Comenzado. !g*RTV*")
        return 
PLUGIN_CONTINUE;
    }
    if(
b_HasRTV[id])
    {
        
ChatColor(id"!g[OFF] !teamYa Ha Votado. !g*RTV*")
        return 
PLUGIN_CONTINUE;
    }
    new 
iNumszPlayers[32];
    
get_players(szPlayersiNum"hc")
    
g_iNumRTV++;
    
b_HasRTV[id] = true;
    if(
g_iNumRTV == iNum)
    {
        
ChatColor(0"!teamTodo Los Jugadores !g(%d) !teamQuieren Hacer Un Cambio De Mapa!. !g*RTV*"g_iNumRTV)
        
set_task(5.0"ClCmdVote");
    }
    else
        
ChatColor(0"!teamPara comenzar a votar necesitas !g%d !teamVotos"iNum-g_iNumRTV)
        
    return 
PLUGIN_HANDLED;
}

/**===========================================================================================
    ?????? ????? ??? ???????????
=============================================================================================*/
public LoadMapsInVote()
{
    new 
szFileName[64], LeniNumRandomMapqiRepeatszMapName[32], szDirMaps[127];
    
get_mapname(szMapName31);
    
format(szFileName63"addons/amxmodx/configs/maps.ini")
    
random_num(0file_size(szFileName1)-1)
    
    while(
read_file(szFileName,g_szMaps[iNumRandomMap], 63Len))
    {        
        
random_num(0file_size(szFileName1)-1)
        
        if(
iRepeat == q)
            continue;
        
        
iRepeat q;
        
        if(
g_szMaps[iNumRandomMap][0] == ';' || Len == 0)
            continue
    
        
format(szDirMaps126"maps/%s.bsp"g_szMaps[iNumRandomMap]);
        if(!
equali(szMapNameg_szMaps[iNumRandomMap]) && file_exists(szDirMaps))
            
iNumRandomMap++
    
        if(
iNumRandomMap 4)
            break;
    }
}

/**===========================================================================================
    ???????? ?????? ?? ???????????
=============================================================================================*/
public ClCmdVote()
    
set_task(1.0"ValueVote"___"a"6);

/**===========================================================================================
    ?????? ?? ???????????
=============================================================================================*/
public ValueVote()
{
    new 
szSec[32];
    
set_hudmessage(random_num(1255), random_num(1255), random_num(1255), -1.0, -0.8026.00.0010.11.5 )
    static 
timer 6
    timer
--
    switch(
timer)
    {
        case 
0
        {
            
g_Vote true;
            
startvote()
            
arrayset(g_Votes0sizeof(g_Votes));
            
arrayset(g_iTimerVoteTimeVote-1033);
            
arrayset(b_HasAlreadyVotedfalse33);
            
set_task(float(TimeVote), "endvote");
            
timer 6;
            
set_cvar_string("amx_nextmap""[Hay Un Voto]");
        }
        default: 
        {
            
get_ending(timerszSec"?")
            
show_dhudmessage(0"[OFF] La votacion comenzara en %d %s"timerszSec)
            
client_cmd(0"spk %s"szSoundTimer[timer])
        }
    }
}

/**===========================================================================================
    ???????????
=============================================================================================*/
public startvote()
{
    if(!
g_Vote)
        return 
PLUGIN_CONTINUE;
        
    new 
szPlayers[32], iNum;
    
get_players(szPlayersiNum);
    
iAllVoted 0;
    
    for(new 
iiNumi++)
        
ChooseMap(szPlayers[i])
    
    return 
PLUGIN_HANDLED;
}

/**===========================================================================================
    ???? ?????? ????.
=============================================================================================*/
public ChooseMap(id)
{
    if(!
g_Vote)
        return 
PLUGIN_CONTINUE;
    
    new 
szMenu[512], iLeniKeyszSec[32]
    
get_ending(g_iTimerVote[id], szSec"?");
    
iLen format(szMenu[iLen], charsmax(szMenu)-iLen"\y[OFFCommnunity] Es Hora de Elejir El Siguienet Mapa^n\dy Usted \r%d \ds, pensar^n"
g_iTimerVote[id], szSec)
    for(new 
q5q++)
    {
        if(!
b_HasAlreadyVoted[id])
            
iLen += format(szMenu[iLen], charsmax(szMenu)-iLen"^n\r%d. \w%s \d[\y%d%%\d]",q+1g_szMaps[q], g_Votes[q] * g_iPlayerProcc
        else
            
iLen += format(szMenu[iLen], charsmax(szMenu)-iLen"^n\d%s [\y%d%%\d]"g_szMaps[q], g_Votes[q] * g_iPlayerProcc
    }
    
    if(!
b_HasAlreadyVoted[id])
    {
        
iKey |= MENU_KEY_0;
        
iLen += format(szMenu[iLen], charsmax(szMenu)-iLen"^n^n\r0. \wNada")
    }
    
    
iLen += format(szMenu[iLen], charsmax(szMenu)-iLen"^n^n\yVotado: \r%d \dPersonas"iAllVoted
    
    
iKey |= MENU_KEY_0|MENU_KEY_1|MENU_KEY_2|MENU_KEY_3|MENU_KEY_4|MENU_KEY_5
    
    
if(b_HasAlreadyVoted[id])
        
iKey &= ~(MENU_KEY_1|MENU_KEY_2|MENU_KEY_3|MENU_KEY_4|MENU_KEY_5);
    
    
show_menu(idiKeyszMenu, -1"VoteMenu");
    return 
PLUGIN_HANDLED;
}

/**===========================================================================================
    ????? ????????
=============================================================================================*/
public ActionVoteMenu(idiKey)
{
    if(!
g_Vote)
        return 
PLUGIN_CONTINUE;
        
    new 
szName[32]
    
get_user_name(idszName31)
    
    if(
iKey == 9)
    {
        if(!
b_HasAlreadyVoted[id])
            
ChatColor(0"!g%s !teamNo participar en la votacion de mapa."szName);
        
b_HasAlreadyVoted[id] = true
        
return PLUGIN_CONTINUE;
    }
    
    
iAllVoted++;
    
    
g_Votes[iKey]++, b_HasAlreadyVoted[id] = true;
    
ChatColor(0"!g%s !teamElijio !g%s"szNameg_szMaps[iKey]);
    
    return 
PLUGIN_HANDLED;
}

/**===========================================================================================
    ????? ???????????
=============================================================================================*/
public endvote()
{
    
g_Vote false;
    new 
win 0szDirFile[127];
    for(new 
isizeof(g_Votes); i++)
    {        
        if(
win g_Votes[i])
        {
            
win i
            format
(g_szWinMap63g_szMaps[win])
        }
    }

    if(
win g_Votes[0])
    {
        
win 0;
        
format(g_szWinMap63g_szMaps[win]);
    }
    
    if(!
g_szWinMap[0])
    {
        
LoadMapsInVote();
        
set_task(5.0"ClCmdVote");
        
ChatColor(0"!teamposponer votación.")
        return 
PLUGIN_CONTINUE;
    }
    
format(szDirFile126"maps/%s.bsp"g_szWinMap);
    if(!
file_exists(szDirFile))
    {
        
LoadMapsInVote();
        
set_task(5.0"ClCmdVote");
        
ChatColor(0"!teamVoto pospuesta debido a la falta de tarjeta.")
        return 
PLUGIN_CONTINUE;
    }
    
set_hudmessage(random_num(1255), random_num(1255), random_num(1255), -1.0, -0.7024.011.00.011.5 )
    
show_dhudmessage(0"Siguiente mapa: %s^nEl mas elejido por los jugadores.",g_szWinMapwin)
    
ChatColor(0"!teamSiguiente mapa: !g%s"g_szWinMap)
    
set_cvar_string("amx_nextmap"g_szWinMap);
    
set_cvar_float("mp_timelimit"0.0)
    
g_LastRound true;
    
    return 
PLUGIN_HANDLED;
}

/**===========================================================================================
    ?????? ?????.
=============================================================================================*/
public changelevel()
{
    
set_cvar_float("mp_timelimit"0.0);
    
set_hudmessage(random_num(1255), random_num(1255), random_num(1255), -1.0, -0.40211.06.00.11.5 )
    
show_dhudmessage(0"Gracias a todos por votar^nSiguiente mapa ganador sera %s"g_szWinMap)
    new 
iNumszPlayers[32];
    
get_players(szPlayersiNum)
    for(new 
iiNumi++)
    {
        
client_cmd(szPlayers[i], "drop;wait;wait;wait;wait;wait;drop;wait;wait;wait;wait;wait;drop");
        
set_pev(szPlayers[i], pev_flagspev(szPlayers[i], pev_flags) | FL_FROZEN)
    }
    
set_task(4.0"changelevel1")
}

/**===========================================================================================
    ?????? ?????
=============================================================================================*/
public changelevel1()
{
    
server_cmd("changelevel %s"g_szWinMap);
}

/**===========================================================================================
    ????
=============================================================================================*/
public client_PreThink(id)
{
    if(!
g_Vote)
        return;
        
    if(
g_iTimerVote[id] <= -1)
        return;
    
    if(
iAllVoted)
        
g_iPlayerProcc 100 iAllVoted;
    else
        
g_iPlayerProcc 0;
    
    if((
get_gametime() - g_iLastSec[id]) >= 1.0)
        if(
g_iTimerVote[id] != 0)
            
g_iTimerVote[id]--, ChooseMap(id), g_iLastSec[id] = get_gametime();
        else
            
show_menu(id0"^n"), g_iTimerVote[id] = -1;
}

/**================================================================================
    ????????? ????????? ??????
=================================================================================*/
stock get_ending(numoutput[32], const l[])
{
    new 
num100=num%100num10=num%10;
    if(
num100>=5&&num100<=20||num10==0||num10>=5&&num10<=9format(output31"Segundos");
    else if(
num10==1format(output31"Segundos%s"l);
    else if(
num10>=2&&num10<=4format(output31"Segundos");
}

/**================================================================================
    ??????? ???
===================================================================================*/
stock ChatColor(const id, const input[], any:...)
{
    new 
count 1players[32]
    static 
msg[191]
    
vformat(msg190input3)
    
format(msgsizeof(msg), "^1[^4Residents Of Warriors^1] %s"msg)
    
replace_all(msg190"!g""^4"// Green Color
    
replace_all(msg190"!y""^1"// Default Color
    
replace_all(msg190"!team""^3"// Team Color
    
    
if (idplayers[0] = id; else get_players(playerscount"ch")
    {
        for (new 
0counti++)
        {
            if (
is_user_connected(players[i]))
            {
                
message_begin(MSG_ONE_UNRELIABLEget_user_msgid("SayText"), _players[i])
                
write_byte(players[i]);
                
write_string(msg); 
                
message_end();
            }
        }
    }

SI NO VAS AYUDAR, POR FAVOR NO COMENTARLovepanda
Responder
#5
ya te dije, galileo y gal_endonround 0 en galileo.cfg y se cambia al llegar al tiempo a 0
Responder
#6
(06/08/2019, 06:21 PM)Nelo escribió: ya te dije, galileo y gal_endonround 0 en galileo.cfg y se cambia al llegar al tiempo a 0
Te dije que quiero el que subi en este tema no quiero galileo.

PD: El rtv que subi en este tema no trae cfg ni nada solo es ese sma y ya! Me ayudas que debo hacer? para que se cambie porque dice que a la siguiente ronda y pues ya sabes como es el beta es CTF y pues weno pacman
SI NO VAS AYUDAR, POR FAVOR NO COMENTARLovepanda
Responder


Salto de foro:


Usuarios navegando en este tema: 1 invitado(s)