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

[REQ] Remove Round Timer, Money and BuyZone


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Lolz0r
Veteran Member
Join Date: Nov 2010
Location: Balgaria
Old 03-10-2015 , 18:34   [REQ] Remove Round Timer, Money and BuyZone
Reply With Quote #1

Hi guys, I have one small plugin by Exolent(after searching...)
Here it the plugin :

PHP Code:
#include <amxmodx>
#include <fakemeta>

#define OFFSET_CSMONEY 115

public plugin_init(){
    
register_plugin("HUD Customizer""0.0.1""Exolent")

    
set_msg_block(get_user_msgid("RoundTime"), BLOCK_SET);
    
register_message(get_user_msgid("Money"), "MessageBlockMoney");
    
register_message(get_user_msgid("HideWeapon"), "MessageHide");
    
register_message(get_user_msgid("StatusIcon"), "MessageStatusIcon");
}

public 
MessageBlockMoney(msgiddestid){
    
set_pdata_int(idOFFSET_CSMONEY0);
    
set_msg_arg_int(1ARG_LONG0);
}

public 
MessageHide(msgiddestid){
    
set_msg_arg_int(1ARG_BYTE, (1<<4) | (1<<5)); 
}

public 
MessageStatusIcon(msgiddestid) {
    static 
icon[8];
    
get_msg_arg_string(2iconcharsmax(icon));
    if(
equal(icon"buyzone")){
        if(
get_msg_arg_int(1)) {
            
set_pdata_int(id235get_pdata_int(id235) & ~(1<<0));
            return 
PLUGIN_HANDLED;
        }
    }
    return 
PLUGIN_CONTINUE;

Here it is the problem : the round timer and money are visible(although zeroed 0)
What is the problem in code ?

Also, do not offer me this https://forums.alliedmods.net/showth...80121?p=680121, please !
Lolz0r is offline
monster321
Member
Join Date: Apr 2012
Old 03-12-2015 , 17:16   Re: [REQ] Remove Round Timer, Money and BuyZone
Reply With Quote #2

Try it.
Code:
#include < amxmodx > #define HUD_HIDE_TIMER (1<<4) #define HUD_HIDE_MONEY (1<<5) // Init public plugin_init() {     register_plugin( "Hide RoundTime & Money", "1.0", "monster321" )         register_event( "ResetHUD", "ev_resethud", "be" )     register_message( get_user_msgid( "HideWeapon" ), "msg_hideweapon" ) } // EV ResetHUD public ev_resethud( id ) {     new hideflags = GetHudHideFlags()         if( hideflags )     {         message_begin( MSG_ONE, get_user_msgid( "HideWeapon" ), _, id )         write_byte( hideflags )         message_end()     } } // MSG HideWeapon public msg_hideweapon() {     new hideflags = GetHudHideFlags()         if( hideflags )         set_msg_arg_int( 1, ARG_BYTE, get_msg_arg_int( 1 ) | hideflags ) } GetHudHideFlags() {     new iFlags;     iFlags |= HUD_HIDE_TIMER;     iFlags |= HUD_HIDE_MONEY;     return iFlags; }

Last edited by monster321; 03-12-2015 at 17:18.
monster321 is offline
Send a message via MSN to monster321 Send a message via Skype™ to monster321
Lolz0r
Veteran Member
Join Date: Nov 2010
Location: Balgaria
Old 03-12-2015 , 18:02   Re: [REQ] Remove Round Timer, Money and BuyZone
Reply With Quote #3

Thanks man !

Can you add and BuyZone remover ?
Lolz0r is offline
Fuck For Fun
Veteran Member
Join Date: Nov 2013
Old 03-12-2015 , 18:28   Re: [REQ] Remove Round Timer, Money and BuyZone
Reply With Quote #4

add this part, to code:
register_message put in public plugin_init
Code:
register_message(get_user_msgid("StatusIcon"), "Msg_StatusIcon");

public Msg_StatusIcon(msgid, msgdest, id) 
{
    static szMsg[8];
    get_msg_arg_string(2, szMsg, 7);
    
    if(equal(szMsg, "buyzone") && get_msg_arg_int(1)) 
    {
        set_pdata_int(id, 235, get_pdata_int(id, 235) & ~(1 << 0));
        return PLUGIN_HANDLED;
    }
    
    return PLUGIN_CONTINUE;
}
Fuck For Fun is offline
Send a message via Skype™ to Fuck For Fun
Lolz0r
Veteran Member
Join Date: Nov 2010
Location: Balgaria
Old 03-12-2015 , 18:48   Re: [REQ] Remove Round Timer, Money and BuyZone
Reply With Quote #5

I added this, and work perfect.

PHP Code:
#include <amxmodx> 

#include <engine> 

#define PLUGIN "No Buy" 
#define VERSION "0.0.1" 

public plugin_init() 

    
register_pluginPLUGINVERSION"ConnorMcLeod" 


public 
plugin_precache() 

    new 
iEnt create_entity("info_map_parameters"
    
DispatchKeyValue(iEnt"buying""3"
    
DispatchSpawn(iEnt

Lolz0r is offline
BhK
Junior Member
Join Date: Dec 2014
Location: India
Old 04-13-2016 , 06:07   Re: [REQ] Remove Round Timer, Money and BuyZone
Reply With Quote #6

Sorry for the late bump!
can any1 tell me how the same can be done with fakemeta ?

Quote:
#include <amxmodx>

#include <engine>

#define PLUGIN "No Buy"
#define VERSION "0.0.1"

public plugin_init()
{
register_plugin( PLUGIN, VERSION, "ConnorMcLeod" )
}

public plugin_precache()
{
new iEnt = create_entity("info_map_parameters")
DispatchKeyValue(iEnt, "buying", "3")
DispatchSpawn(iEnt)
}

Last edited by BhK; 04-13-2016 at 06:08.
BhK is offline
crnova
Senior Member
Join Date: Sep 2015
Old 06-11-2016 , 13:58   Re: [REQ] Remove Round Timer, Money and BuyZone
Reply With Quote #7

Quote:
Originally Posted by BhK View Post
Sorry for the late bump!
can any1 tell me how the same can be done with fakemeta ?
Why do you wanna use fakemeta? engine is much better,
here read this:

https://forums.alliedmods.net/showthread.php?t=88792
__________________

Last edited by crnova; 06-11-2016 at 14:03.
crnova is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 06-11-2016 , 14:46   Re: [REQ] Remove Round Timer, Money and BuyZone
Reply With Quote #8

Quote:
Originally Posted by crnova View Post
Why do you wanna use fakemeta? engine is much better,
here read this:

https://forums.alliedmods.net/showthread.php?t=88792
engine is not much better than fakemeta and fakemeta is not much better than engine. All you have to do is to choose the right module for what you need.

Examples:
When chaning offsets fakemeta is a must.
If you want to hook touch, you should use engine because you can filter the entities.
On things that both modules to the same, it's just the coder choose.

ot was talking about fakemeta conversions of existing modules functions(like fakemeta_util).
__________________

Last edited by HamletEagle; 06-11-2016 at 14:46.
HamletEagle 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 16:52.


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