[Plugin] Iron Sight (Zoom za m4a1)
Results 1 to 40 of 40
  1. #1
    Senior Member Array
    Join Date
    Jul 2011
    Location
    Zajecar, Srbija
    Karma
    11

    Default Iron Sight (Zoom za m4a1)

    Ime: Iron Sight
    Verzija: 1.3
    Autor: CeLeS

    Opis: Zoom za m4a1:

    Model Puske


    ZOOM

    Instalacija:
    -v_m4a1.mdl - ubacite u cstrike/models/champion_cod
    -zoom2.mdl - ubacite u cstrike/models/champion_cod
    -IronSight.amxx - ubacite u cstrike/addons/amxmodx/plugins
    -U cstrike/addons>amxmodx>confing>plugins.ini skroz dole, napravite novi red i upisite IronSight.amxx

    NAPOMENA:Obavezno ubacite ove modele u champion_cod folderu

    Download:
    Get .rar | Get .zip | Get .sma | Get .amxx


    Quote Originally Posted by Magnum44 View Post
    YEEEEEEEES! FINALLY! THANK YOU! THE BEST PLUGIN JUST BECAME PERFECT!!!

    I cant thank you in some way, but i hope Serbia wins World Championship in soccer...some day!

    And i can recommend this: http://www.moddb.com/mods/brutal-doom .

    Thank you!

  2. #2
    Senior Member Array
    Join Date
    Mar 2012
    Karma
    17

    Default

    E Brt mozes naci ovakav Smeđi zoom treba mi za Ak47 ..

  3. #3
    Senior Member Array
    Join Date
    Aug 2009
    Karma
    18

    Default

    zabranjeno postavljanje linka za download amxx falja
    Quote Originally Posted by zub View Post
    :rolleyes:

  4. #4
    Senior Member Array
    Join Date
    Feb 2012
    Location
    Pancevo
    Age
    23
    Karma
    21

    Default

    odlicno za COD servere, svaka cast
    Facebook stranica: Click

    CS Facebook profil: Click

    [ Lista mojih Plugina ]


  5. #5
    Senior Member Array
    Join Date
    Mar 2010
    Location
    Serbia
    Age
    23
    Karma
    22

    Default

    Vec postoji, na mom serveru

  6. #6
    Senior Member Array
    Join Date
    Feb 2012
    Location
    Pancevo
    Age
    23
    Karma
    21

    Default

    bilo bi dobro kada je ukljucen zoom da nema nisana (zelenog) nego samo ovaj crveni (deo skina m4a1)
    Facebook stranica: Click

    CS Facebook profil: Click

    [ Lista mojih Plugina ]


  7. #7
    Senior Member Array
    Join Date
    Jul 2011
    Location
    Zajecar, Srbija
    Karma
    11

    Default

    evo zoom za emku i kalas, treba vam model kalasa i njega ubacite u champion_cod folderu pod nazivuom v_ak47.
    PHP Code:
    #include <amxmodx> 
    #include <engine>
    #include <fakemeta>
    #include <cstrike>

    #define PLUGIN "Cod Weapons Zooms"
    #define VERSION "1.3"
    #define AUTHOR "CeLeS"

    new const zoom[] = "models/champion_cod/zoom2.mdl";
    new const 
    m4a1[] = "models/champion_cod/v_m4a1.mdl";
    new const 
    ak47[] = "models/champion_cod/v_ak47.mdl";

    new 
    g_hasZoom[32];
    new 
    bool:norecoil[33];
    new 
    szClipszAmmocwz_norecoil;

    public 
    plugin_init( )
    {
        
    register_plugin(PLUGINVERSIONAUTHOR)
        
        
    register_forward(FM_CmdStart"fw_CmdStart" )
        
    register_forward(FM_PlayerPreThink,"fw_Player_PreThink")
        
    register_forward(FM_PlayerPreThink,"fw_PreThink")
        
    register_forward(FM_UpdateClientData,"fw_Update",1)
        
        
    register_event("CurWeapon""Event_CurWeapon""be""1=1")
        
        
    cwz_norecoil register_cvar("cod_norecoil""1")
    }

    public 
    plugin_precache( )
    {
        
    precache_model(zoom);
        
    precache_model(m4a1);
        
    precache_model(ak47);
    }

    public 
    Event_CurWeapon(id)
    {
        if(!
    is_user_alive(id) || !is_user_connected(id)) 
            return 
    PLUGIN_CONTINUE
        
        
    new szWeapID get_user_weaponidszClipszAmmo )
        if(
    szWeapID == CSW_M4A1 && !g_hasZoom[id] == true )
        {
            
    entity_set_string(idEV_SZ_viewmodelm4a1)
        }
        if(
    szWeapID == CSW_AK47 && !g_hasZoom[id] == true )
        {
            
    entity_set_string(idEV_SZ_viewmodelak47)
        }
        return 
    PLUGIN_CONTINUE;
    }

    public 
    fw_CmdStartiduc_handleseed )
    {
        if(!
    is_user_alive(id) ) 
        {
            
    ZoomFalse(id)
            return 
    PLUGIN_HANDLED
        
    }
        
        new 
    szWeapID get_user_weaponidszClipszAmmo )
        
        if((
    get_ucuc_handleUC_Buttons ) & IN_ATTACK2 ) && !( pevidpev_oldbuttons ) & IN_ATTACK2 ) )
        { 
            if((
    szWeapID == CSW_M4A1 || szWeapID == CSW_AK47) && !g_hasZoom[id] == true)
            {
                
    ZoomTrue(id)
            }
            
            else if((
    szWeapID == CSW_M4A1 || szWeapID == CSW_AK47) && g_hasZoom[id])
            {
                
    ZoomFalse(id)
                
    entity_set_string(idEV_SZ_viewmodelm4a1)
            }
        }
        
        if(
    g_hasZoom[id] && ( ( get_ucuc_handleUC_Buttons ) & IN_RELOAD ) && (pev(idpev_button) & IN_RELOAD)) )
        {
            if(
    szWeapID == CSW_M4A1 )
            {
                
    ZoomFalse(id)
                
    entity_set_string(idEV_SZ_viewmodelm4a1)
            }
            if(
    szWeapID == CSW_AK47 )
            {
                
    ZoomFalse(id)
                
    entity_set_string(idEV_SZ_viewmodelak47)
            }
        }
        if((
    szWeapID != CSW_M4A1 || szWeapID != CSW_AK47) && g_hasZoom[id] )
        {
            
    ZoomFalse(id)
        }
        if(
    szClip == && g_hasZoom[id])
        {
            
    ZoomFalse(id)
        }
        return 
    PLUGIN_HANDLED
    }

    public 
    fw_Player_PreThink(id)
    {
        if(!
    is_user_alive(id) || get_user_weapon(id) != CSW_M4A1 && get_user_weapon(id) != CSW_AK47)
        {
            return 
    FMRES_IGNORED;
        }
        
    set_pev(idpev_buttonpev(id,pev_button) & ~IN_ATTACK2
        return 
    FMRES_HANDLED;
    }

    public 
    fw_PreThink(id)
    {
        if(!
    is_user_alive(id) || norecoil[id] == false)
        {
            return 
    FMRES_IGNORED;
        }
        
    set_pev(id,pev_punchangle,{0.0,0.0,0.0});
        return 
    FMRES_HANDLED;
    }

    public 
    fw_Update(idsendweaponscd_handle

        if(!
    is_user_alive(id) || norecoil[id] == false)
        {
            return 
    FMRES_IGNORED;
        }
        
        
    set_cd(cd_handleCD_PunchAngle, {0.0,0.0,0.0})        
        return 
    FMRES_HANDLED 
    }

    public 
    ZoomTrue(id)
    {
        if(
    get_pcvar_num(cwz_norecoil) == 1)
        {
            
    norecoil[id] = true
        
    }
        
    g_hasZoom[id] = true
        entity_set_string
    (idEV_SZ_viewmodelzoom
        
    cs_set_user_zoom(idCS_SET_AUGSG552_ZOOM0)
        
    client_cmd(id"spk weapons/zoom")
    }

    public 
    ZoomFalse(id)
    {
        
    norecoil[id] = false;
        
    g_hasZoom[id] = false
        cs_set_user_zoom
    (idCS_RESET_ZOOM0)



    Quote Originally Posted by Magnum44 View Post
    YEEEEEEEES! FINALLY! THANK YOU! THE BEST PLUGIN JUST BECAME PERFECT!!!

    I cant thank you in some way, but i hope Serbia wins World Championship in soccer...some day!

    And i can recommend this: http://www.moddb.com/mods/brutal-doom .

    Thank you!

  8. #8
    Senior Member Array
    Join Date
    Jul 2011
    Location
    Zajecar, Srbija
    Karma
    11

    Default

    Quote Originally Posted by Simbad View Post
    zabranjeno postavljanje linka za download amxx falja
    OMG, ovde si 3 godine i jos nisi procitao pravila. Evo ti link da procitas.


    Quote Originally Posted by Magnum44 View Post
    YEEEEEEEES! FINALLY! THANK YOU! THE BEST PLUGIN JUST BECAME PERFECT!!!

    I cant thank you in some way, but i hope Serbia wins World Championship in soccer...some day!

    And i can recommend this: http://www.moddb.com/mods/brutal-doom .

    Thank you!

  9. #9
    Senior Member Array
    Join Date
    Jul 2010
    Location
    * BG - AR *
    Karma
    14

    Default

    Quote Originally Posted by PU13|V|4ST3|2_SN1P3R View Post
    evo zoom za emku i kalas, treba vam model kalasa i njega ubacite u champion_cod folderu pod nazivuom v_ak47.
    PHP Code:
    #include <amxmodx> 
    #include <engine>
    #include <fakemeta>
    #include <cstrike>

    #define PLUGIN "Cod Weapons Zooms"
    #define VERSION "1.3"
    #define AUTHOR "CeLeS"

    new const zoom[] = "models/champion_cod/zoom2.mdl";
    new const 
    m4a1[] = "models/champion_cod/v_m4a1.mdl";
    new const 
    ak47[] = "models/champion_cod/v_ak47.mdl";

    new 
    g_hasZoom[32];
    new 
    bool:norecoil[33];
    new 
    szClipszAmmocwz_norecoil;

    public 
    plugin_init( )
    {
        
    register_plugin(PLUGINVERSIONAUTHOR)
        
        
    register_forward(FM_CmdStart"fw_CmdStart" )
        
    register_forward(FM_PlayerPreThink,"fw_Player_PreThink")
        
    register_forward(FM_PlayerPreThink,"fw_PreThink")
        
    register_forward(FM_UpdateClientData,"fw_Update",1)
        
        
    register_event("CurWeapon""Event_CurWeapon""be""1=1")
        
        
    cwz_norecoil register_cvar("cod_norecoil""1")
    }

    public 
    plugin_precache( )
    {
        
    precache_model(zoom);
        
    precache_model(m4a1);
        
    precache_model(ak47);
    }

    public 
    Event_CurWeapon(id)
    {
        if(!
    is_user_alive(id) || !is_user_connected(id)) 
            return 
    PLUGIN_CONTINUE
        
        
    new szWeapID get_user_weaponidszClipszAmmo )
        if(
    szWeapID == CSW_M4A1 && !g_hasZoom[id] == true )
        {
            
    entity_set_string(idEV_SZ_viewmodelm4a1)
        }
        if(
    szWeapID == CSW_AK47 && !g_hasZoom[id] == true )
        {
            
    entity_set_string(idEV_SZ_viewmodelak47)
        }
        return 
    PLUGIN_CONTINUE;
    }

    public 
    fw_CmdStartiduc_handleseed )
    {
        if(!
    is_user_alive(id) ) 
        {
            
    ZoomFalse(id)
            return 
    PLUGIN_HANDLED
        
    }
        
        new 
    szWeapID get_user_weaponidszClipszAmmo )
        
        if((
    get_ucuc_handleUC_Buttons ) & IN_ATTACK2 ) && !( pevidpev_oldbuttons ) & IN_ATTACK2 ) )
        { 
            if((
    szWeapID == CSW_M4A1 || szWeapID == CSW_AK47) && !g_hasZoom[id] == true)
            {
                
    ZoomTrue(id)
            }
            
            else if((
    szWeapID == CSW_M4A1 || szWeapID == CSW_AK47) && g_hasZoom[id])
            {
                
    ZoomFalse(id)
                
    entity_set_string(idEV_SZ_viewmodelm4a1)
            }
        }
        
        if(
    g_hasZoom[id] && ( ( get_ucuc_handleUC_Buttons ) & IN_RELOAD ) && (pev(idpev_button) & IN_RELOAD)) )
        {
            if(
    szWeapID == CSW_M4A1 )
            {
                
    ZoomFalse(id)
                
    entity_set_string(idEV_SZ_viewmodelm4a1)
            }
            if(
    szWeapID == CSW_AK47 )
            {
                
    ZoomFalse(id)
                
    entity_set_string(idEV_SZ_viewmodelak47)
            }
        }
        if((
    szWeapID != CSW_M4A1 || szWeapID != CSW_AK47) && g_hasZoom[id] )
        {
            
    ZoomFalse(id)
        }
        if(
    szClip == && g_hasZoom[id])
        {
            
    ZoomFalse(id)
        }
        return 
    PLUGIN_HANDLED
    }

    public 
    fw_Player_PreThink(id)
    {
        if(!
    is_user_alive(id) || get_user_weapon(id) != CSW_M4A1 && get_user_weapon(id) != CSW_AK47)
        {
            return 
    FMRES_IGNORED;
        }
        
    set_pev(idpev_buttonpev(id,pev_button) & ~IN_ATTACK2
        return 
    FMRES_HANDLED;
    }

    public 
    fw_PreThink(id)
    {
        if(!
    is_user_alive(id) || norecoil[id] == false)
        {
            return 
    FMRES_IGNORED;
        }
        
    set_pev(id,pev_punchangle,{0.0,0.0,0.0});
        return 
    FMRES_HANDLED;
    }

    public 
    fw_Update(idsendweaponscd_handle

        if(!
    is_user_alive(id) || norecoil[id] == false)
        {
            return 
    FMRES_IGNORED;
        }
        
        
    set_cd(cd_handleCD_PunchAngle, {0.0,0.0,0.0})        
        return 
    FMRES_HANDLED 
    }

    public 
    ZoomTrue(id)
    {
        if(
    get_pcvar_num(cwz_norecoil) == 1)
        {
            
    norecoil[id] = true
        
    }
        
    g_hasZoom[id] = true
        entity_set_string
    (idEV_SZ_viewmodelzoom
        
    cs_set_user_zoom(idCS_SET_AUGSG552_ZOOM0)
        
    client_cmd(id"spk weapons/zoom")
    }

    public 
    ZoomFalse(id)
    {
        
    norecoil[id] = false;
        
    g_hasZoom[id] = false
        cs_set_user_zoom
    (idCS_RESET_ZOOM0)

    SN1P3R da li imas ti taj model Kalas-a da mi das link za download ?

  10. #10
    Senior Member Array
    Join Date
    Jun 2011
    Location
    Novi Beograd
    Karma
    11
    Neki od mojih amxx plugina
    __________________________________________________ _____________________
    Admin Binds - MovePlayer Manualy + Menu - Kick Admins - HUD Detalji - CW Password

    Quote Originally Posted by amb!S View Post
    Ko mi pomogne dobice sarmu + :D.

  11. #11
    Senior Member Array
    Join Date
    Jul 2011
    Location
    Zajecar, Srbija
    Karma
    11

    Default

    Quote Originally Posted by GUERRINI View Post
    SN1P3R da li imas ti taj model Kalas-a da mi das link za download ?
    Poslato na PM ali evo i ovde: klik


    Quote Originally Posted by Magnum44 View Post
    YEEEEEEEES! FINALLY! THANK YOU! THE BEST PLUGIN JUST BECAME PERFECT!!!

    I cant thank you in some way, but i hope Serbia wins World Championship in soccer...some day!

    And i can recommend this: http://www.moddb.com/mods/brutal-doom .

    Thank you!

  12. #12
    Senior Member Array
    Join Date
    Jul 2010
    Location
    * BG - AR *
    Karma
    14

    Default

    Quote Originally Posted by good.^ NbgD.- View Post
    Txn good , ali tebra ovaj kalas nema Nisan za ZUM !


    Quote Originally Posted by PU13|V|4ST3|2_SN1P3R View Post
    Poslato na PM ali evo i ovde: klik
    Txn SN1P3R, pozzz !

  13. #13
    Junior Member Array
    Join Date
    May 2012
    Karma
    0

    Default

    I like your plugin most of all i found so far...but i have 2 problems.

    The yellow cross in center when zoomed is to the left of the red dot and the sma cant be compiled due to"error 088: number of arguments does not match definition".

    Fix these and update files? Can you remove that yellow cross to the left of the red dot and fix the sma? Thank you!

    I have tried many aimable/zoom M4A1-models from gamebanana and the internet, but i found none that have a smooth animation, fast, and with a zoom-in...except yours.

    PS! What language is used on this forum? Tried to use "Google translate", but dont know the language used!
    Last edited by Magnum44; 16-05-2012 at 01:23.

  14. #14
    Senior Member Array
    Join Date
    Apr 2011
    Location
    Osijek
    Karma
    17

    Default

    Quote Originally Posted by Magnum44 View Post
    What language is used on this forum? Tried to use "Google translate", butdont know the language used!
    Serbian
    Looking for head admin to lead server.

  15. #15
    Senior Member Array
    Join Date
    Jul 2011
    Location
    Zajecar, Srbija
    Karma
    11

    Default

    Quote Originally Posted by Magnum44 View Post
    I like your plugin most of all i found so far...but i have 2 problems.

    The yellow cross in center when zoomed is to the left of the red dot and the sma cant be compiled due to"error 088: number of arguments does not match definition".

    Fix these and update files? Can you remove that yellow cross to the left of the red dot and fix the sma? Thank you!

    I have tried many aimable/zoom M4A1-models from gamebanana and the internet, but i found none that have a smooth animation, fast, and with a zoom-in...except yours.

    PS! What language is used on this forum? Tried to use "Google translate", but dont know the language used!
    1. I don't have that error.
    2. I can only remove crosshair.
    PHP Code:
    #include <amxmodx> 
    #include <engine>
    #include <fakemeta>
    #include <cstrike>

    #define PLUGIN "Cod Weapons Zooms"
    #define VERSION "1.3"
    #define AUTHOR "CeLeS"

    new const zoom[] = "models/champion_cod/zoom2.mdl"
    new const m4a1[] = "models/champion_cod/v_m4a1.mdl"

    new g_hasZoom[32]
    new 
    bool:norecoil[33]
    new 
    szClipszAmmo

    new cwz_norecoilcwz_crosshair

    new gmsgHideWeapon

    public plugin_init( )
    {
        
    register_plugin(PLUGINVERSIONAUTHOR)
        
        
    register_forward(FM_CmdStart"fw_CmdStart" )
        
    register_forward(FM_PlayerPreThink,"fw_Player_PreThink")
        
    register_forward(FM_PlayerPreThink,"fw_PreThink")
        
    register_forward(FM_UpdateClientData,"fw_Update",1)
        
        
    register_event("CurWeapon""Event_CurWeapon""be""1=1")

        
    cwz_norecoil register_cvar("cod_norecoil""1")
        
    cwz_crosshair register_cvar("cod_crosshair_enable""0")
        
        
    gmsgHideWeapon get_user_msgid("HideWeapon")
    }

    public 
    plugin_precache( )
    {
        
    precache_model(zoom)
        
    precache_model(m4a1)
    }

    public 
    Event_CurWeapon(id)
    {
        if(!
    is_user_alive(id) || !is_user_connected(id)) 
            return 
    PLUGIN_CONTINUE
        
        
    new szWeapID get_user_weaponidszClipszAmmo )
        if(
    szWeapID == CSW_M4A1 && !g_hasZoom[id] == true )
        {
            
    entity_set_string(idEV_SZ_viewmodelm4a1)
        }

        return 
    PLUGIN_CONTINUE
    }

    public 
    fw_CmdStartiduc_handleseed )
    {
        if(!
    is_user_alive(id) ) 
        {
            
    ZoomFalse(id)
            return 
    PLUGIN_HANDLED
        
    }
        
        new 
    szWeapID get_user_weaponidszClipszAmmo )
        
        if((
    get_ucuc_handleUC_Buttons ) & IN_ATTACK2 ) && !( pevidpev_oldbuttons ) & IN_ATTACK2 ) )
        { 
            if(
    szWeapID == CSW_M4A1 && !g_hasZoom[id] == true)
            {
                
    ZoomTrue(id)
            }
            
            else if(
    szWeapID == CSW_M4A1 && g_hasZoom[id])
            {
                
    ZoomFalse(id)
                
    entity_set_string(idEV_SZ_viewmodelm4a1)
            }
        }

        if(
    g_hasZoom[id] && ( ( get_ucuc_handleUC_Buttons ) & IN_RELOAD ) && (pev(idpev_button) & IN_RELOAD)) )
        {
            if(
    szWeapID == CSW_M4A1 )
            {
                
    ZoomFalse(id)
                
    entity_set_string(idEV_SZ_viewmodelm4a1)
            } 
        }
        if( 
    szWeapID != CSW_M4A1 && g_hasZoom[id] )
        {
            
    ZoomFalse(id)
        }
        if(
    szClip == && g_hasZoom[id])
        {
            
    ZoomFalse(id)
        }
        return 
    PLUGIN_HANDLED
    }

    public 
    fw_Player_PreThink(id)
    {
        if(!
    is_user_alive(id) || get_user_weapon(id) != CSW_M4A1)
        {
            return 
    FMRES_IGNORED
        
    }
        
    set_pev(idpev_buttonpev(id,pev_button) & ~IN_ATTACK2
        return 
    FMRES_HANDLED
    }

    public 
    fw_PreThink(id)
    {
        if(!
    is_user_alive(id) || norecoil[id] == false)
        {
            return 
    FMRES_IGNORED
        
    }
        
    set_pev(id,pev_punchangle,{0.0,0.0,0.0})
        return 
    FMRES_HANDLED
    }

    public 
    fw_Update(idsendweaponscd_handle

        if(!
    is_user_alive(id) || norecoil[id] == false)
        {
            return 
    FMRES_IGNORED
        
    }
        
        
    set_cd(cd_handleCD_PunchAngle, {0.0,0.0,0.0})        
        return 
    FMRES_HANDLED 
    }

    public 
    ZoomTrue(id)
    {
        if(
    get_pcvar_num(cwz_norecoil) == 1)
        {
            
    norecoil[id] = true
        
    }
        
    g_hasZoom[id] = true
        
    if(!get_pcvar_num(cwz_crosshair))
        {
            
    hide_crosshair(id)
        }
        
    entity_set_string(idEV_SZ_viewmodelzoom
        
    cs_set_user_zoom(idCS_SET_AUGSG552_ZOOM0)
        
    client_cmd(id"spk weapons/zoom")
    }

    public 
    ZoomFalse(id)
    {
        
    norecoil[id] = false
        g_hasZoom
    [id] = false
        draw_crosshair
    (id)
        
    cs_set_user_zoom(idCS_RESET_ZOOM0)
    }

    public 
    draw_crosshair(id)
    {
        
    message_begin(MSG_ONE_UNRELIABLEgmsgHideWeapon_id)
        
    write_byte(0)
        
    message_end()
    }

    public 
    hide_crosshair(id)
    {    
        
    message_begin(MSG_ONE_UNRELIABLEgmsgHideWeapon_id)
        
    write_byte(1<<6)
        
    message_end()



    Quote Originally Posted by Magnum44 View Post
    YEEEEEEEES! FINALLY! THANK YOU! THE BEST PLUGIN JUST BECAME PERFECT!!!

    I cant thank you in some way, but i hope Serbia wins World Championship in soccer...some day!

    And i can recommend this: http://www.moddb.com/mods/brutal-doom .

    Thank you!

  16. #16
    Junior Member Array
    Join Date
    May 2012
    Karma
    0

    Default

    OK, i tried the new amxx-file. I compiled the PHP-code by http://www.amxmodx.org/webcompiler.cgi .The regular crosshair is now removed when zoomed in And the yellow crosshair with four dots............until you fire, then the yellow cross with four dots comes back again? It irritates me that there is a displaced crosshair left of the red dot. What is it doing there?

    Kindly fix this? The crosshair is making me mad...and it is really first time i see a crosshair anyway along a red dot in an iron sight. It is not supposed to be dual!

    Your M41A-plugin is the nicest i have found so far and i would like to save it for the future!
    Last edited by Magnum44; 18-05-2012 at 09:09.

  17. #17
    Junior Member Array
    Join Date
    May 2012
    Karma
    0

    Default

    If you donīt have the time for yet another update of the PHP-code, could you at least post what line, etc. in the code that states that the yellow crosshair ( never seen this before in game before i used your plugin and it is not the regular one that now is hidden when zoomed in), a cross with four dots instead of four lines, is to become visible when you fire the weapon while zoomed in? Then i can try myself by deleting the line?

    [IMG][/IMG]
    Last edited by Magnum44; 18-05-2012 at 01:03.

  18. #18
    Senior Member Array
    Join Date
    Jul 2011
    Location
    Zajecar, Srbija
    Karma
    11

    Default

    Quote Originally Posted by Magnum44 View Post
    OK, i tried the new amxx-file. I compiled the PHP-code by http://www.amxmodx.org/webcompiler.cgi .The regular crosshair is now removed when zoomed in And the yellow crosshair with four dots............until you fire, then the yellow cross with four dots comes back again? It irritates me that there is a displaced crosshair left of the red dot. What is it doing there?
    I tested this:
    PHP Code:
    #include <amxmodx>  
    #include <engine> 
    #include <fakemeta> 
    #include <cstrike> 

    #define PLUGIN "Cod Weapons Zooms" 
    #define VERSION "1.3" 
    #define AUTHOR "CeLeS" 

    new const zoom[] = "models/champion_cod/zoom2.mdl" 
    new const m4a1[] = "models/champion_cod/v_m4a1.mdl" 

    new g_hasZoom[32
    new 
    bool:norecoil[33
    new 
    szClipszAmmo 

    new cwz_norecoilcwz_crosshair 

    new gmsgHideWeapon 

    public plugin_init( ) 

        
    register_plugin(PLUGINVERSIONAUTHOR
        
        
    register_forward(FM_CmdStart"fw_CmdStart" 
        
    register_forward(FM_PlayerPreThink,"fw_Player_PreThink"
        
    register_forward(FM_PlayerPreThink,"fw_PreThink"
        
    register_forward(FM_UpdateClientData,"fw_Update",1
        
        
    register_event("CurWeapon""Event_CurWeapon""be""1=1"
        
        
    cwz_norecoil register_cvar("cod_norecoil""1"
        
    cwz_crosshair register_cvar("cod_crosshair_enable""0"
        
        
    gmsgHideWeapon get_user_msgid("HideWeapon"


    public 
    plugin_precache( ) 

        
    precache_model(zoom
        
    precache_model(m4a1


    public 
    Event_CurWeapon(id

        if(!
    is_user_alive(id) || !is_user_connected(id))  
            return 
    PLUGIN_CONTINUE 
        
        
    new szWeapID get_user_weaponidszClipszAmmo 
        if(
    szWeapID == CSW_M4A1 && !g_hasZoom[id] == true 
        { 
            
    entity_set_string(idEV_SZ_viewmodelm4a1
        } 
        
        return 
    PLUGIN_CONTINUE 


    public 
    fw_CmdStartiduc_handleseed 

        if(!
    is_user_alive(id) )  
        { 
            
    ZoomFalse(id
            return 
    PLUGIN_HANDLED 
        

        
        new 
    szWeapID get_user_weaponidszClipszAmmo 
        
        if((
    get_ucuc_handleUC_Buttons ) & IN_ATTACK2 ) && !( pevidpev_oldbuttons ) & IN_ATTACK2 ) ) 
        {  
            if(
    szWeapID == CSW_M4A1 && !g_hasZoom[id] == true
            { 
                
    ZoomTrue(id
            } 
            
            else if(
    szWeapID == CSW_M4A1 && g_hasZoom[id]) 
            { 
                
    ZoomFalse(id
                
    entity_set_string(idEV_SZ_viewmodelm4a1
            } 
        } 
        
        if(
    g_hasZoom[id] && ( ( get_ucuc_handleUC_Buttons ) & IN_RELOAD ) && (pev(idpev_button) & IN_RELOAD)) ) 
        { 
            if(
    szWeapID == CSW_M4A1 
            { 
                
    ZoomFalse(id
                
    entity_set_string(idEV_SZ_viewmodelm4a1
            }  
        } 
        if( 
    szWeapID != CSW_M4A1 && g_hasZoom[id] ) 
        { 
            
    ZoomFalse(id
        } 
        if(
    szClip == && g_hasZoom[id]) 
        { 
            
    ZoomFalse(id
        } 
        return 
    PLUGIN_HANDLED 


    public 
    fw_Player_PreThink(id

        if(!
    is_user_alive(id) || get_user_weapon(id) != CSW_M4A1
        { 
            return 
    FMRES_IGNORED 
        

        
    set_pev(idpev_buttonpev(id,pev_button) & ~IN_ATTACK2)  
        return 
    FMRES_HANDLED 


    public 
    fw_PreThink(id

        if(!
    is_user_alive(id))
        {
            return 
    FMRES_IGNORED;
        }
        if(
    g_hasZoom[id])
        {
            
    hide_crosshair(id);
        }
        if(
    norecoil[id] == false
        { 
            return 
    FMRES_IGNORED 
        

        
    set_pev(id,pev_punchangle,{0.0,0.0,0.0}) 
        return 
    FMRES_HANDLED 


    public 
    fw_Update(idsendweaponscd_handle)  
    {  
        if(!
    is_user_alive(id) || norecoil[id] == false
        { 
            return 
    FMRES_IGNORED 
        

        
        
    set_cd(cd_handleCD_PunchAngle, {0.0,0.0,0.0})         
        return 
    FMRES_HANDLED  


    public 
    ZoomTrue(id

        if(
    get_pcvar_num(cwz_norecoil) == 1
        { 
            
    norecoil[id] = true 
        

        
    g_hasZoom[id] = true 
        
    if(!get_pcvar_num(cwz_crosshair)) 
        { 
            
    hide_crosshair(id
        } 
        
    entity_set_string(idEV_SZ_viewmodelzoom)  
        
    cs_set_user_zoom(idCS_SET_AUGSG552_ZOOM0
        
    client_cmd(id"spk weapons/zoom"


    public 
    ZoomFalse(id

        
    norecoil[id] = false 
        g_hasZoom
    [id] = false 
        draw_crosshair
    (id
        
    cs_set_user_zoom(idCS_RESET_ZOOM0


    public 
    draw_crosshair(id

        
    message_begin(MSG_ONE_UNRELIABLEgmsgHideWeapon_id
        
    write_byte(0
        
    message_end() 


    public 
    hide_crosshair(id
    {     
        
    message_begin(MSG_ONE_UNRELIABLEgmsgHideWeapon_id
        
    write_byte(1<<6
        
    message_end() 

    Last edited by PU13|V|4ST3|2_SN1P3R; 21-06-2012 at 08:15. Reason: lol! bio neki text na engleskom


    Quote Originally Posted by Magnum44 View Post
    YEEEEEEEES! FINALLY! THANK YOU! THE BEST PLUGIN JUST BECAME PERFECT!!!

    I cant thank you in some way, but i hope Serbia wins World Championship in soccer...some day!

    And i can recommend this: http://www.moddb.com/mods/brutal-doom .

    Thank you!

  19. #19
    Junior Member Array
    Join Date
    May 2012
    Karma
    0

    Default

    YEEEEEEEES! FINALLY! THANK YOU! THE BEST PLUGIN JUST BECAME PERFECT!!!

    I cant thank you in some way, but i hope Serbia wins World Championship in soccer...some day!

    And i can recommend this: http://www.moddb.com/mods/brutal-doom .

    Thank you!

  20. #20
    VIP Member Array Megastorm's Avatar
    Join Date
    Sep 2011
    Location
    Tokyo, Japan
    Age
    24
    Karma
    35

    Default

    Thank you too for good wishes,I am happy because people on this forum helped you

  21. #21
    Senior Member Array
    Join Date
    Apr 2012
    Location
    194.106.167.94:28033
    Karma
    8

    Default

    Ne razumem zasto ovo meni baguje na serveru...

    Kada sam ubacio na server ovaj zoom, nisam ni primetio da baguje, dok je "IronSight.amxx" redovno pravio error logove i to po 66.303.315 kb velicine, znaci redovno pravi error logove, a igraci mi se na serveru zale kako im je zoom zut, nekima polu plav, zna li neko kako da se resim ovog baga, pokusao sam i da dodam debug, ali ne uspeva... Hvala ..
    Killing Floor COD:MW2[FAST XP]
    194.106.167.94:28033




    -Moji radovi :

    - Lag & Fps fixer plugin
    - Lotto plugin
    - WeaponShortcut plugin
    - SpeedStop plugin

  22. #22
    Senior Member Array
    Join Date
    Apr 2012
    Location
    194.106.167.94:28033
    Karma
    8

    Default

    Quote Originally Posted by BornToFrag View Post
    Ne razumem zasto ovo meni baguje na serveru...

    Kada sam ubacio na server ovaj zoom, nisam ni primetio da baguje, dok je "IronSight.amxx" redovno pravio error logove i to po 66.303.315 kb velicine, znaci redovno pravi error logove, a igraci mi se na serveru zale kako im je zoom zut, nekima polu plav, zna li neko kako da se resim ovog baga, pokusao sam i da dodam debug, ali ne uspeva... Hvala ..
    Bump!
    Killing Floor COD:MW2[FAST XP]
    194.106.167.94:28033




    -Moji radovi :

    - Lag & Fps fixer plugin
    - Lotto plugin
    - WeaponShortcut plugin
    - SpeedStop plugin

  23. #23
    Senior Member Array
    Join Date
    Jul 2011
    Location
    Zajecar, Srbija
    Karma
    11

    Default

    Quote Originally Posted by BornToFrag View Post
    Ne razumem zasto ovo meni baguje na serveru...

    Kada sam ubacio na server ovaj zoom, nisam ni primetio da baguje, dok je "IronSight.amxx" redovno pravio error logove i to po 66.303.315 kb velicine, znaci redovno pravi error logove, a igraci mi se na serveru zale kako im je zoom zut, nekima polu plav, zna li neko kako da se resim ovog baga, pokusao sam i da dodam debug, ali ne uspeva... Hvala ..
    Koja verzija? Ona sto stoji u prvom postu ili poslednja? Daj eror log.


    Quote Originally Posted by Magnum44 View Post
    YEEEEEEEES! FINALLY! THANK YOU! THE BEST PLUGIN JUST BECAME PERFECT!!!

    I cant thank you in some way, but i hope Serbia wins World Championship in soccer...some day!

    And i can recommend this: http://www.moddb.com/mods/brutal-doom .

    Thank you!

  24. #24
    Senior Member Array
    Join Date
    Apr 2012
    Location
    194.106.167.94:28033
    Karma
    8

    Default

    Quote Originally Posted by PU13|V|4ST3|2_SN1P3R View Post
    Koja verzija? Ona sto stoji u prvom postu ili poslednja? Daj eror log.
    Pa ova verzija, v1.3, evo delic error log-a, a ovako stalo izbacuje vezano za IronSight:


    L 06/21/2012 - 11:23:50: [AMXX] Displaying debug trace (plugin "IronSight.amxx")
    L 06/21/2012 - 11:23:50: [AMXX] Run time error 4: index out of bounds
    L 06/21/2012 - 11:23:50: [AMXX] [0] 64kku496.sma.p::ZoomFalse (line 140)
    L 06/21/2012 - 11:23:50: [AMXX] [1] 64kku496.sma.p::fw_CmdStart (line 55)
    Killing Floor COD:MW2[FAST XP]
    194.106.167.94:28033




    -Moji radovi :

    - Lag & Fps fixer plugin
    - Lotto plugin
    - WeaponShortcut plugin
    - SpeedStop plugin

  25. #25
    Senior Member Array
    Join Date
    Jul 2011
    Location
    Zajecar, Srbija
    Karma
    11

    Default

    Quote Originally Posted by BornToFrag View Post
    Pa ova verzija, v1.3, evo delic error log-a, a ovako stalo izbacuje vezano za IronSight:


    L 06/21/2012 - 11:23:50: [AMXX] Displaying debug trace (plugin "IronSight.amxx")
    L 06/21/2012 - 11:23:50: [AMXX] Run time error 4: index out of bounds
    L 06/21/2012 - 11:23:50: [AMXX] [0] 64kku496.sma.p::ZoomFalse (line 140)
    L 06/21/2012 - 11:23:50: [AMXX] [1] 64kku496.sma.p::fw_CmdStart (line 55)
    PHP Code:
    #include <amxmodx>   
    #include <engine>  
    #include <fakemeta>  
    #include <cstrike>  

    #define PLUGIN    "CoD Weapons Zooms"
    #define VERSION    "1.3.1" 
    #define AUTHOR    "CeLeS"
    #define EDITER    "SNIPER"
    #define VAR    "cwzCS"

    #define MAX 32

    new zoom[] = "models/champion_cod/zoom2.mdl";
    new 
    m4a1[] = "models/champion_cod/v_m4a1.mdl";
      
    new 
    cwz_norecoil;
    new 
    cwz_crosshair;  

    new 
    msgHideWeapon;

    new 
    boolZoom[MAX+1];

    public 
    plugin_init()
    {
        
    register_plugin(PLUGINVERSIONAUTHOR);
        
    register_cvar(VAR, VERSION, (FCVAR_SERVER|FCVAR_SPONLY));
        
        
    register_forward(FM_CmdStart"CmdStart" );
        
    register_forward(FM_PlayerPreThink"PreThink");
        
    register_forward(FM_UpdateClientData"Update"1);
        
        
    register_event("CurWeapon""CurWeapon""be""1=1");
        
        
    cwz_norecoil register_cvar("cod_norecoil""1");
        
    cwz_crosshair register_cvar("cod_hidecrosshair""1");
        
        
    msgHideWeapon get_user_msgid("HideWeapon");
    }  

    public 
    plugin_precache()
    {
        
    precache_model(zoom);
        
    precache_model(m4a1);
    }

    public 
    CurWeapon(id)  
    {  
        if(!
    is_user_alive(id) || !is_user_connected(id))
            return 
    PLUGIN_CONTINUE;
            
        if(
    get_user_weapon(id) == CSW_M4A1 && Zoom[id] == false)
            
    entity_set_string(idEV_SZ_viewmodelm4a1);
        
        return 
    PLUGIN_CONTINUE;
    }  

    public 
    CmdStart(iduc_handle)
    {
        if(!
    is_user_connected(id))
            return 
    FMRES_IGNORED;
            
        if(!
    is_user_alive(id))
        {  
            
    ZoomFalse(id);
            return 
    FMRES_IGNORED;
        } 
        
        new 
    ClipWeapon get_user_weapon(idClip);
        new 
    Button get_uc(uc_handleUC_Buttons);
        new 
    OldBut pev(idpev_oldbuttons);
        
        if(
    Weapon != CSW_M4A1)
        {
            if(
    Zoom[id])
                
    ZoomFalse(id);
                
            return 
    FMRES_IGNORED;
        }
        
        if((
    Button IN_ATTACK2) && !(OldBut IN_ATTACK2))
        {
            if(!
    Zoom[id])
                
    ZoomTrue(id);
            
            else
                
    ZoomFalse(idm4a1);
        }
        
        if(
    Zoom[id] && ((Button IN_RELOAD) && (OldBut IN_RELOAD)))  
            
    ZoomFalse(idm4a1);

        if(
    Clip == && Zoom[id])  
            
    ZoomFalse(idm4a1);

        return 
    FMRES_IGNORED;  
    }  

    public 
    PreThink(id)  
    {  
        if(!
    is_user_alive(id))
            return 
    FMRES_IGNORED;
        
        if(
    Zoom[id])
        {
            if(
    get_pcvar_num(cwz_norecoil) && Zoom[id])
                
    set_pev(id,pev_punchangle,{0.0,0.0,0.0});
            if(
    get_pcvar_num(cwz_crosshair))
                
    hide_crosshair(id);
        }

        if(
    get_user_weapon(id) != CSW_M4A1)  
            return 
    FMRES_IGNORED;

        
    set_pev(idpev_buttonpev(id,pev_button) & ~IN_ATTACK2);
        return 
    FMRES_HANDLED;
    }

    public 
    Update(idsendweaponscd_handle)   
    {   
        if(!
    is_user_alive(id) || !get_pcvar_num(cwz_norecoil))
            return 
    FMRES_IGNORED;
        
        if(
    get_pcvar_num(cwz_norecoil) && Zoom[id])
            
    set_cd(cd_handleCD_PunchAngle, {0.0,0.0,0.0});

        return 
    FMRES_HANDLED;
    }  

    stock ZoomTrue(id)
    {  
        
    Zoom[id] = true;
        
    entity_set_string(idEV_SZ_viewmodelzoom);
        
    cs_set_user_zoom(idCS_SET_AUGSG552_ZOOM0);
        
    client_cmd(id"spk weapons/zoom");
    }  

    stock ZoomFalse(idweapon[] = "None")
    {
        
    Zoom[id] = false;
        
    draw_crosshair(id);
        
    cs_set_user_zoom(idCS_RESET_ZOOM0);
        if(!
    equal(weapon"None"))
            
    entity_set_string(idEV_SZ_viewmodelweapon);
    }  

    stock draw_crosshair(index)  
    {  
        
    message_begin(MSG_ONE_UNRELIABLEmsgHideWeapon_index);
        
    write_byte(0);
        
    message_end();
    }

    stock hide_crosshair(index)
    {      
        
    message_begin(MSG_ONE_UNRELIABLEmsgHideWeapon_index);
        
    write_byte(1<<6);
        
    message_end();

    Last edited by PU13|V|4ST3|2_SN1P3R; 22-06-2012 at 23:35.


    Quote Originally Posted by Magnum44 View Post
    YEEEEEEEES! FINALLY! THANK YOU! THE BEST PLUGIN JUST BECAME PERFECT!!!

    I cant thank you in some way, but i hope Serbia wins World Championship in soccer...some day!

    And i can recommend this: http://www.moddb.com/mods/brutal-doom .

    Thank you!

  26. #26
    Senior Member Array
    Join Date
    Apr 2012
    Location
    194.106.167.94:28033
    Karma
    8

    Default

    Quote Originally Posted by PU13|V|4ST3|2_SN1P3R View Post
    PHP Code:
    #include <amxmodx>   
    #include <engine>  
    #include <fakemeta>  
    #include <cstrike>  

    #define PLUGIN    "CoD Weapons Zooms"
    #define VERSION    "1.3.1" 
    #define AUTHOR    "CeLeS"
    #define EDITER    "SNIPER"
    #define VAR    "cwzCS"

    #define MAX 32

    new zoom[] = "models/champion_cod/zoom2.mdl";
    new 
    m4a1[] = "models/champion_cod/v_m4a1.mdl";
      
    new 
    cwz_norecoil;
    new 
    cwz_crosshair;  

    new 
    msgHideWeapon;

    new 
    boolZoom[MAX+1];

    public 
    plugin_init()
    {
        
    register_plugin(PLUGINVERSIONAUTHOR);
        
    register_cvar(VAR, VERSION, (FCVAR_SERVER|FCVAR_SPONLY));
        
        
    register_forward(FM_CmdStart"CmdStart" );
        
    register_forward(FM_PlayerPreThink"PreThink");
        
    register_forward(FM_UpdateClientData"Update"1);
        
        
    register_event("CurWeapon""CurWeapon""be""1=1");
        
        
    cwz_norecoil register_cvar("cod_norecoil""1");
        
    cwz_crosshair register_cvar("cod_hidecrosshair""1");
        
        
    msgHideWeapon get_user_msgid("HideWeapon");
    }  

    public 
    plugin_precache()
    {
        
    precache_model(zoom);
        
    precache_model(m4a1);
    }

    public 
    CurWeapon(id)  
    {  
        if(!
    is_user_alive(id) || !is_user_connected(id))
            return 
    PLUGIN_CONTINUE;
            
        if(
    get_user_weapon(id) == CSW_M4A1 && Zoom[id] == false)
            
    entity_set_string(idEV_SZ_viewmodelm4a1);
        
        return 
    PLUGIN_CONTINUE;
    }  

    public 
    CmdStart(iduc_handle)
    {
        if(!
    is_user_connected(id))
            return 
    FMRES_IGNORED;
            
        if(!
    is_user_alive(id))
        {  
            
    ZoomFalse(id);
            return 
    FMRES_IGNORED;
        } 
        
        new 
    ClipWeapon get_user_weapon(idClip);
        new 
    Button get_uc(uc_handleUC_Buttons);
        new 
    OldBut pev(idpev_oldbuttons);
        
        if(
    Weapon != CSW_M4A1)
        {
            if(
    Zoom[id])
                
    ZoomFalse(id);
                
            return 
    FMRES_IGNORED;
        }
        
        if((
    Button IN_ATTACK2) && !(OldBut IN_ATTACK2))
        {
            if(!
    Zoom[id])
                
    ZoomTrue(id);
            
            else
                
    ZoomFalse(idm4a1);
        }
        
        if(
    Zoom[id] && ((Button IN_RELOAD) && (OldBut IN_RELOAD)))  
            
    ZoomFalse(idm4a1);

        if(
    Clip == && Zoom[id])  
            
    ZoomFalse(idm4a1);

        return 
    FMRES_IGNORED;  
    }  

    public 
    PreThink(id)  
    {  
        if(!
    is_user_alive(id))
            return 
    FMRES_IGNORED;
        
        if(
    Zoom[id])
        {
            if(
    get_pcvar_num(cwz_norecoil) && Zoom[id])
                
    set_pev(id,pev_punchangle,{0.0,0.0,0.0});
            if(
    get_pcvar_num(cwz_crosshair))
                
    hide_crosshair(id);
        }

        if(
    get_user_weapon(id) != CSW_M4A1)  
            return 
    FMRES_IGNORED;

        
    set_pev(idpev_buttonpev(id,pev_button) & ~IN_ATTACK2);
        return 
    FMRES_HANDLED;
    }

    public 
    Update(idsendweaponscd_handle)   
    {   
        if(!
    is_user_alive(id) || !get_pcvar_num(cwz_norecoil))
            return 
    FMRES_IGNORED;
        
        
    set_cd(cd_handleCD_PunchAngle, {0.0,0.0,0.0});
        return 
    FMRES_HANDLED;
    }  

    stock ZoomTrue(id)
    {  
        
    Zoom[id] = true;
        
    entity_set_string(idEV_SZ_viewmodelzoom);
        
    cs_set_user_zoom(idCS_SET_AUGSG552_ZOOM0);
        
    client_cmd(id"spk weapons/zoom");
    }  

    stock ZoomFalse(idweapon[] = "None")
    {
        
    Zoom[id] = false;
        
    draw_crosshair(id);
        
    cs_set_user_zoom(idCS_RESET_ZOOM0);
        if(!
    equal(weapon"None"))
            
    entity_set_string(idEV_SZ_viewmodelweapon);
    }  

    stock draw_crosshair(index)  
    {  
        
    message_begin(MSG_ONE_UNRELIABLEmsgHideWeapon_index);
        
    write_byte(0);
        
    message_end();
    }

    stock hide_crosshair(index)
    {      
        
    message_begin(MSG_ONE_UNRELIABLEmsgHideWeapon_index);
        
    write_byte(1<<6);
        
    message_end();

    Sada je ok, nema vise zute i polu plave boje zoom-a kada nanisanis, ali sada se javlja drugi "bag":

    Sada citava m4a1 puska ima no recoil i kada priblizim zoom i kada ne uvecam zoomom u opste, sto stvara probleme, stavim amx_cvar cod_norecoil na "0" i m4a1 je ok, trese se kako bi i trebao ali onda zoom pocne da luduje, trese se ne noramalno i nemas teorije da pogodis igraca ( prakticno kao da nisi ni priblizio ) ... Ako mozes probaj da sredis to i K++
    Killing Floor COD:MW2[FAST XP]
    194.106.167.94:28033




    -Moji radovi :

    - Lag & Fps fixer plugin
    - Lotto plugin
    - WeaponShortcut plugin
    - SpeedStop plugin

  27. #27
    Senior Member Array
    Join Date
    Jul 2011
    Location
    Zajecar, Srbija
    Karma
    11

    Default

    Quote Originally Posted by BornToFrag View Post
    Sada je ok, nema vise zute i polu plave boje zoom-a kada nanisanis, ali sada se javlja drugi "bag":

    Sada citava m4a1 puska ima no recoil i kada priblizim zoom i kada ne uvecam zoomom u opste, sto stvara probleme, stavim amx_cvar cod_norecoil na "0" i m4a1 je ok, trese se kako bi i trebao ali onda zoom pocne da luduje, trese se ne noramalno i nemas teorije da pogodis igraca ( prakticno kao da nisi ni priblizio ) ... Ako mozes probaj da sredis to i K++
    Zaboravio sam da stavim proveru za cvar i zoom. Update u prethodnom postu.


    Quote Originally Posted by Magnum44 View Post
    YEEEEEEEES! FINALLY! THANK YOU! THE BEST PLUGIN JUST BECAME PERFECT!!!

    I cant thank you in some way, but i hope Serbia wins World Championship in soccer...some day!

    And i can recommend this: http://www.moddb.com/mods/brutal-doom .

    Thank you!

  28. #28
    Junior Member Array
    Join Date
    Apr 2013
    Karma
    0

    Default

    Ja nemam u models to champion_cod

  29. #29
    Member Array
    Join Date
    Feb 2012
    Location
    Srbija, Kragujevac
    Karma
    8

    Default

    Izvinite sto otvaram opet ovaj post,

    Kada sam instalirao za m4a1 ovaj plugin tj. IronSight je perfektno radio a kada sam stavio za ak47 i m4a1 onda mi je ovakvo
    . Ako neko zna u cemu je probelem nek pomogne Hvala.
    -------------------------------------------> HEJ TI ! DA, DA TI ! PROVERI ZASTO SMO NAJBOLJI ! <----------------------------------------------


  30. #30

    Default

    Probaj da za ak47 promenis ovo #define PLUGIN "Cod Weapons Zooms" u recimo #define PLUGIN "Cod Weapons ak47 Zooms"

  31. #31
    Super Moderator Array klipica's Avatar
    Join Date
    Apr 2010
    Karma
    30

    Default

    Quote Originally Posted by zombie attack View Post
    Probaj da za ak47 promenis ovo #define PLUGIN "Cod Weapons Zooms" u recimo #define PLUGIN "Cod Weapons ak47 Zooms"
    Ime plugina nema veze sa njegovom funkcijom...

  32. #32

    Default

    Quote Originally Posted by klipica View Post
    Ime plugina nema veze sa njegovom funkcijom...
    ali ako je ubacio dva ista plugina a samo je u jednom editovao da radi za ak47 onda mozda ima veze ?

  33. #33
    Super Moderator Array klipica's Avatar
    Join Date
    Apr 2010
    Karma
    30

    Default

    Quote Originally Posted by zombie attack View Post
    ali ako je ubacio dva ista plugina a samo je u jednom editovao da radi za ak47 onda mozda ima veze ?
    Ne, ime plugina sluzi samo za registrovanje i prikaz u amx_plugins cini mi se. Za ostale funkcije se koristi ime fajla/id plugina dobijen trazenjem fajla, a ne imena plugina. Tako da ne bih rekao da ima ikakve veze.

  34. #34

    Default

    Quote Originally Posted by klipica View Post
    Ne, ime plugina sluzi samo za registrovanje i prikaz u amx_plugins cini mi se. Za ostale funkcije se koristi ime fajla/id plugina, a ne imena plugina. Tako da ne bih rekao da ima ikakve veze.
    Pomoslio sam da ukoliko je tako uradio da ce se ta dva plugina podudarati i smetati jedan drugome jer imaju sve iste stavke sem te puske koja je na jednom ak na drugom m4.

    PS:Mil00s-e obrisi inbox
    Last edited by zombie attack; 19-12-2013 at 01:48.

  35. #35
    Member Array
    Join Date
    Feb 2012
    Location
    Srbija, Kragujevac
    Karma
    8

    Default

    Pa sta da uradim sad?
    -------------------------------------------> HEJ TI ! DA, DA TI ! PROVERI ZASTO SMO NAJBOLJI ! <----------------------------------------------


  36. #36

    Default

    Quote Originally Posted by Loading.Pro View Post
    Pa sta da uradim sad?
    A jesi ubacio dva ista plugina samo si promenio za koje puske da bude zoom ili kako?

  37. #37
    Member Array
    Join Date
    Feb 2012
    Location
    Srbija, Kragujevac
    Karma
    8

    Default

    napravio novi amxx od ovog i napravio novi folder champion_cod unutra model moj v_ak47 zoom2 i m4a1
    Code:
    #include <amxmodx>  
    #include <engine> 
    #include <fakemeta> 
    #include <cstrike> 
    
    #define PLUGIN "Cod Weapons Zooms" 
    #define VERSION "1.3" 
    #define AUTHOR "CeLeS" 
    
    new const zoom[] = "models/champion_cod/zoom2.mdl"; 
    new const m4a1[] = "models/champion_cod/v_m4a1.mdl"; 
    new const ak47[] = "models/champion_cod/v_ak47.mdl"; 
    
    new g_hasZoom[32]; 
    new bool:norecoil[33]; 
    new szClip, szAmmo, cwz_norecoil; 
    
    public plugin_init( ) 
    { 
        register_plugin(PLUGIN, VERSION, AUTHOR) 
         
        register_forward(FM_CmdStart, "fw_CmdStart" ) 
        register_forward(FM_PlayerPreThink,"fw_Player_PreThink") 
        register_forward(FM_PlayerPreThink,"fw_PreThink") 
        register_forward(FM_UpdateClientData,"fw_Update",1) 
         
        register_event("CurWeapon", "Event_CurWeapon", "be", "1=1") 
         
        cwz_norecoil = register_cvar("cod_norecoil", "1") 
    } 
    
    public plugin_precache( ) 
    { 
        precache_model(zoom); 
        precache_model(m4a1); 
        precache_model(ak47); 
    } 
    
    public Event_CurWeapon(id) 
    { 
        if(!is_user_alive(id) || !is_user_connected(id))  
            return PLUGIN_CONTINUE 
         
        new szWeapID = get_user_weapon( id, szClip, szAmmo ) 
        if(szWeapID == CSW_M4A1 && !g_hasZoom[id] == true ) 
        { 
            entity_set_string(id, EV_SZ_viewmodel, m4a1) 
        } 
        if(szWeapID == CSW_AK47 && !g_hasZoom[id] == true ) 
        { 
            entity_set_string(id, EV_SZ_viewmodel, ak47) 
        } 
        return PLUGIN_CONTINUE; 
    } 
    
    public fw_CmdStart( id, uc_handle, seed ) 
    { 
        if(!is_user_alive(id) )  
        { 
            ZoomFalse(id) 
            return PLUGIN_HANDLED 
        } 
         
        new szWeapID = get_user_weapon( id, szClip, szAmmo ) 
         
        if((get_uc( uc_handle, UC_Buttons ) & IN_ATTACK2 ) && !( pev( id, pev_oldbuttons ) & IN_ATTACK2 ) ) 
        {  
            if((szWeapID == CSW_M4A1 || szWeapID == CSW_AK47) && !g_hasZoom[id] == true) 
            { 
                ZoomTrue(id) 
            } 
             
            else if((szWeapID == CSW_M4A1 || szWeapID == CSW_AK47) && g_hasZoom[id]) 
            { 
                ZoomFalse(id) 
                entity_set_string(id, EV_SZ_viewmodel, m4a1) 
            } 
        } 
         
        if(g_hasZoom[id] && ( ( get_uc( uc_handle, UC_Buttons ) & IN_RELOAD ) && (pev(id, pev_button) & IN_RELOAD)) ) 
        { 
            if(szWeapID == CSW_M4A1 ) 
            { 
                ZoomFalse(id) 
                entity_set_string(id, EV_SZ_viewmodel, m4a1) 
            } 
            if(szWeapID == CSW_AK47 ) 
            { 
                ZoomFalse(id) 
                entity_set_string(id, EV_SZ_viewmodel, ak47) 
            } 
        } 
        if((szWeapID != CSW_M4A1 || szWeapID != CSW_AK47) && g_hasZoom[id] ) 
        { 
            ZoomFalse(id) 
        } 
        if(szClip == 0 && g_hasZoom[id]) 
        { 
            ZoomFalse(id) 
        } 
        return PLUGIN_HANDLED 
    } 
    
    public fw_Player_PreThink(id) 
    { 
        if(!is_user_alive(id) || get_user_weapon(id) != CSW_M4A1 && get_user_weapon(id) != CSW_AK47) 
        { 
            return FMRES_IGNORED; 
        } 
        set_pev(id, pev_button, pev(id,pev_button) & ~IN_ATTACK2)  
        return FMRES_HANDLED; 
    } 
    
    public fw_PreThink(id) 
    { 
        if(!is_user_alive(id) || norecoil[id] == false) 
        { 
            return FMRES_IGNORED; 
        } 
        set_pev(id,pev_punchangle,{0.0,0.0,0.0}); 
        return FMRES_HANDLED; 
    } 
    
    public fw_Update(id, sendweapons, cd_handle)  
    {  
        if(!is_user_alive(id) || norecoil[id] == false) 
        { 
            return FMRES_IGNORED; 
        } 
         
        set_cd(cd_handle, CD_PunchAngle, {0.0,0.0,0.0})         
        return FMRES_HANDLED  
    } 
    
    public ZoomTrue(id) 
    { 
        if(get_pcvar_num(cwz_norecoil) == 1) 
        { 
            norecoil[id] = true 
        } 
        g_hasZoom[id] = true 
        entity_set_string(id, EV_SZ_viewmodel, zoom)  
        cs_set_user_zoom(id, CS_SET_AUGSG552_ZOOM, 0) 
        client_cmd(id, "spk weapons/zoom") 
    } 
    
    public ZoomFalse(id) 
    { 
        norecoil[id] = false; 
        g_hasZoom[id] = false 
        cs_set_user_zoom(id, CS_RESET_ZOOM, 0) 
    }
    -------------------------------------------> HEJ TI ! DA, DA TI ! PROVERI ZASTO SMO NAJBOLJI ! <----------------------------------------------


  38. #38

    Default

    Najbolje probaj da original plugin ubacis za m4a1 a sam editujes sma za ak47 i onda ubacis dva plugina s'tim sto ces za ak47 morati da svuda gde pise CSW_M4A1 stavis SCW_AK47

  39. #39

    Default

    kada stavim ovo sa ak47 sto si napravio rusi servera a bez nerusi probaj sredit to

  40. #40
    VIP Member Array Megastorm's Avatar
    Join Date
    Sep 2011
    Location
    Tokyo, Japan
    Age
    24
    Karma
    35

    Default

    Quote Originally Posted by T@T@ LUDI oroz View Post
    kada stavim ovo sa ak47 sto si napravio rusi servera a bez nerusi probaj sredit to
    Ludi covek da specijalno zbog tebe brlja sta...
    Ako ti treba,potrudi se i ispravi sam,a ne da za sve trazis po forumu da ti neko drugi resi i slicno.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •