AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   ZooM Help (https://forums.alliedmods.net/showthread.php?t=173776)

Menethil 12-10-2011 10:43

ZooM Help
 
i have this
PHP Code:

public function(id)
{    

        
    new 
weaponid get_user_weapon(id);
    new 
button pev(idpev_button);
    
    if(
weaponid == an weapon)
    {    

        if(
button IN_ATTACK)
        {        
           
// do something
        
}
        else if(
button IN_ATTACK2)
        {
            
cs_set_user_zoomidCS_SET_AUGSG552_ZOOM)
        }
        
    }
    return 
PLUGIN_CONTINUE;


How do i modifiy , when i click 2 ( IN_ATTACK2) pressed to set / remove zoom ?
This is just setting, so i need to remove it on next click2

Nyuszy 12-11-2011 04:59

Re: ZooM Help
 
PHP Code:

new bool:gZoom[33]

public function(
id)

    new 
weaponid get_user_weapon(id);
    new 
button pev(idpev_button);
    
    if(
weaponid == an weapon)
    {    
        if(
button IN_ATTACK)
        {        
           
// do something
        
}
        else if(
button IN_ATTACK2)
        {
            if(!
gZoom[id])
            {
                
cs_set_user_zoomidCS_SET_AUGSG552_ZOOM)
                
gZoom[id] = true
            
}
            else
            {
                
cs_set_user_zoomidCS_RESET_ZOOM)
                
gZoom[id] = false
            
}
        }
        
    }
    return 
PLUGIN_CONTINUE;



Menethil 12-11-2011 05:14

Re: ZooM Help
 
Seems not working this way.
I've tested and nothing happens , my logical is down

Menethil 12-14-2011 13:24

Re: ZooM Help
 
bump, anyone ?

joshknifer 12-14-2011 13:33

Re: ZooM Help
 
Did you search for zoom? there are a lot of scripts that may help you.

http://forums.alliedmods.net/showthr...highlight=zoom

Menethil 12-14-2011 13:44

Re: ZooM Help
 
damn, because of the undetailed titles i could find what i needed. Still nothing for CurWeapon .
I need just for 1 specific weapon not for all, no reloading, no nothing. only zoom/unzoom.

joshknifer 12-14-2011 14:23

Re: ZooM Help
 
Idk if this will help, but this is zoom related and weapon specific.

http://forums.alliedmods.net/showthr...block+awp+zoom

Edit:

Also this one:
http://forums.alliedmods.net/showthr...ght=block+zoom

Menethil 12-14-2011 15:04

Re: ZooM Help
 
This two just u posted, are for blocking secondaryattack/attack2/click2 , nothing related for setting 2 functions ( zoom/unzoom ) on same button.

joshknifer 12-14-2011 17:03

Re: ZooM Help
 
I dont understand what you are looking for then. In CS, zoom is secondary attack to zoom in, secondary attack to double zoom, and then secondary attack to unzoom. What are you trying to do/Why? Be more specific.

drekes 12-14-2011 18:42

Re: ZooM Help
 
Quote:

Originally Posted by joshknifer (Post 1613271)
I dont understand what you are looking for then. In CS, zoom is secondary attack to zoom in, secondary attack to double zoom, and then secondary attack to unzoom. What are you trying to do/Why? Be more specific.

He wants to block only the double zoom.

@OP:
I'll see what i can do.


All times are GMT -4. The time now is 11:56.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.