Aller au contenu
News ticker
  • Bienvenue sur le nouveau forum VeryGames
  • Welcome to the new VeryGames forum
  • VeryNews

    Seek Plusieurs Plugins :)


    belgo_espagnol

    Messages recommandés

    BijoOur tout le monde !

     

    voila j'ai créer ma team ya 1 mois et 19 jours ma team marche super bien ya de plus en plus de monde mon serveur touche magnifiquement bien grace à VeryGames !!!! :D

     

    donc voila j'aimeras encore rajoutter qu'elle que plugins ...

     

    1 ) le plugin que quand ont fait 3 cout de cut sur le mur sa lance une invitte

     

    2 ) le plugin que quand ont lance une He, Fumigène, Flash sa fait des couleur !

     

    3 ) le plugin pour qu'ont sache écouter la Radio sur mon serveur !

     

    4 ) le plugin pour que quand sa fait un vote map sa fait maps officiel, map funs, map awp etc .....

     

    Voili Voilou merci à vous tous d'avance ;-)

    Lien vers le commentaire
    Partager sur d’autres sites

    Re :)

     

    1 automatic knife duel : Installer ;-)

    2 grenade trail : j'ai chercher via la fonction recherche je le trouve pas :oops:

    3 hlmp_utf_-8 : j'ai chercher via la fonction recherche je le trouve pas :oops:

    4 mapchooser5 : Installer mes quand sais le moment du votemap sa me met pas les 4 que j'ai demander : Maps Officielles, Maps Fun, Maps awp-scout, Maps aim-fy donc je suppose qu'ont doit metre un truc dans le server.cfg mes je sais pas quoi ???? :oops:

    Lien vers le commentaire
    Partager sur d’autres sites

    Re :)

     

    je viens de ouvrir mon Bloc-notes puis j'ai coller se si

     

    /* On two minutes before the timelimit, plugin

    * displays menu with 4 types of maps to select

    * (Official, Custom, Fun, Training).

    * One of the options is also map extending.

    * If a map type wins the vote, plugin

    * displays menu with 5 random maps to select.

    * Map with most votes becomes the nextmap.

    *

    * Maps to select are in:

    * configs/maps_officielles.ini file

    * configs/maps_awp-scout.ini file

    * configs/maps_fun.ini file

    * configs/maps_aim-fy.ini file

    *

    * Cvars:

    * amx_extendmap_max <time in mins.> - max. time for overall extending

    * amx_extendmap_step <time in mins.> - with what time the map will be extended

    *

    * NOTE: Nextmap plugin is required for proper working of this plugin.

    *

    * Ported to AMX Mod X By NiLuJe

    *

    * $Id$

    *

    */

     

    #include <amxmodx>

    #include <amxmisc>

     

    #pragma semicolon 1

     

    #define MAX_MAPS 500

    #define SELECTMAPS 5

    // SLECTYPES modify this with the number of categorie

    #define SELECTTYPES 5

     

    new g_mapName[MAX_MAPS][32];

    new g_mapNums;

     

    new g_maptypeName[sELECTTYPES][32] = { "Maps Officielles", "Maps Fun", "Maps Awp & Scout", "Maps Aim & Fy" };

     

    // make all you want than categories

    new officielles_file[] = "addons/amxmodx/configs/maps_officielles.ini";

    new fun_file[] = "addons/amxmodx/configs/maps_fun.ini";

    new aim-fy_file[] = "addons/amxmodx/configs/maps_aim-fy.ini";

    new awp-scout_file[] = "addons/amxmodx/configs/maps_awp-scout.ini";

     

    new g_nextName[sELECTMAPS];

    new g_voteCount[sELECTMAPS+2];

    new g_voteCountType[sELECTTYPES+2];

    new g_mapVoteNum;

    new g_teamScore[2];

    new g_lastMap[32];

     

    /* Pcvars */

    new pcvar_ext_max, pcvar_ext_step, pcvar_timelimit, pcvar_vote_answr;

     

    new g_coloredMenus;

    new bool:g_selected = false;

     

    public plugin_init( )

    {

    register_dictionary( "mapchooser5.txt" );

    register_plugin( "Nextmap chooser", "1.0X", "OLO, KRoTaL" );

    register_menucmd( register_menuid( "AMXx Choose nextmap type:" ), ( -1^( -1<<( SELECTTYPES+2 ) ) ), "countVoteType" );

    register_menucmd( register_menuid( "AMXx Choose nextmap:" ), ( -1^(- 1<<( SELECTMAPS+2 ) ) ), "countVote" );

    /* Pcvars */

    pcvar_ext_max = register_cvar( "amx_extendmap_max", "90" );

    pcvar_ext_step = register_cvar( "amx_extendmap_step", "15" );

    pcvar_timelimit = get_cvar_pointer( "mp_timelimit" );

    pcvar_vote_answr = get_cvar_pointer( "amx_vote_answers" );

     

    if ( ( g_coloredMenus = colored_menus() ) != 0 )

    register_event( "TeamScore", "team_score", "a" );

     

    get_localinfo( "lastMap", g_lastMap, 31 );

    set_localinfo( "lastMap", "" );

     

    set_task( 15.0, "voteNextmapType", 987456, "", 0, "b" );

    }

     

    public checkVotesType( )

    {

    new b = 0;

    for( new a = 0; a < 4; ++a )

    if ( g_voteCountType < g_voteCountType[a] )

    b = a;

    if ( g_voteCountType[sELECTTYPES] > g_voteCountType )

    {

    new mapname[32];

    get_mapname( mapname, 31 );

    new Float:steptime = get_pcvar_float( pcvar_ext_step );

    set_pcvar_float( pcvar_timelimit, get_pcvar_float( pcvar_timelimit ) + steptime );

    client_print( 0, print_chat, "%L", LANG_PLAYER, "CHOOSE_END_EXT", steptime );

    log_amx( "Vote: Voting for the nextmap type finished. Map %s will be extended to next %.0f minutes", mapname , steptime );

    return;

    }

    if ( g_voteCountType && g_voteCountType[sELECTTYPES+1] <= g_voteCountType )

    {

    switch( b )

    {

    // make all the case you want than categories

    case 0: voteNextmap( awp_file );

    case 1: voteNextmap( he_file );

    case 2: voteNextmap( aim_file );

    case 3: voteNextmap( fy_file );

    case 4: voteNextmap( officielles_file );

     

    }

    client_print( 0, print_chat, "%L", LANG_PLAYER, "CHOOSE_END_TYPE", g_maptypeName );

    }

    return;

    }

     

    public checkVotes( )

    {

    new b = 0;

    for( new a = 0; a < g_mapVoteNum; ++a )

    if ( g_voteCount < g_voteCount[a] )

    b = a;

    if ( g_voteCount && g_voteCount[sELECTMAPS+1] <= g_voteCount )

    set_cvar_string( "amx_nextmap", g_mapName[g_nextName] );

    new smap[32];

    get_cvar_string( "amx_nextmap", smap, 31 ); // Used one time, no pcvar

    switch( b )

    {

    case 0: client_cmd( 0, "spk ^"vox/level one access granted^"" );

    case 1: client_cmd( 0, "spk ^"vox/level two access granted^"" );

    case 2: client_cmd( 0, "spk ^"vox/level three access granted^"" );

    case 3: client_cmd( 0, "spk ^"vox/level four access granted^"" );

    case 4: client_cmd( 0, "spk ^"vox/level five access granted^"" );

    }

    client_print( 0, print_chat, "%L", LANG_PLAYER, "CHOOSE_END_NEXT", smap );

    log_amx( "Vote: Voting for the nextmap finished. The nextmap will be %s", smap );

    }

     

    public countVoteType( id, key )

    {

    if ( get_pcvar_float( pcvar_vote_answr ) )

    {

    new name[32];

    get_user_name( id, name, 31 );

    if ( key == SELECTTYPES )

    client_print( 0, print_chat, "%L", LANG_PLAYER, "CHOOSED_EXT", name );

    else if ( key < SELECTTYPES )

    client_print( 0, print_chat, "%L", LANG_PLAYER, "CHOOSED", name, g_maptypeName[key] );

    }

    ++g_voteCountType[key];

    return PLUGIN_HANDLED;

    }

     

    public countVote( id, key )

    {

    if ( get_pcvar_float( pcvar_vote_answr ) )

    {

    new name[32];

    get_user_name( id, name, 31 );

    if ( key < SELECTMAPS )

    client_print( 0, print_chat, "%L", LANG_PLAYER, "CHOOSED", name, g_mapName[g_nextName[key]] );

    }

    ++g_voteCount[key];

    return PLUGIN_HANDLED;

    }

     

    bool:isInMenu( id )

    {

    for( new a=0; a<g_mapVoteNum; ++a )

    if ( id == g_nextName[a] )

    return true;

    return false;

    }

     

    public voteNextmapType( )

    {

    /* Checked only one time, no use to use pcvar */

    new winlimit = get_cvar_num( "mp_winlimit" );

    new maxrounds = get_cvar_num( "mp_maxrounds" );

    if ( winlimit )

    {

    new c = winlimit - 2;

    if ( ( c > g_teamScore[0] ) && ( c > g_teamScore[1] ) )

    {

    g_selected = false;

    return;

    }

    }

    else if ( maxrounds )

    {

    if ( ( maxrounds - 2 ) > ( g_teamScore[0] + g_teamScore[1] ) )

    {

    g_selected = false;

    return;

    }

    }

    else

    {

    new timeleft = get_timeleft( );

    if ( timeleft < 1 || timeleft > 129 )

    {

    g_selected = false;

    return;

    }

    }

    if ( g_selected )

    return;

    g_selected = true;

    new menu[512], mapsmenu[512], mkeys, pos;

    new players[32], numplayers;

    g_voteCountType[sELECTTYPES] = 0;

    g_voteCountType[sELECTTYPES+1] = 0;

    new mapname[32];

    get_mapname( mapname, 31 );

     

    // Build the maps entries and the valid keys (same for all players)

    mkeys = ( 1<<SELECTTYPES+1 );

    mapsmenu[0] = 0;

    pos = 0;

     

    for( new i = 0; i < SELECTTYPES; ++i )

    {

    pos += format( mapsmenu[pos], 511, "%d. %s^n", i+1, g_maptypeName );

    mkeys |= ( 1<<i );

    g_voteCount = 0;

    }

     

    mapsmenu[pos++]='^n';

     

    if ( ( winlimit + maxrounds ) == 0 && ( get_pcvar_float( pcvar_timelimit ) < get_pcvar_float( pcvar_ext_max ) ) )

    mkeys |= ( 1<<SELECTTYPES );

     

    // Now build (translated) menu for each player and send it

    get_players( players, numplayers );

    new menu_tr_buf[128], menu_nc_tr_buf[128];

    for( numplayers--; numplayers >= 0; numplayers-- )

    {

    format( menu_tr_buf, 127, "%L", players[numplayers], "CHOOSE_NEXT_TYPE" );

    format( menu_nc_tr_buf, 127, "%L", players[numplayers], "CHOOSE_NC_NEXT_TYPE" );

    pos = copy( menu, 511, g_coloredMenus ? menu_tr_buf : menu_nc_tr_buf );

     

    pos += format( menu[pos], 511, "%s", mapsmenu );

     

    if ( ( winlimit + maxrounds ) == 0 && ( get_pcvar_float( pcvar_timelimit ) < get_pcvar_float( pcvar_ext_max ) ) )

    pos += format( menu[pos], 511, "%L", players[numplayers], "EXTEND_MAP", SELECTTYPES+1, mapname );

     

    format( menu[pos], 511, "%L", players[numplayers], "NUTHIN", SELECTTYPES+2 );

    show_menu( players[numplayers], mkeys, menu, 15, "AMXx Choose nextmap type:" );

    }

     

    set_task( 15.0, "checkVotesType" );

    client_print( 0, print_chat, "%L", LANG_PLAYER, "TIME_TO_CHOOSE_TYPE" );

    client_cmd( 0, "spk Gman/Gman_Choose2" );

    log_amx( "Vote: Voting for the nextmap type started" );

    }

     

    public voteNextmap( filename[] )

    {

    loadSettings( filename );

     

    new menu[512], mapsmenu[512], a, mkeys, pos;

    new dmax = ( g_mapNums > SELECTMAPS ) ? SELECTMAPS : g_mapNums;

    new players[32], numplayers;

    g_voteCount[sELECTMAPS] = 0;

    g_voteCount[sELECTMAPS+1] = 0;

    new mapname[32];

    get_mapname( mapname, 31 );

     

    // Build the maps entries and the valid keys (same for all players)

    mkeys = ( 1<<SELECTMAPS+1 );

    mapsmenu[0] = 0;

    pos = 0;

    for( g_mapVoteNum = 0; g_mapVoteNum < dmax; ++g_mapVoteNum )

    {

    a=random_num( 0, g_mapNums - 1 );

    while( isInMenu( a ) )

    if ( ++a >= g_mapNums )

    a = 0;

    g_nextName[g_mapVoteNum] = a;

    pos += format( mapsmenu[pos], 511, "%d. %s^n", g_mapVoteNum+1, g_mapName[a] );

    mkeys |= ( 1<<g_mapVoteNum );

    g_voteCount[g_mapVoteNum] = 0;

    }

    mapsmenu[pos++]='^n';

     

    // Now build (translated) menu for each player and send it

    get_players( players, numplayers );

    new menu_tr_buf[128], menu_nc_tr_buf[128];

    for( numplayers--; numplayers >= 0; numplayers-- )

    {

    format( menu_tr_buf, 127, "%L", players[numplayers], "CHOOSE_NEXT" );

    format( menu_nc_tr_buf, 127, "%L", players[numplayers], "CHOOSE_NC_NEXT" );

     

    pos = copy( menu, 511, g_coloredMenus ? menu_tr_buf : menu_nc_tr_buf );

     

    pos += format( menu[pos], 511, "%s", mapsmenu );

     

    format( menu[pos], 511, "%L", players[numplayers], "NUTHIN", SELECTMAPS+2 );

    show_menu( players[numplayers], mkeys, menu, 15, "AMXx Choose nextmap:" );

    }

     

    set_task( 15.0, "checkVotes" );

    client_print( 0, print_chat, "%L", LANG_PLAYER, "TIME_TO_CHOOSE_NEXT" );

    client_cmd( 0, "spk Gman/Gman_Choose2" );

    log_amx( "Vote: Voting for the nextmap started" );

    }

     

    loadSettings( filename[] )

    {

    if ( ! file_exists( filename ) )

    return 0;

     

    g_mapNums = 0;

    new szText[32];

    new a, pos = 0;

    new currentMap[32];

    get_mapname( currentMap, 31 );

     

    while ( ( g_mapNums < MAX_MAPS ) && read_file( filename, pos++, szText, 31, a ) )

    {

    if ( szText[0] != ';'

    && parse( szText, g_mapName[g_mapNums] ,31 )

    && is_map_valid( g_mapName[g_mapNums] )

    && ! equali( g_mapName[g_mapNums], g_lastMap )

    && ! equali( g_mapName[g_mapNums], currentMap ) )

    ++g_mapNums;

    }

     

    return g_mapNums;

    }

     

    public team_score( )

    {

    new team[2];

    read_data( 1, team, 1 );

    g_teamScore[ ( team[0] == 'C' ) ? 0 : 1 ] = read_data( 2 );

    }

     

    public plugin_end( )

    {

    new current_map[32];

    get_mapname( current_map, 31 );

    set_localinfo( "lastMap", current_map );

    }

     

    puis j'ai enregistrer sur mon bureau sur le nom de mapchooser5.sma puis je l'ai mis dans mon ftp dans /servers/server932/games/halflife/cstrike/addons/amxmodx/scripting

     

    est ce bon cette manipulation ou pas ? :mrgreen:

    Lien vers le commentaire
    Partager sur d’autres sites

    // make all the case you want than categories

    case 0: voteNextmap( awp_file );

    case 1: voteNextmap( he_file );

    case 2: voteNextmap( aim_file );

    case 3: voteNextmap( fy_file );

    case 4: voteNextmap( officielles_file );

     

    ici aussi il faut que tu change ^^

     

    ensuite il faut que tu recompille le plugin

    http://www.amxmodx.org/webcompiler.cgi

     

    pour obtenir le .amxx que tu mets dans le dossier "plugin" et que tu déclare dans le plugin.ini

     

    le dossier "scripting" ne sert a rien c'est juste pour avoir les sources des plugins en sauvegarde sur ton serveur

    Lien vers le commentaire
    Partager sur d’autres sites

    • 2 weeks later...

    Rejoindre la conversation

    Vous pouvez publier maintenant et vous inscrire plus tard. Si vous avez un compte, connectez-vous maintenant pour publier avec votre compte.

    Invité
    Répondre à ce sujet…

    ×   Collé en tant que texte enrichi.   Coller en tant que texte brut à la place

      Seulement 75 émoticônes maximum sont autorisées.

    ×   Votre lien a été automatiquement intégré.   Afficher plutôt comme un lien

    ×   Votre contenu précédent a été rétabli.   Vider l’éditeur

    ×   Vous ne pouvez pas directement coller des images. Envoyez-les depuis votre ordinateur ou insérez-les depuis une URL.

    ×
    ×
    • Créer...