Raised This Month: $ Target: $400
 0% 

change zoom mode


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
abē
Member
Join Date: Dec 2008
Old 12-30-2008 , 10:11   Re: change zoom mode
Reply With Quote #4

oh sry, i dont know i will respect these rules next time! thanks 4 advice


i think you dont understand my reason for this plugin

i want the aug/sg522 zoom for awp weapon!

with the code in my 1. post i get this

http://flickcabin.com/public/view/17067


short video packed in gif-file

___


PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>

#define PLUGIN "AWP Smooth Zoom"
#define VERSION "0.1"
#define AUTHOR "ab2"

new register
new awp
new awp2

public plugin_init() 
{
    
register register_plugin(PLUGINVERSIONAUTHOR)
    
awp register_cvar("awp_change""1")
    
awp2 register_event("CurWeapon","awp_change","be","1=1","2=18")
}
   
public 
awp_change(id)
{
    new 
value get_pcvar_num(awp_change);
    if(
value == 1)
        {
            if(
is_user_alive(id) == 0)
            return 
PLUGIN_HANDLED
            
}
        
            {
                if(
cs_get_user_zoom(id) == CS_SET_FIRST_ZOOM)
                
cs_set_user_zoom (id,CS_SET_AUGSG552_ZOOM,1)
            }
        
        else(
cs_get_user_zoom(id) == CS_SET_NO_ZOOM)
        return 
PLUGIN_HANDLED 

sry but i dont know pcvar and with this code i get errors like
symbol is assigned a value that is never used: "register"

im stumped for an answer (translation from german to english ^^)
__________________
+ Karma if helped! Thanks!

Last edited by abē; 12-30-2008 at 10:14.
abē is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 09:16.


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