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

Fast AWP Switch [VIPOnly]


Post New Thread Reply   
 
Thread Tools Display Modes
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 12-15-2021 , 05:19   Re: Fast AWP Switch [VIPOnly]
Reply With Quote #11

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 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)
!! Is used to convert the value to boolean., but "!= 0" is the safer option.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
SHIFT0
Senior Member
Join Date: Apr 2021
Location: Palestine
Old 12-15-2021 , 05:44   Re: Fast AWP Switch [VIPOnly]
Reply With Quote #12

Quote:
Originally Posted by OciXCrom View Post
!! Is used to convert the value to boolean., but "!= 0" is the safer option.
There are no plugin to use what u said xd
__________________
Thank You For Helps
Discord:
null.#0096
https://www.youtube.com/@NullHere/
SHIFT0 is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 12-15-2021 , 06:14   Re: Fast AWP Switch [VIPOnly]
Reply With Quote #13

Quote:
Originally Posted by SHIFT0 View Post
There are no plugin to use what u said xd
I wasn't talking to you.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
SHIFT0
Senior Member
Join Date: Apr 2021
Location: Palestine
Old 12-15-2021 , 06:27   Re: Fast AWP Switch [VIPOnly]
Reply With Quote #14

Quote:
Originally Posted by OciXCrom View Post
I wasn't talking to you.
IK
__________________
Thank You For Helps
Discord:
null.#0096
https://www.youtube.com/@NullHere/
SHIFT0 is offline
Yusochan
Member
Join Date: Sep 2021
Location: Algeria
Old 12-15-2021 , 07:41   Re: Fast AWP Switch [VIPOnly]
Reply With Quote #15

Quote:
Originally Posted by Supremache View Post
They will do the same thing but i said these notes for make him optimize his code
Well, thank you for this !

But, I wanted to show him another way to do this and also your code was right.
__________________
<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 , 07:52   Re: Fast AWP Switch [VIPOnly]
Reply With Quote #16

What can i use then ??
no plugin solved
__________________
Thank You For Helps
Discord:
null.#0096
https://www.youtube.com/@NullHere/
SHIFT0 is offline
iceeedr
Veteran Member
Join Date: Apr 2017
Location: Brazil
Old 12-15-2021 , 12:48   Re: Fast AWP Switch [VIPOnly]
Reply With Quote #17

Both code #3 and #4 should be working.
__________________


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/
iceeedr is offline
Send a message via Skype™ to iceeedr
SHIFT0
Senior Member
Join Date: Apr 2021
Location: Palestine
Old 12-15-2021 , 13:03   Re: Fast AWP Switch [VIPOnly]
Reply With Quote #18

Quote:
Originally Posted by iceeedr View Post
Both code #3 and #4 should be working.
Does not understand bro !
__________________
Thank You For Helps
Discord:
null.#0096
https://www.youtube.com/@NullHere/
SHIFT0 is offline
SHIFT0
Senior Member
Join Date: Apr 2021
Location: Palestine
Old 12-15-2021 , 16:40   Re: Fast AWP Switch [VIPOnly]
Reply With Quote #19

Quote:
Originally Posted by iceeedr View Post
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:
Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2013 ITB CompuPhase, AMX Mod X Team

Warning: Tag mismatch on line 52
Error: Expected token: ")", but found "return" on line 52

1 Error.
Could not locate output file D:\AMX Mod X\amxxstudio\Untitled.amx (compile failed).
__________________
Thank You For Helps
Discord:
null.#0096
https://www.youtube.com/@NullHere/

Last edited by SHIFT0; 12-15-2021 at 16:41. Reason: Failed
SHIFT0 is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 12-15-2021 , 17:03   Re: Fast AWP Switch [VIPOnly]
Reply With Quote #20

Missing bracket ")" in the end of the line.
At least try to read the error.
__________________

Last edited by OciXCrom; 12-15-2021 at 17:03.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
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:48.


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