Raised This Month: $ Target: $400
 0% 

[Solved] Disable zoom on Awp


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 05-22-2007 , 09:32   [Solved] Disable zoom on Awp
Reply With Quote #1

Hi,

Is there a way to disable zoom (x2 & x3) on awp please?

If it's possible, how ?


Thanks!


EDIT : ha. I think that I can use "cs_set_user_zoom()" function with CS_SET_NO_ZOOM. I'm testing.
__________________

Last edited by Arkshine; 05-22-2007 at 14:36. Reason: Solved.
Arkshine is offline
Old 05-22-2007, 09:47
regalis
This message has been deleted by regalis. Reason: weird weird...0o
regalis
Veteran Member
Join Date: Jan 2007
Location: F*cking Germany
Old 05-22-2007 , 10:06   Re: Disable zoom on Awp
Reply With Quote #2

Code:
#include <amxmodx>
#include <amxmisc>
#include <engine>

public plugin_init()
{
    register_event("SetFOV", "eventSetFOV", "b")
}

public eventSetFOV(id)
{
  client_print(id, print_chat, "* Your FOV is: %i", read_data(1));
  log_amx("zoomed");
  new ammo,clip;
  new WeaponNum = get_user_weapon(id, ammo, clip);
  if(WeaponNum == CSW_AWP)
  {
          log_amx("awp zoomed");
      message_begin(MSG_ONE, get_user_msgid("SetFOV"), {0,0,0}, id);
      write_byte(90);
      message_end(); 
  }
}
This works, have tested....weird!
__________________
regalis is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 05-22-2007 , 10:41   Re: Disable zoom on Awp
Reply With Quote #3

It works but you're still zoom even if you can't see zoom. (slow speed with FOV set to 40 / 10)
__________________
Arkshine is offline
regalis
Veteran Member
Join Date: Jan 2007
Location: F*cking Germany
Old 05-22-2007 , 10:45   Re: Disable zoom on Awp
Reply With Quote #4

maybe set player speed!?
set_user_maxspeed(id, 210.0)
That should do the trick ;)
__________________
regalis is offline
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 05-22-2007 , 13:35   Re: Disable zoom on Awp
Reply With Quote #5

maybe this?

*Or you can make it in client_prethink()...and check if he have AWP set "No zoom" else return ! *

Later EDIT: Oh teame06...:/ ,i think you'r right!
Attached Files
File Type: sma Get Plugin or Get Source (no_zoom.sma - 853 views - 957 Bytes)
__________________
Still...lovin' . Connor noob! Hello

Last edited by Alka; 05-22-2007 at 13:52.
Alka is offline
teame06
i have a hat
Join Date: Feb 2005
Location: Hat City
Old 05-22-2007 , 13:45   Re: Disable zoom on Awp
Reply With Quote #6

Quote:
Originally Posted by Alka View Post
maybe this?

*Or you can make it in client_prethink()...and check if he have AWP set "No zoom" else return ! *
I would hook CurWeapon. When they change to an awp set there zoom to CS_SET_NO_ZOOM. Once the weapon is change to another weapon than awp set reset it back to CS_RESET_ZOOM. So they can normally zoom on other weapons. Use an array see if they are set to no zoom or not on awp.

btw once they are set in CS_SET_NO_ZOOM they won't be able to change their zoom even if they change their weapon. Till you unset them
__________________
No private support via Instant Message
GunGame:SM Released

Last edited by teame06; 05-22-2007 at 13:48.
teame06 is offline
Send a message via AIM to teame06
regalis
Veteran Member
Join Date: Jan 2007
Location: F*cking Germany
Old 05-22-2007 , 14:14   Re: Disable zoom on Awp
Reply With Quote #7

What do you have against set_FOV?
Works fine for me
__________________
regalis is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 05-22-2007 , 14:36   Re: Disable zoom on Awp
Reply With Quote #8

Thanks Regalis, Alka, team06. ;)
__________________
Arkshine is offline
Reply


Thread Tools
Display Modes

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 10:43.


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