Cerere plugin

Categoria cu cereri de pluginuri si nu numai.

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Forum rules
Accesează link-ul pentru a putea vedea regulile forumului

Daca doriti sa vi se modifice un plugin, va rugam postati aici .
Post Reply
User avatar
cEsZaR.JnT
Membru, skill 0
Membru, skill 0
Posts: 34
Joined: 24 Oct 2009, 22:36
Detinator Steam: Nu
CS Status: Brasov.GamesZone.Ro
Detinator server CS: Brasov.GamesZone.Ro
Has thanked: 7 times
Contact:

24 Aug 2010, 18:18

Am vazut pe un server un plugin destul de frumusel si mi-a placut
L-am cautat peste tot dar nu-l gasesc ma poate ajuta cineva ?

Cand se termina runda se aud niste sunete : "Tero conduce cu 1 la 0"

sau "Counter conduce cu 23 la 10"

Dau 1 multumesc! Ms
RoyalServer 2
Reptile
Membru, skill +1
Membru, skill +1
Posts: 245
Joined: 12 Nov 2008, 14:11
Detinator Steam: Nu
Reputatie: Fost manager
Been thanked: 23 times

24 Aug 2010, 18:30

User avatar
cEsZaR.JnT
Membru, skill 0
Membru, skill 0
Posts: 34
Joined: 24 Oct 2009, 22:36
Detinator Steam: Nu
CS Status: Brasov.GamesZone.Ro
Detinator server CS: Brasov.GamesZone.Ro
Has thanked: 7 times
Contact:

24 Aug 2010, 18:48

Stiu ca este. Scuzama de dublu posting
Reptile
Membru, skill +1
Membru, skill +1
Posts: 245
Joined: 12 Nov 2008, 14:11
Detinator Steam: Nu
Reputatie: Fost manager
Been thanked: 23 times

24 Aug 2010, 19:27

Zi-mi sunetele, sub ce forma le ai.
User avatar
cEsZaR.JnT
Membru, skill 0
Membru, skill 0
Posts: 34
Joined: 24 Oct 2009, 22:36
Detinator Steam: Nu
CS Status: Brasov.GamesZone.Ro
Detinator server CS: Brasov.GamesZone.Ro
Has thanked: 7 times
Contact:

24 Aug 2010, 19:39

counterconduce.wav
teroconduce.wav
cu.wav
la.wav
si one.wav pana la fiftyseven.wav
User avatar
cEsZaR.JnT
Membru, skill 0
Membru, skill 0
Posts: 34
Joined: 24 Oct 2009, 22:36
Detinator Steam: Nu
CS Status: Brasov.GamesZone.Ro
Detinator server CS: Brasov.GamesZone.Ro
Has thanked: 7 times
Contact:

24 Aug 2010, 19:40

Ma poti ajuta ? :D Sti despre ce este vorba ? :D
Reptile
Membru, skill +1
Membru, skill +1
Posts: 245
Joined: 12 Nov 2008, 14:11
Detinator Steam: Nu
Reputatie: Fost manager
Been thanked: 23 times

24 Aug 2010, 19:41

Sa stii ca nu dorm in topicul asta.
User avatar
cEsZaR.JnT
Membru, skill 0
Membru, skill 0
Posts: 34
Joined: 24 Oct 2009, 22:36
Detinator Steam: Nu
CS Status: Brasov.GamesZone.Ro
Detinator server CS: Brasov.GamesZone.Ro
Has thanked: 7 times
Contact:

24 Aug 2010, 19:42

zi-mi un raspuns mai pe inteles.Imi poti da tu sma-ul da sau nu ?
User avatar
cEsZaR.JnT
Membru, skill 0
Membru, skill 0
Posts: 34
Joined: 24 Oct 2009, 22:36
Detinator Steam: Nu
CS Status: Brasov.GamesZone.Ro
Detinator server CS: Brasov.GamesZone.Ro
Has thanked: 7 times
Contact:

25 Aug 2010, 13:01

Am facut eu rost de sma.Dar imi da niste erori.
Am facut prea greu rost de sma,si nu-l pot posta pe forum, cine ma poate ajuta sa-mi de-a add pe messenger office_joinet
Multumesc
User avatar
Ciprian
Fost administrator
Fost administrator
Posts: 5172
Joined: 10 May 2008, 21:29
Detinator Steam: Da
CS Status: ^^
SteamID: crazycipry
Reputatie: Fost administrator
Fost Scripter eXtreamCS
Fost Supervizor CS.eXtreamCS.com
Fost Unbanner ZM.eXtreamCS.com
Fost Contribuitor
Nume anterior: crazy.cipry
Location: Baia Mare
Has thanked: 177 times
Been thanked: 405 times

02 Sep 2010, 14:23

Tine-te bine :))
| Afiseaza codul
[code=php]/* Plugin generated by AMXX-Studio */

#include < amxmodx >

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "Ciprian"

#define TEAM_WIN_SOUNDS         4 
#define MAX_NUMBER_SOUNDS_LENGHT     24  

//
// 

#define DURATION_BETWEEN_SOUNDS     0.5 // Durata dintre 2 sunete ( in secunde )
#define SOUNDS_TASK_BEGIN_TIME        0.1 // La cat timp ( in secunde ) dupa terminarea rundei sa inceapa sunetele
#define SOUNDS_NUMBER             57  // Numarul sunetelor

new g_SoundsDir[ ] = "sunete";
//new g_TeamWinSounds[ 2 ][ TEAM_WIN_SOUNDS ][ MAX_NUMBER_SOUNDS_LENGHT ];

new g_TeamWinSounds[ TEAM_WIN_SOUNDS ][ MAX_NUMBER_SOUNDS_LENGHT ] =         { "counterconduce.wav", "teroconduce.wav", "cu.wav",      "la.wav" }
new g_TeamWinSoundsDuration[ TEAM_WIN_SOUNDS ][ MAX_NUMBER_SOUNDS_LENGHT ] =     { "2.0",         "2.0",            "0.5",         "0.5" }

//
//

new g_NumberSounds[ 2 ][ 57 ][ MAX_NUMBER_SOUNDS_LENGHT ];
new g_TeamWins[ 2 ] // 0 for Terrorists, 1 for Counter-Terorrists

public plugin_init ( ) {
    register_plugin ( PLUGIN, VERSION, AUTHOR );
    
    register_event ( "SendAudio","event_terr_win","a","2=%!MRAD_terwin" );
    register_event ( "SendAudio","event_ct_win","a","2=%!MRAD_ctwin" );
    register_event ( "SendAudio","event_round_end","a","2=%!MRAD_terwin","2=%!MRAD_ctwin","2=%!MRAD_rounddraw" );
    register_event ( "TextMsg", "event_game_commencing", "a", "2&#Game_C", "2&#Game_w" );
}

public plugin_precache ( ) {
    new s_ConfigsDir[ 64 ], s_File[ 64 ];
    get_localinfo ( "amxx_configsdir", s_ConfigsDir, charsmax ( s_ConfigsDir ) );
    formatex ( s_File, charsmax ( s_File ), "%s/%s.ini", s_ConfigsDir, g_SoundsDir );
    
    if ( ! file_exists ( s_File ) ) {
        write_file ( s_File, "", -1 );
        return PLUGIN_CONTINUE;
    }
    
    new fp = fopen ( s_File, "rt" ), Buffer[ 128 ], i = 0;
    
    while ( ! feof ( fp ) ) {
        fgets ( fp, Buffer, charsmax ( Buffer ) );
        
        if ( ! Buffer[ 0 ] || Buffer[ 0 ] == ';' || strlen ( Buffer ) < 3 )
            continue;
        
        trim ( Buffer );
        strtok ( Buffer, g_NumberSounds[ 0 ][ i ], 15, g_NumberSounds[ 1 ][ i ], 15, ';', 0 );
        
        i ++;
    }
    for ( i = 0; i <= SOUNDS_NUMBER; i ++ ) {
        new s_Sound[ 24 ];
        formatex ( s_Sound, charsmax ( s_Sound ), "%s/%s", g_SoundsDir, g_TeamWinSounds[ i ] );
        
        precache_sound ( s_Sound );
    }
    
    for ( i = 0; i <= SOUNDS_NUMBER; i ++ ) {
        new s_Sound[ 24 ];
        formatex ( s_Sound, charsmax ( s_Sound ), "%s/%s", g_SoundsDir, g_NumberSounds[ 0 ][ i ] );
        
        precache_sound ( s_Sound );
    }
    
    return PLUGIN_CONTINUE;
}

public event_terr_win ( ) g_TeamWins[ 0 ] ++;

public event_ct_win ( ) g_TeamWins[ 1 ] ++;

public event_game_commencing ( ) {
    g_TeamWins[ 0 ] = 0;
    g_TeamWins[ 1 ] = 0;
}

public event_round_end ( ) {
    set_task ( SOUNDS_TASK_BEGIN_TIME, "task_play_sound_conduce" );
    
    return PLUGIN_CONTINUE;
}

public task_play_sound_conduce ( ) {
    client_cmd ( 0, "spk %s/%s", g_SoundsDir, g_TeamWins[ 0 ] > g_TeamWins[ 1 ] ? g_TeamWinSounds[ 0 ] : g_TeamWinSounds[ 1 ] );
    
    new i_Pause;
    g_TeamWins[ 0 ] > g_TeamWins[ 1 ] ? ( i_Pause = str_to_num ( g_TeamWinSoundsDuration[ 0 ] ) ) : ( i_Pause = str_to_num ( g_TeamWinSoundsDuration[ 1 ] ) )
    
    set_task ( float ( i_Pause ) + DURATION_BETWEEN_SOUNDS, "task_play_sound_with" );
}

public task_play_sound_with ( ) {
    client_cmd ( 0, "spk %s/%s", g_SoundsDir, g_TeamWinSounds[ 2 ] );
    
    set_task ( float ( str_to_num ( g_TeamWinSoundsDuration[ 2 ] ) ) + DURATION_BETWEEN_SOUNDS, "task_play_sound_number1" );
}

public task_play_sound_number1 ( ) {
    new Buffer [ MAX_NUMBER_SOUNDS_LENGHT ], i;
    
    if ( g_TeamWins[ 0 ] > g_TeamWins[ 1 ] ) {
        num_to_word ( g_TeamWins[ 0 ], Buffer, charsmax ( Buffer ) );
        i = 0;
    }
    else {
        num_to_word ( g_TeamWins[ 1 ], Buffer, charsmax ( Buffer ) );
        i = 1;
    }
    
    client_cmd ( 0, "spk %s/%s.wav", g_SoundsDir, Buffer );
    
    set_task ( float ( str_to_num ( g_NumberSounds[ 1 ][ i ] ) ) + DURATION_BETWEEN_SOUNDS, "task_play_sound_to" );
}

public task_play_sound_to ( ) {
    client_cmd ( 0, "spk %s/%s", g_SoundsDir, g_TeamWinSounds[ 3 ] );
    
    set_task ( float ( str_to_num ( g_TeamWinSoundsDuration[ 3 ] ) ) + DURATION_BETWEEN_SOUNDS, "task_play_sound_number2" );
}

public task_play_sound_number2 ( ) {
    new Buffer [ MAX_NUMBER_SOUNDS_LENGHT ];
    
    if ( g_TeamWins[ 0 ] > g_TeamWins[ 1 ] ) 
        num_to_word ( g_TeamWins[ 1 ], Buffer, charsmax ( Buffer ) );
    else 
        num_to_word ( g_TeamWins[ 0 ], Buffer, charsmax ( Buffer ) );
    
    client_cmd ( 0, "spk %s/%s.wav", g_SoundsDir, Buffer );
}
 [/code]
Ce trebuie sa faci tu?
  • 1) Creezi un folder numit sunete in cstrike/sound si pui in el toate sunetele.
  • 2) Creezi un fisier numit sunete.ini in amxmodx/configs. In el treci toate sunetele, fiecare pe cate o linie separata; dupa numele sunetului ( ! cu tot cu extensie ) pui ; urmata de durata exacta sunetului respectiv.
    • Deci sa luam de ex. sunetele one.wav ( cu durata de 0.5 s ) si two.wav ( cu durata de 0.6 s ). In fisier vei trece asa:

      Code: Select all

      one.wav;0.5
      two.wav;0.6
      ...
      ...
      ...
      fiftyseven.wav;1.2
  • 3)Deschizi sma-ul de mai sus si modifici urmatoarele linii
    .sma wrote: new g_TeamWinSounds[ TEAM_WIN_SOUNDS ][ MAX_NUMBER_SOUNDS_LENGHT ] = { "counterconduce.wav", "teroconduce.wav", "cu.wav", "la.wav" }
    new g_TeamWinSoundsDuration[ TEAM_WIN_SOUNDS ][ MAX_NUMBER_SOUNDS_LENGHT ] = { "2.0", "2.0", "0.5", "0.5" }
    Sub fiecare sunet pui durata exacta a acestuia, valorile puse de mine sunt luate arbitrar. ( ! Doar ce e cu rosu modifici )
  • 4) Incerci pluginul, si daca merge ( :)) ma cam indoiesc ) si ti se pare ca durata dintre 2 sunete e prea mare ( ex.: durata dintre counterconduce.wav si numar_cu_cat_conduce_ct e prea mari, deschizi sma si modifici linia
    .sma wrote:#define DURATION_BETWEEN_SOUNDS 0.5 // Durata dintre 2 sunete ( in secunde )
    ( ! Doar ce e cu rosu modifici )
    Recompilezi si vezi din nou. Poti ajusta de oricate ori vrei tu pana iti convine.
Post Reply

Return to “Cereri”

  • Information
  • Who is online

    Users browsing this forum: Semrush [Bot] and 30 guests