Raised This Month: $ Target: $400
 0% 

CurWeapon Event


Post New Thread Reply   
 
Thread Tools Display Modes
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 04-10-2024 , 08:46   Re: CurWeapon Event
Reply With Quote #11

Over ex? The flags in English are nice.
__________________
DJEarthQuake is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 04-10-2024 , 12:28   Re: CurWeapon Event
Reply With Quote #12

Either one, but I hesitate to use _ex as some people are using ancient versions of AMX-X and I don’t feel like adding pre-processor directives to keep it compatible across all versions.
__________________
Bugsy is offline
TheVaskov
Member
Join Date: Sep 2021
Location: Russia
Old 04-11-2024 , 07:53   Re: CurWeapon Event
Reply With Quote #13

PHP Code:
#include <amxmodx>
#include <engine>
#include <fakemeta>
#include <fun>
#include <dodx>
#include <dodfun>
#include <hamsandwich>
#pragma semicolon 1

new g_LastWeapon[33] = 0;
new 
msg_ResetHud;

public 
plugin_init(){
register_plugin("DOD Crosshair fix""0.0""America");
msg_ResetHud get_user_msgid("ResetHUD");
register_event("CurWeapon""CurWeapon_P""be""1=1");
}

public 
CurWeapon_P(idx_player)
{  
    new 
weapon read_data(2);
    if (
g_LastWeapon[idx_player]!= weapon)
    { 
    
// weapon changed//  
    
message_begin(MSG_ONE_UNRELIABLEmsg_ResetHud , {0,0,0}, idx_player);
    
message_end();
    
g_LastWeapon[idx_player] = weapon;
    }
    return 
PLUGIN_CONTINUE;



__________________
TheVaskov 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:44.


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