Raised This Month: $ Target: $400
 0% 

Solved [ H3LP ] Scout FOV ?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 06-22-2017 , 12:50   [ H3LP ] Scout FOV ?
Reply With Quote #1

Hello, I want to change the ROF of scout, it's working fine but if I shoot while zoom is activeted and then change to other weapon, the fov continue. I am using Arkshine code:

Code:
#include <amxmodx> #include <fakemeta> #include <hamsandwich> const m_pPlayer         = 41; const m_flPrimaryAttack = 46; const m_iFOV            = 363; const m_iClientFOV      = 364; new pCvarRof; public plugin_init () {     register_plugin( "Custom Scout ROF", "1.0.0" , "Arkshine" );     RegisterHam( Ham_Weapon_PrimaryAttack, "weapon_scout", "CScout_PrimaryAttack", 1 );         pCvarRof = register_cvar( "scout_rof", "0.25" ); } public CScout_PrimaryAttack ( const Entity ) {     static Player;     Player = get_pdata_cbase( Entity, m_pPlayer );         set_pdata_int( Player, m_iClientFOV, get_pdata_int( Player, m_iFOV ) );     set_pdata_float( Entity, m_flPrimaryAttack, get_pcvar_float( pCvarRof ), 4 ); }
__________________









Last edited by CrazY.; 06-27-2017 at 12:25.
CrazY. is offline
eyal282
Veteran Member
Join Date: Aug 2011
Old 06-22-2017 , 13:40   Re: [ H3LP ] Scout FOV ?
Reply With Quote #2

I have literally no idea what you are trying but this might work if you understood your code.
PHP Code:
register_event("CurWeapon""Event_CurWeapon""be""1=1");    

public 
Event_CurWeapon(id)
{
    if(
get_user_weapon(id) != CSW_SCOUT)
    {
         
// Code Here
         
SetUserDab(id1);
    } 


Last edited by eyal282; 06-22-2017 at 13:40.
eyal282 is offline
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 06-22-2017 , 14:32   Re: [ H3LP ] Scout FOV ?
Reply With Quote #3

I am trying increase scout rate of fire (ROF), it's working but have a bug with the scope, if I active scope, shoot and then change to another weapon, the scope continue enabled. I want to disable the scope when player change the weapon.
__________________









Last edited by CrazY.; 06-22-2017 at 14:33.
CrazY. is offline
baneado
Veteran Member
Join Date: Dec 2012
Location: amxmodx-es.com
Old 06-22-2017 , 15:52   Re: [ H3LP ] Scout FOV ?
Reply With Quote #4

Restore m_iClientFOV after switch weapon.
You can do it with Ham_Item_Deploy, but you must hook all the weapons
baneado is offline
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 06-22-2017 , 18:06   Re: [ H3LP ] Scout FOV ?
Reply With Quote #5

Ok, I will try.
__________________








CrazY. is offline
PRoSToTeM@
Veteran Member
Join Date: Jan 2010
Location: Russia, Ivanovo
Old 06-27-2017 , 10:02   Re: [ H3LP ] Scout FOV ?
Reply With Quote #6

Code:
set_pdata_int( Player, m_iClientFOV, get_pdata_int( Player, m_iFOV ) );
->
Code:
const m_bResumeZoom = 440/4; if (bool:get_pdata_int(Player, m_bResumeZoom)) {     set_pdata_int(Player, m_bResumeZoom, false);     const m_iLastZoom = 436/4;     set_pdata_int(Player, m_iFOV, get_pdata_int(Player, m_iLastZoom)); }
__________________
PRoSToTeM@ is offline
Send a message via ICQ to PRoSToTeM@ Send a message via Skype™ to PRoSToTeM@
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 06-27-2017 , 10:34   Re: [ H3LP ] Scout FOV ?
Reply With Quote #7

Yeah, it's working. Thanks prostotema!
__________________








CrazY. is offline
Reply



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 22:44.


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