Raised This Month: $51 Target: $400
 12% 

Fast AWP Switch [VIPOnly]


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
SHIFT0
Senior Member
Join Date: Apr 2021
Location: Palestine
Old 12-14-2021 , 17:40   Fast AWP Switch [VIPOnly]
Reply With Quote #1

Fast AWP Switch [VIPOnly]
FLAG "t"
ADMIN_LEVEL_H

PHP Code:
/**
 *
 * Fast Sniper Switch (Awp Fast Switch)
 *  by Numb
 *
 *
 * Description:
 *  This plugins brings back the old feature from CS1.5 times.
 *  You were able to shoot a bullet with awp or scout, switch to
 *  knife or any other weapon really fast, and then switch back again.
 *  In result you get that you can fire your next bullet faster than
 *  if you would have waited for original bullet 'reload'.
 *
 *
 * Requires:
 *  FakeMeta
 *  HamSandWich
 *
 *
 * Additional Info:
 *  Tested in Counter-Strike 1.6 with amxmodx 1.8.2 (dev build hg21).
 *
 *
 * ChangeLog:
 *
 *  + 1.3
 *  - Added: Notification that plugin is active on the server.
 *  - Changed: Code now has original pdata offset names.
 *
 *  + 1.2
 *  - Cahnged: Plugin uses less resources.
 *
 *  + 1.1
 *  - Changed: Support for quake-style-switch plugin no longer needed (removed).
 *
 *  + 1.0
 *  - First release.
 *
 *
 * Downloads:
 *  Amx Mod X forums: http://forums.alliedmods.net/showthread.php?p=1193990#post1193990
 *
**/

// ----------------------------------------- CONFIG START -----------------------------------------

// Delay for awp fast switch (in cs1.5 it was 0.75 like any other weapon)
#define AWP_SWITCH_DELAY 0.75 // default: 0.75

// Delay for scout fast switch (in cs1.5 it was 0.75 like any other weapon)
#define SCOUT_SWITCH_DELAY 0.75 // default: 0.75

// Comment next line if you don't want people to be notified about the plugin
#define PLUGIN_NOTIFICATION // default: uncommented

// ------------------------------------------ CONFIG END ------------------------------------------

#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>

#define PLUGIN_NAME    "Fast Sniper Switch"
#define PLUGIN_VERSION    "1.3"
#define PLUGIN_AUTHOR    "Numb"

#define m_pPlayer               41  // (weapon_*) owner entity
#define m_iId                   43  // (weapon_*) type of weapon CSW_
#define m_flNextPrimaryAttack   46  // (weapon_*) next prim attack
#define m_flNextSecondaryAttack 47  // (weapon_*) next sec attack
#define m_flDecreaseShotsFired  76  // (weapon_*) ??? right after Deploy has same value as get_gametime()
#define m_flNextAttack          83  // (player) next attack
#define m_pActiveItem           373 // (player) active weapon


public plugin_init()
{
    
register_plugin(PLUGIN_NAMEPLUGIN_VERSIONPLUGIN_AUTHOR);
    
    
RegisterHam(Ham_Item_Deploy"weapon_awp",   "Ham_Item_Deploy_Post"1);
    
RegisterHam(Ham_Item_Deploy"weapon_scout""Ham_Item_Deploy_Post"1);
    
#if defined PLUGIN_NOTIFICATION
    
register_event("WeapPickup""Event_WeapPickup""be""1=18"); // CSW_AWP
    
register_event("WeapPickup""Event_WeapPickup""be""1=3");  // CSW_SCOUT
#endif
}

#if defined PLUGIN_NOTIFICATION
public Event_WeapPickup(iPlrId)
    
client_print(iPlrIdprint_center"%s%cis active"PLUGIN_NAME13);
#endif

public Ham_Item_Deploy_Post(iEnt)
{
    if( !
pev_valid(iEnt) )
        return 
HAM_IGNORED;
    
    new 
iPlrId get_pdata_cbase(iEntm_pPlayer4);
    if( !
is_user_alive(iPlrId) )
        return 
HAM_IGNORED;
    
    if( 
iEnt!=get_pdata_cbase(iPlrIdm_pActiveItem5) || get_pdata_float(iEntm_flDecreaseShotsFired4)!=get_gametime() )
        return 
HAM_IGNORED;
    
    switch( 
get_pdata_int(iEntm_iId4) )
    {
        case 
CSW_AWP:
        {
            
set_pdata_float(iEntm_flNextPrimaryAttackAWP_SWITCH_DELAY4);
            
set_pdata_float(iEntm_flNextSecondaryAttackAWP_SWITCH_DELAY4);
            
set_pdata_float(iPlrIdm_flNextAttackAWP_SWITCH_DELAY5);
        }
        case 
CSW_SCOUT:
        {
            
set_pdata_float(iEntm_flNextPrimaryAttackSCOUT_SWITCH_DELAY4);
            
set_pdata_float(iEntm_flNextSecondaryAttackSCOUT_SWITCH_DELAY4);
            
set_pdata_float(iPlrIdm_flNextAttackSCOUT_SWITCH_DELAY5);
        }
    }
    
    return 
HAM_IGNORED;

SHIFT0 is offline
Nutu_
AlliedModders Donor
Join Date: Mar 2016
Location: Germany
Old 12-14-2021 , 18:42   Re: Fast AWP Switch [VIPOnly]
Reply With Quote #2

PHP Code:
#if defined PLUGIN_NOTIFICATION
public Event_WeapPickup(iPlrId) {
    if (
get_user_flags(iPlrId) & ADMIN_LEVEL_H) {
        
client_print(iPlrIdprint_center"%s%cis active"PLUGIN_NAME13);
    }
    else {
        
client_print(iPlrIdprint_center"You are not VIP");
    }
}
#endif 
try it
__________________
a simple act of caring creates an endless ripple.
Nutu_ is offline
iceeedr
Veteran Member
Join Date: Apr 2017
Location: Brazil
Old 12-14-2021 , 19:11   Re: Fast AWP Switch [VIPOnly]
Reply With Quote #3

Quote:
Originally Posted by Nutu_ View Post
PHP Code:
#if defined PLUGIN_NOTIFICATION
public Event_WeapPickup(iPlrId) {
    if (
get_user_flags(iPlrId) & ADMIN_LEVEL_H) {
        
client_print(iPlrIdprint_center"%s%cis active"PLUGIN_NAME13);
    }
    else {
        
client_print(iPlrIdprint_center"You are not VIP");
    }
}
#endif 
try it
WTF?

Code:
/* Sublime AMXX Editor v2.2 */
/**
 *
 * Fast Sniper Switch (Awp Fast Switch)
 *  by Numb
 *
 *
 * Description:
 *  This plugins brings back the old feature from CS1.5 times.
 *  You were able to shoot a bullet with awp or scout, switch to
 *  knife or any other weapon really fast, and then switch back again.
 *  In result you get that you can fire your next bullet faster than
 *  if you would have waited for original bullet 'reload'.
 *
 *
 * Requires:
 *  FakeMeta
 *  HamSandWich
 *
 *
 * Additional Info:
 *  Tested in Counter-Strike 1.6 with amxmodx 1.8.2 (dev build hg21).
 *
 *
 * ChangeLog:
 *
 *  + 1.3
 *  - Added: Notification that plugin is active on the server.
 *  - Changed: Code now has original pdata offset names.
 *
 *  + 1.2
 *  - Cahnged: Plugin uses less resources.
 *
 *  + 1.1
 *  - Changed: Support for quake-style-switch plugin no longer needed (removed).
 *
 *  + 1.0
 *  - First release.
 *
 *
 * Downloads:
 *  Amx Mod X forums: http://forums.alliedmods.net/showthread.php?p=1193990#post1193990
 *
**/

// ----------------------------------------- CONFIG START -----------------------------------------

// Delay for awp fast switch (in cs1.5 it was 0.75 like any other weapon)
#define AWP_SWITCH_DELAY 0.75 // default: 0.75

// Delay for scout fast switch (in cs1.5 it was 0.75 like any other weapon)
#define SCOUT_SWITCH_DELAY 0.75 // default: 0.75

// Comment next line if you don't want people to be notified about the plugin
#define PLUGIN_NOTIFICATION // default: uncommented

#define isAdmin(%0) get_user_flags(%0) & ADMIN_LEVEL_H
// ------------------------------------------ CONFIG END ------------------------------------------

#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>

#define PLUGIN_NAME    "Fast Sniper Switch"
#define PLUGIN_VERSION    "1.3"
#define PLUGIN_AUTHOR    "Numb"

#define m_pPlayer               41  // (weapon_*) owner entity
#define m_iId                   43  // (weapon_*) type of weapon CSW_
#define m_flNextPrimaryAttack   46  // (weapon_*) next prim attack
#define m_flNextSecondaryAttack 47  // (weapon_*) next sec attack
#define m_flDecreaseShotsFired  76  // (weapon_*) ??? right after Deploy has same value as get_gametime()
#define m_flNextAttack          83  // (player) next attack
#define m_pActiveItem           373 // (player) active weapon


public plugin_init()
{
    register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR);

    RegisterHam(Ham_Item_Deploy, "weapon_awp",   "Ham_Item_Deploy_Post", 1);
    RegisterHam(Ham_Item_Deploy, "weapon_scout", "Ham_Item_Deploy_Post", 1);

#if defined PLUGIN_NOTIFICATION
    register_event("WeapPickup", "Event_WeapPickup", "be", "1=18"); // CSW_AWP
    register_event("WeapPickup", "Event_WeapPickup", "be", "1=3");  // CSW_SCOUT
#endif
}

#if defined PLUGIN_NOTIFICATION
public Event_WeapPickup(iPlrId)
    client_print(iPlrId, print_center, "%s%cis active", PLUGIN_NAME, 13);
#endif

public Ham_Item_Deploy_Post(iEnt)
{
    if( !pev_valid(iEnt) )
        return HAM_IGNORED;

    new iPlrId = get_pdata_cbase(iEnt, m_pPlayer, 4);

    if( !is_user_alive(iPlrId) || !isAdmin(iPlrId))
        return HAM_IGNORED;
   
    if( iEnt!=get_pdata_cbase(iPlrId, m_pActiveItem, 5) || get_pdata_float(iEnt, m_flDecreaseShotsFired, 4)!=get_gametime() )
        return HAM_IGNORED;

    switch( get_pdata_int(iEnt, m_iId, 4) )
    {
        case CSW_AWP:
        {
            set_pdata_float(iEnt, m_flNextPrimaryAttack, AWP_SWITCH_DELAY, 4);
            set_pdata_float(iEnt, m_flNextSecondaryAttack, AWP_SWITCH_DELAY, 4);
            set_pdata_float(iPlrId, m_flNextAttack, AWP_SWITCH_DELAY, 5);
        }
        case CSW_SCOUT:
        {
            set_pdata_float(iEnt, m_flNextPrimaryAttack, SCOUT_SWITCH_DELAY, 4);
            set_pdata_float(iEnt, m_flNextSecondaryAttack, SCOUT_SWITCH_DELAY, 4);
            set_pdata_float(iPlrId, m_flNextAttack, SCOUT_SWITCH_DELAY, 5);
        }
    }

    return HAM_IGNORED;
}
__________________


Quote:
Originally Posted by fysiks View Post
Please stop trying to help. You appear to just be posting random stuff. Wait until you actually understand more about AMX Mod X and how the game works.
https://iceeedr.com.br/

Last edited by iceeedr; 12-15-2021 at 18:08.
iceeedr is offline
Send a message via Skype™ to iceeedr
Yusochan
Member
Join Date: Sep 2021
Location: Algeria
Old 12-14-2021 , 20:52   Re: Fast AWP Switch [VIPOnly]
Reply With Quote #4

Got it

PHP Code:
/**
 *
 * Fast Sniper Switch (Awp Fast Switch)
 *  by Numb
 *
 *
 * Description:
 *  This plugins brings back the old feature from CS1.5 times.
 *  You were able to shoot a bullet with awp or scout, switch to
 *  knife or any other weapon really fast, and then switch back again.
 *  In result you get that you can fire your next bullet faster than
 *  if you would have waited for original bullet 'reload'.
 *
 *
 * Requires:
 *  FakeMeta
 *  HamSandWich
 *
 *
 * Additional Info:
 *  Tested in Counter-Strike 1.6 with amxmodx 1.8.2 (dev build hg21).
 *
 *
 * ChangeLog:
 *
 *  + 1.3
 *  - Added: Notification that plugin is active on the server.
 *  - Changed: Code now has original pdata offset names.
 *
 *  + 1.2
 *  - Cahnged: Plugin uses less resources.
 *
 *  + 1.1
 *  - Changed: Support for quake-style-switch plugin no longer needed (removed).
 *
 *  + 1.0
 *  - First release.
 *
 *
 * Downloads:
 *  Amx Mod X forums: http://forums.alliedmods.net/showthread.php?p=1193990#post1193990
 *
**/

// ----------------------------------------- CONFIG START -----------------------------------------

// Delay for awp fast switch (in cs1.5 it was 0.75 like any other weapon)
#define AWP_SWITCH_DELAY 0.50 // default: 0.75

// Delay for scout fast switch (in cs1.5 it was 0.75 like any other weapon)
#define SCOUT_SWITCH_DELAY 0.50 // default: 0.75

// Comment next line if you don't want people to be notified about the plugin
#define PLUGIN_NOTIFICATION // default: uncommented

// ------------------------------------------ CONFIG END ------------------------------------------

#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>

#define PLUGIN_NAME    "[CS.NPOWERED.RO] FAST SNIPER SWITCH"
#define PLUGIN_VERSION    "1.3"
#define PLUGIN_AUTHOR    "Numb"

#define m_pPlayer               41  // (weapon_*) owner entity
#define m_iId                   43  // (weapon_*) type of weapon CSW_
#define m_flNextPrimaryAttack   46  // (weapon_*) next prim attack
#define m_flNextSecondaryAttack 47  // (weapon_*) next sec attack
#define m_flDecreaseShotsFired  76  // (weapon_*) ??? right after Deploy has same value as get_gametime()
#define m_flNextAttack          83  // (player) next attack
#define m_pActiveItem           373 // (player) active weapon

#define ADMINACCESS    ADMIN_LEVEL_H

public plugin_init()
{
    
register_plugin(PLUGIN_NAMEPLUGIN_VERSIONPLUGIN_AUTHOR);
    
    
RegisterHam(Ham_Item_Deploy"weapon_awp",   "Ham_Item_Deploy_Post"1);
    
RegisterHam(Ham_Item_Deploy"weapon_scout""Ham_Item_Deploy_Post"1);
    
#if defined PLUGIN_NOTIFICATION
    
register_event("WeapPickup""Event_WeapPickup""be""1=18"); // CSW_AWP
    
register_event("WeapPickup""Event_WeapPickup""be""1=3");  // CSW_SCOUT
#endif
}

#if defined PLUGIN_NOTIFICATION
public Event_WeapPickup(iPlrId)
    
client_print(iPlrIdprint_center"%s%cis active"PLUGIN_NAME13);
#endif

public Ham_Item_Deploy_Post(iEnt)
{
    if( !
pev_valid(iEnt) )
        return 
HAM_IGNORED;
    
    new 
iPlrId get_pdata_cbase(iEntm_pPlayer4);
    if( !
is_user_alive(iPlrId) || !is_user_access(iPlrId))
        return 
HAM_IGNORED;
    
    if( 
iEnt!=get_pdata_cbase(iPlrIdm_pActiveItem5) || get_pdata_float(iEntm_flDecreaseShotsFired4)!=get_gametime() )
        return 
HAM_IGNORED;
    
    switch( 
get_pdata_int(iEntm_iId4) )
    {
        case 
CSW_AWP:
        {
            
set_pdata_float(iEntm_flNextPrimaryAttackAWP_SWITCH_DELAY4);
            
set_pdata_float(iEntm_flNextSecondaryAttackAWP_SWITCH_DELAY4);
            
set_pdata_float(iPlrIdm_flNextAttackAWP_SWITCH_DELAY5);
        }
        case 
CSW_SCOUT:
        {
            
set_pdata_float(iEntm_flNextPrimaryAttackSCOUT_SWITCH_DELAY4);
            
set_pdata_float(iEntm_flNextSecondaryAttackSCOUT_SWITCH_DELAY4);
            
set_pdata_float(iPlrIdm_flNextAttackSCOUT_SWITCH_DELAY5);
        }
    }
    
    return 
HAM_IGNORED;
}

bool:is_user_access(id)
    return !!(
get_user_flags(id) & ADMINACCESS
__________________
<b>IP : <font color=Red>93.115.53.168:27017</font></b>
<b>Founder : <font color=Cyan>YusoChan-</font></b>
Yusochan is offline
SHIFT0
Senior Member
Join Date: Apr 2021
Location: Palestine
Old 12-15-2021 , 04:33   Re: Fast AWP Switch [VIPOnly]
Reply With Quote #5

Ty Guys !
Love u
SHIFT0 is offline
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 12-15-2021 , 04:42   Re: Fast AWP Switch [VIPOnly]
Reply With Quote #6

@Yusochan, Huh ???

Code:
bool:is_user_access(id)
 Two symbols !! ??? why ? ! = is not has access
  !! = is has the access if added without these symbols !! will return is has the access too
 Use this ~ symbol better than using symbol ! and ( bows
 Ex: ...
 if you want to  return X accessreturn get_user_flags(id) & ADMINACCESS
 if you don't want to return X access :  return ~get_user_flags(id) & ADMINACCESS
    return !!(get_user_flags(id) & ADMINACCESS)
__________________
Youtube.com/Supremache

Bank System [Nvault - SQL Support]
VIP System
  • If you think it's that simple, then do it yourself.

Last edited by Supremache; 12-15-2021 at 04:43.
Supremache is offline
SHIFT0
Senior Member
Join Date: Apr 2021
Location: Palestine
Old 12-15-2021 , 04:42   Re: Fast AWP Switch [VIPOnly]
Reply With Quote #7

Quote:
Originally Posted by Supremache View Post
@Yusochan, Huh ???

Code:
bool:is_user_access(id)
 Two symbols !! ??? why ? ! = is not has access
  !! = is has the access if added without !! will return it as has the access
 Use this ~ symbol better than using symbol ! and ( bows
 Ex: ...
 if you want to  return X accessreturn get_user_flags(id) & ADMINACCESS
 if you don't want to return X access :  return ~get_user_flags(id) & ADMINACCESS
    return !!(get_user_flags(id) & ADMINACCESS)

hehehe
SHIFT0 is offline
SHIFT0
Senior Member
Join Date: Apr 2021
Location: Palestine
Old 12-15-2021 , 04:44   Re: Fast AWP Switch [VIPOnly]
Reply With Quote #8

what can i use GUYS ?
SHIFT0 is offline
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 12-15-2021 , 04:48   Re: Fast AWP Switch [VIPOnly]
Reply With Quote #9

They will do the same thing but i said these notes for make him optimize his code
__________________
Youtube.com/Supremache

Bank System [Nvault - SQL Support]
VIP System
  • If you think it's that simple, then do it yourself.
Supremache is offline
SHIFT0
Senior Member
Join Date: Apr 2021
Location: Palestine
Old 12-15-2021 , 04:56   Re: Fast AWP Switch [VIPOnly]
Reply With Quote #10

Quote:
Originally Posted by Supremache View Post
They will do the same thing but i said these notes for make him optimize his code
Ah ok !
__________________
Thank You For Helps
Discord:
null.#0096
https://www.youtube.com/@NullHere/
SHIFT0 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 04:01.


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