busco rtv solo para mapas
#1
hola tengo mix pero siempre se van tonces me gustaria tener plugins que si hay 3 el sv y ponen los 3 rtv en chat haga un vote


si hay 6 si los 7 hacenrtv en chat haga el vote
Responder
#2
(30/05/2019, 05:42 PM)potato02 escribió: hola tengo mix pero siempre se van tonces me gustaria tener plugins que si hay 3 el sv y ponen los 3 rtv en chat haga un vote


si hay 6 si los 7 hacenrtv en chat haga el vote

Toma no entendi muy bien lo que quisites decir entendi fue que quieres un rtv si es a si Usa este solo compilalo y instalalo Si quieres sonido hay tienes la ruta de los sonidos solo crea la carpeta y mete los archivos mp3 si lo quieres con sonido si no no agas nada solo compila y colocalo solo eso es mejor que galileo funciona 100% esta optimizado y es mejor Saludos !

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"}
new const 
szSoundVote[3][] = {"sound/Nombre-Carpeta/g_start.mp3""sound/Nombre-Carpeta/g_end.mp3""sound/Nombre-Carpeta/g_sps.wav"}

/**===========================================================================================
    Duracion del voto
=============================================================================================*/
#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"!teamSiguiente mapa: !g%s"cmd)
}

public 
RoundEnd()
    if(
g_LastRound)
        
set_task(1.0"changelevel");

public 
RockTheVote(id)
{
    if(
g_Vote)
    {
        
ChatColor(id"!teamLa Votacion Ha Comenzado. !g[ *RTV* ]")
        return 
PLUGIN_CONTINUE;
    }
    if(
b_HasRTV[id])
    {
        
ChatColor(id"!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"!teamParacomenzar a votar necesitas !g%d !teamVotos usa. !g*RTV*"iNum-g_iNumRTV)
        
    return 
PLUGIN_HANDLED;
}

public 
plugin_precache()
{
    for(new 
isizeof(szSoundVote); i++)
        
precache_generic(szSoundVote[i])
}

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_dhudmessage(2552550, -1.0, -0.8016.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;
            
client_cmd(0"mp3 play %s"szSoundVote[0])
            
set_cvar_string("amx_nextmap""[Hay Un Voto]");
        }
        default: 
        {
            
get_ending(timerszSec"?")
            
show_dhudmessage(0"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"\yEs el momento de elejir el siguiente 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 !teamYo no participar en la votación."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_dhudmessage149,68,0, -1.0, -0.7024.011.00.011.5 )
    
show_dhudmessage(0"Sigiente mapa: %s^nEl mapa selecionado cambiara al final de la ronda",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;
    
client_cmd(0"mp3 play %s"szSoundVote[1])
    
    return 
PLUGIN_HANDLED;
}

public 
changelevel()
{
    
set_cvar_float("mp_timelimit"0.0);
    
set_dhudmessage(02550, -1.0, -0.40011.06.00.11.5)
    
show_dhudmessage(0"Gracias a todos por votar^nSiguiente mapa ganador sera %s"g_szWinMap)
    
client_cmd(0"+showscores;wait;wait;wait;mp3 stop;stopsound;spk %s"szSoundVote[2])
    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[ ^4VOTO RTV^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();
            }
        }
    }


EDIT (02/05/2020): Cambiado al autor original.
Código PHP:
section .data
    holaMundo
db '$ Te ayudaré siempre y cuando pueda.!! ❤️!'10
    longitud
equ $ - holaMundo
section 
.text 
Responder
#3
@IKARI no se si te enteraste pero la suspensión que te dieron fue por cambiar autor en los plugins. Y creo que no has aprendido.

Así que si 1 mes más.

/cierro NDEAH (?

Saludos. Crab
Responder


Salto de foro:


Usuarios navegando en este tema: 1 invitado(s)