Round End Message

Тема в разделе "Программирование / Скриптинг", создана пользователем HTML, 4 мар 2016.

  1. HTML

    HTML

    Сообщения:
    1
    Симпатии:
    0
    Hello!Someone can help me? I want to use this zombie round end plugin in normal mode?
    Someone can rewrite?

    #include < amxmodx >
    #include < fakemeta >
    #include < hamsandwich >
    #include < zombieplague >

    new g_lastWeapon[33]
    new g_RoundEnd

    #define ZOMBIE_WIN_ORIGIN "models/TalRasha/win/zombie_win_origin.mdl"
    #define ZOMBIE_WIN_DEIMOS "models/TalRasha/win/zombie_win_deimos.mdl"
    #define ZOMBIE_WIN_GHOST "models/TalRasha/win/zombie_win_ghost.mdl"
    #define ZOMBIE_WIN_VAMPIRE "models/TalRasha/win/zombie_win_vampire.mdl"
    #define ZOMBIE_WIN_RESIDENT "models/TalRasha/win/zombie_win_resident.mdl"

    #define ZOMBIE_WIN_DEVIL "models/TalRasha/win/zombie_win_devil.mdl"

    #define HUMAN_WIN "models/TalRasha/win/human_win.mdl"

    public plugin_precache()
    {
    precache_model(ZOMBIE_WIN_ORIGIN)
    precache_model(ZOMBIE_WIN_DEIMOS)
    precache_model(ZOMBIE_WIN_GHOST)
    precache_model(ZOMBIE_WIN_VAMPIRE)
    precache_model(ZOMBIE_WIN_RESIDENT)

    precache_model(ZOMBIE_WIN_DEVIL)

    precache_model(HUMAN_WIN)

    precache_sound("TalRasha/emotion/male_joy.wav")
    precache_sound("TalRasha/emotion/female_joy.wav")
    }

    new const SLOT[][] =
    {
    "slot1" ,
    "slot2" ,
    "slot3" ,
    "slot4" ,
    "slot5" ,
    "slot6" ,
    "slot7" ,
    "slot8" ,
    "slot9" ,
    "slot10" ,
    "lastinv"
    }

    public plugin_init()
    {
    register_plugin("Win Models Csnz :3", "1.0", "T a l R a s h a")

    for( new i = 0 ; i < sizeof SLOT ; i ++ )
    {
    if(SLOT[0])
    {
    register_clcmd( SLOT , "BLOCKED")
    }
    }
    }

    public zp_round_ended(WinTeam)
    {
    g_RoundEnd = true

    for( new id = 1 ; id <= get_maxplayers() ; id++ )
    {
    if(is_user_alive(id))

    if( WinTeam == WIN_HUMANS )
    {
    if ( g_lastWeapon[id] != CSW_HEGRENADE )
    engclient_cmd(id, "weapon_knife")
    set_pev(id , pev_viewmodel2 , HUMAN_WIN)
    }
    else if( WinTeam == WIN_ZOMBIES )
    {
    if ( g_lastWeapon[id] != CSW_HEGRENADE )
    engclient_cmd(id, "weapon_knife")

    new zclass = zp_get_user_zombie_class(id)

    if(zclass == 0)
    {
    set_pev(id , pev_viewmodel2 , ZOMBIE_WIN_ORIGIN)
    }
    else if(zclass == 1)
    {
    set_pev(id , pev_viewmodel2 , ZOMBIE_WIN_DEIMOS)
    }
    else if(zclass == 2)
    {
    set_pev(id , pev_viewmodel2 , ZOMBIE_WIN_GHOST)
    }
    else if(zclass == 3)
    {
    set_pev(id , pev_viewmodel2 , ZOMBIE_WIN_VAMPIRE)
    }
    else if(zclass == 4)
    {
    set_pev(id , pev_viewmodel2 , ZOMBIE_WIN_RESIDENT)
    }
    if(zp_get_user_nemesis(id))
    {
    set_pev(id , pev_viewmodel2 , ZOMBIE_WIN_DEVIL)
    }
    }
    else if( WinTeam == WIN_NO_ONE )
    {
    new zclass = zp_get_user_zombie_class(id)

    set_pev(id , pev_viewmodel2 , HUMAN_WIN)

    if ( g_lastWeapon[id] != CSW_HEGRENADE )
    engclient_cmd(id, "weapon_knife")

    if(zp_get_user_zombie(id))
    {
    if ( g_lastWeapon[id] != CSW_HEGRENADE )
    engclient_cmd(id, "weapon_knife")

    if(zclass == 0)
    {
    set_pev(id , pev_viewmodel2 , ZOMBIE_WIN_ORIGIN)
    }
    else if(zclass == 1)
    {
    set_pev(id , pev_viewmodel2 , ZOMBIE_WIN_DEIMOS)
    }
    else if(zclass == 2)
    {
    set_pev(id , pev_viewmodel2 , ZOMBIE_WIN_GHOST)
    }
    else if(zclass == 3)
    {
    set_pev(id , pev_viewmodel2 , ZOMBIE_WIN_VAMPIRE)
    }
    else if(zclass == 4)
    {
    set_pev(id , pev_viewmodel2 , ZOMBIE_WIN_RESIDENT)
    }
    if(zp_get_user_nemesis(id))
    {
    set_pev(id , pev_viewmodel2 , ZOMBIE_WIN_DEVIL)
    }
    }
    }
    }
    set_task(5.0 , "Rem") ; return PLUGIN_HANDLED ;
    }

    public Rem()
    {
    g_RoundEnd = false ;
    }

    public BLOCKED(id)
    {
    if(g_RoundEnd)
    {
    return PLUGIN_HANDLED ;
    }
    else
    {
    engclient_cmd( id , SLOT[id] )
    }
    return PLUGIN_CONTINUE ;
    }

    /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
    *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1049\\ f0\\ fs16 \n\\ par }
    */
     
    Последнее редактирование модератором: 4 мар 2016