Skocz do zawartości

Witamy w Nieoficjalnym polskim support'cie AMX Mod X

Witamy w Nieoficjalnym polskim support'cie AMX Mod X, jak w większości społeczności internetowych musisz się zarejestrować aby móc odpowiadać lub zakładać nowe tematy, ale nie bój się to jest prosty proces w którym wymagamy minimalnych informacji.
  • Rozpoczynaj nowe tematy i odpowiedaj na inne
  • Zapisz się do tematów i for, aby otrzymywać automatyczne uaktualnienia
  • Dodawaj wydarzenia do kalendarza społecznościowego
  • Stwórz swój własny profil i zdobywaj nowych znajomych
  • Zdobywaj nowe doświadczenia

Dołączona grafika Dołączona grafika

Guest Message by DevFuse
 

Zdjęcie

Mala Pomoc z Ultimate Sounds


  • Zamknięty Temat jest zamknięty
Brak odpowiedzi do tego tematu

#1 mordzik

    Nowy

  • Użytkownik

Reputacja: 0
Nowy

  • Postów:5
Offline

Napisano 13.08.2009 20:41

Witam Ponownie do was z Mala Prosba o pomoc ^^ z Pluginem Ultimate Sounds

dokladnie chodzi o to by odglosy typu headshot i z kosy byly slyszane przez ofiare nie zabojce
    client_cmd(killer_id,"spk PartyStylerz/kosa")
jak wyzej podalem przyklad z mojego sma tylko slyszal odglos zabojca a ofiara nic i tak samo jst z hs

client_cmd(killer_id,"spk PartyStylerz/bullet")

przemieniajac kommende na victim_id dostaje taki error przy kompilacji

Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team

/groups/amxmodx/tmp3/textqK0IMS.sma(180) : error 017: undefined symbol "victim_id"
/groups/amxmodx/tmp3/textqK0IMS.sma(180) : warning 215: expression has no effect
/groups/amxmodx/tmp3/textqK0IMS.sma(180) : error 001: expected token: ";", but found ")"
/groups/amxmodx/tmp3/textqK0IMS.sma(180) : error 029: invalid expression, assumed zero
/groups/amxmodx/tmp3/textqK0IMS.sma(180) : fatal error 107: too many error messages on one line

Compilation aborted.
4 Errors.


///////////////////////////////////////////////////
//  AMXMOD[X]                                    //
//   ::Ultimate sounds::                         //
//    by Hephaistos (hephaistos@djeyl.net)       //
//    edited by Dizzy (dizzythermal@gmail.com)   //
//                                               //
// cvar:                                         //
//  streak_mode < flags >                        //
//  "a" - messages                               //
//  "b" - sounds                                 //
//                                               //
//  kniff_mode < flags >                         //
//  "a" - messages                               //
//  "b" - sounds                                 //
//                                               //
//  hs_mode < flags >                            //
//  "a" - messages                               //
//  "b" - sounds                                 //
//                                               //
//  lastman_mode < flags >                       //
//  "a" - messages                               //
//  "b" - hp                                     //
//  "c" - sounds                                 //
///////////////////////////////////////////////////

#include <amxmodx>

#define KNIFFMESSAGES 4
#define LEVELS 7
#define MESSAGESNOHP 4
#define MESSAGESHP 4

new kills[33] = {0,...};
new deaths[33] = {0,...};
new alone_ann = 0
new levels[7] = {3, 5, 7, 9, 10, 13, 15};

new stksounds[7][] = {
"PartyStylerz/multikill",
"PartyStylerz/ultrakill",
"PartyStylerz/monsterkill",
"PartyStylerz/killingspree",
"PartyStylerz/rampage",
"PartyStylerz/********.pl",
"PartyStylerz/godlike"};

new stkmessages[7][] = {
"%s: Multi-Kill!",
"%s: Ultra-Kill!",
"%s: Monster-Kill!",
"%s: Killing Spree!",
"%s: Rampage!",
"%s: Holy Shit!",
"%s: Godlike!"};


new kniffmessages[KNIFFMESSAGES][] = {
"%s posiekal i polamal %s!",
"%s zabil %s!",
"%s pchnal nozem %s!",
"%s zaszlachtowal %s!"}

new messagesnohp[MESSAGESNOHP][] = {
"%i terrorist vs %i CT^n%s: Teraz wszystko zalezy od ciebie!",
"%i terrorist vs %i CT^n%s: Mamy nadzieje, ze masz przy sobie apteczke :)",
"%i terrorist vs %i CT^n%s: Wszyscy czlonkowie twojej druzyny polegli! Milej zabawy!",
"%i terrorist vs %i CT^n%s: Teraz zostales sam... Zyczymy powodzenia!"}

new messageshp[MESSAGESHP][] = {
"%i terrorist vs %i CT^n%s (%i hp): Teraz wszystko zalezy od ciebie!",
"%i terrorist vs %i CT^n%s (%i hp): Mamy nadzieje, ze masz przy sobie apteczke :)",
"%i terrorist vs %i CT^n%s (%i hp): Wszyscy czlonkowie twojej druzyny polegli! Milej zabawy!",
"%i terrorist vs %i CT^n%s (%i hp): Teraz zostales sam... Zyczymy powodzenia!"}

get_streak()
{
    new streak[3]
    get_cvar_string("streak_mode",streak,2)
    return read_flags(streak)
}

public death_event(id)
{
    new streak = get_streak()

    if ((streak&1) || (streak&2))
    {
            new killer = read_data(1);
            new victim = read_data(2);

            kills[killer] += 1;
            kills[victim] = 0;
            deaths[killer] = 0;
            deaths[victim] += 1;

            for (new i = 0; i < LEVELS; i++)
        {
                if (kills[killer] == levels[i])
            {
                       announce(killer, victim, i);
                       return PLUGIN_CONTINUE;
            }
        }
    }
    return PLUGIN_CONTINUE;
}

announce(killer, victim, level)
{
    new streak = get_streak()

    if (streak&1)
    {
    new name[32];
    get_user_name(killer, name, 32);
    set_hudmessage(0, 100, 200, 0.05, 0.65, 2, 0.02, 6.0, 0.01, 0.1, 2);
    show_hudmessage(0, stkmessages[level], name);
    }

    if (streak&2){
            client_cmd(victim, "spk %s", stksounds[level]);
    }
}

public reset_hud(id)
{
    new streak = get_streak()

    if (streak&1)
    {

        if (kills[id] > levels[0])
        {
                client_print(id, print_chat,
            "*US* - Masz niezla passe:), twoj wynik wynosi %d fragow!", kills[id]);

        }

        else if (deaths[id] > 1)
        {
            client_print(id, print_chat,
            "*US* - Uwazaj, zginoles juz %d razy pod rzad!", deaths[id]);
        }
    }
}

public client_connect(id)
{
    new streak = get_streak()

    if ((streak&1) || (streak&2))
    {
        kills[id] = 0;
        deaths[id] = 0;
    }
}

public knife_kill()
{
    new kniffmode[4]
    get_cvar_string("kniff_mode",kniffmode,4)
    new kniffmode_bit = read_flags(kniffmode)
    if (kniffmode_bit & 1)
    {
        new killer_id = read_data(1)
        new victim_id = read_data(2)
        new killer_name[33], victim_name[33]

        get_user_name(killer_id,killer_name,33)
        get_user_name(victim_id,victim_name,33)


        set_hudmessage(200, 100, 0, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, 1)
        show_hudmessage(0,kniffmessages[ random_num(0,KNIFFMESSAGES-1) ],killer_name,victim_name)
    }

    if (kniffmode_bit & 2)
    {
    new killer_id = read_data(1)
    client_cmd(victim_id,"spk PartyStylerz/kosa")
    }
}


public roundend_msg(id)

    alone_ann = 0

public death_msg(id)
{

    new lmmode[8]
    get_cvar_string("lastman_mode",lmmode,8)
    new lmmode_bit = read_flags(lmmode)

    new players_ct[32], players_t[32], ict, ite, last
    get_players(players_ct,ict,"ae","CT")   
    get_players(players_t,ite,"ae","TERRORIST")   

    if (ict==1&&ite==1)
    {
        new name1[32], name2[32]
        get_user_name(players_ct[0],name1,32)
        get_user_name(players_t[0],name2,32)
        set_hudmessage(200, 100, 0, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, 1)

        if (lmmode_bit & 1)
        {
            if (lmmode_bit & 2)
            {
                show_hudmessage(0,"%s (%i hp) vs. %s (%i hp)",name1,get_user_health(players_ct[0]),name2,get_user_health(players_t[0]))
            }

            else
            {
                show_hudmessage(0,"%s vs. %s",name1,name2)
            }

            if (lmmode_bit & 4)
            {
                client_cmd(0,"spk PartyStylerz/maytheforce")
            }
        }
    }
    else
{   
    if (ict==1&&ite>1&&alone_ann==0&&(lmmode_bit & 4))
    {
        last=players_ct[0]
        client_cmd(last,"spk PartyStylerz/oneandonly")
    }

    else if (ite==1&&ict>1&&alone_ann==0&&(lmmode_bit & 4))
    {
        last=players_t[0]
        client_cmd(last,"spk PartyStylerz/oneandonly")
    }

    else
    {
        return PLUGIN_CONTINUE
    }
    alone_ann = last
    new name[32]   
    get_user_name(last,name,32)

    if (lmmode_bit & 1)
    {
        set_hudmessage(200, 100, 0, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, 1)

        if (lmmode_bit & 2)
        {
            show_hudmessage(0,messageshp[ random_num(0,MESSAGESHP-1) ],ite ,ict ,name,get_user_health(last))
        }

        else
        {
            show_hudmessage(0,messagesnohp[ random_num(0,MESSAGESNOHP-1) ],ite ,ict ,name )
        }
    }

    if (lmmode_bit & 4)
    {
        client_cmd(last,"spk PartyStylerz/maytheforce")
    }
}
    return PLUGIN_CONTINUE   
}


public hs()
{
    new hsmode[4]
    get_cvar_string("hs_mode",hsmode,4)
    new hsmode_bit = read_flags(hsmode)

    if (hsmode_bit & 1)
    {
    new killer_id = read_data(1)
    new victim_id = read_data(2)
    new victim_name[33]

    get_user_name(victim_id,victim_name,33)

    set_hudmessage(200, 100, 0, -1.0, 0.30, 0, 3.0, 3.0, 0.15, 0.15, 1)
    show_hudmessage(killer_id,"::HEADSHOT::^nTrafiles w leb %s !!",victim_name)
    }

    if (hsmode_bit & 2)
    {
    new killer_id = read_data(1)
    client_cmd(victim_id,"spk PartyStylerz/bullet")
    }
}

public plugin_precache()
{
    precache_sound("PartyStylerz/monsterkill.wav")
    precache_sound("PartyStylerz/godlike.wav")
    precache_sound("PartyStylerz/killingspree.wav")
    precache_sound("PartyStylerz/multikill.wav")
    precache_sound("PartyStylerz/killingspree.wav")
    precache_sound("PartyStylerz/ultrakill.wav")
    precache_sound("PartyStylerz/maytheforce.wav")
    precache_sound("PartyStylerz/oneandonly.wav")
    precache_sound("PartyStylerz/prepare.wav")
    precache_sound("PartyStylerz/rampage.wav")
    precache_sound("PartyStylerz/biale.wav")
    precache_sound("PartyStylerz/bullet.wav")
    precache_sound("PartyStylerz/cornholio.wav")
    precache_sound("PartyStylerz/czesio.wav")
    precache_sound("PartyStylerz/dresik.wav")
    precache_sound("PartyStylerz/godfather.wav")
    precache_sound("PartyStylerz/jaraj.wav")
    precache_sound("PartyStylerz/kosa.wav")
    precache_sound("PartyStylerz/maryjane.wav")
    precache_sound("PartyStylerz/method.wav")
    precache_sound("PartyStylerz/nuscheln.wav")
    precache_sound("PartyStylerz/party1.wav")
    precache_sound("PartyStylerz/prodigy.wav")
    precache_sound("PartyStylerz/rumble.wav")
    precache_sound("PartyStylerz/russia.wav")
    precache_sound("PartyStylerz/stop.wav")
    precache_sound("PartyStylerz/whores.wav")

    return PLUGIN_CONTINUE
}



public plugin_init()
{
    register_plugin("Ultimate Sound","1.5","Dizzy")
    register_event("DeathMsg","hs","a","3=1")
    register_event("DeathMsg","knife_kill","a","4&kni")
    register_event("ResetHUD", "reset_hud", "b");
    register_event("DeathMsg", "death_event", "a")
    register_event("SendAudio","roundend_msg","a","2=%!MRAD_terwin","2=%!MRAD_ctwin","2=%!MRAD_rounddraw")
    register_event("TextMsg","roundend_msg","a","2&#Game_C","2&#Game_w")
    register_event("DeathMsg","death_msg","a")
    register_cvar("lastman_mode","abc")
    register_cvar("streak_mode","ab")
    register_cvar("kniff_mode","ab")
    register_cvar("hs_mode","ab")

    return PLUGIN_CONTINUE
}

i prosilbym o pomoc <img src='https://amxx.pl/public/style_emoticons/<#EMO_DIR#>/naughty.gif' class='bbc_emoticon' alt='^^' />


[ Dodano: 15-08-2009, 20:16 ]
czy ktos by mogl cos z tym poradzic ?? cosik ?
  • +
  • -
  • 0




Użytkownicy przeglądający ten temat: 0

0 użytkowników, 0 gości, 0 anonimowych