Raised This Month: $ Target: $400
 0% 

Zoom


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
AwesomeMan
Member
Join Date: Jun 2013
Old 07-25-2013 , 06:57   Zoom
Reply With Quote #1

Hello, I want a player to unzoom when they change a weapon. As I made ak47 zoomable, works great but when player changes weapon it doesnt unzoom, it keeps the zoom. Heres the code i tried for unzooming while weapon change;

Code:
public event_curweapon(id)
{
	new gun = read_data(2)
	
	if((gun != CSW_AK47 && g_hasZoom[id])) {
		g_hasZoom[ id ] = false
		cs_set_user_zoom(id,CS_RESET_ZOOM,0)
	}
}
also, it does set g_hasZoom[id] to false but it doesnt unzoom.

In plugin_init
register_event("CurWeapon", "event_curweapon", "be", "1=1")
and this to set zoom on ATTACK2:
cs_set_user_zoom( id, CS_SET_AUGSG552_ZOOM, 0 )
AwesomeMan 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 06:20.


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