AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Hide and Block Money (https://forums.alliedmods.net/showthread.php?t=154935)

neverminde 04-15-2011 13:31

Hide and Block Money
 
I have cut out this from drmanager plugin. Will it block players money?
PHP Code:

#include <amxmodx>
#include <amxmisc>
#include <fakemeta>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"

new g_iMsgMoney

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_event"Money",     "EventMoney",      "b" );
}
public 
EventMoneyid ) {
        
set_pdata_intid115);
        
        
message_beginMSG_ONE_UNRELIABLEg_iMsgMoney_id );
        
write_long );
        
write_byte );
        
message_end( );


And about hiding : For this i use hud_customizer plugin.
http://forums.alliedmods.net/showthr...t=76947&page=3
But I want to use as little as possible code.
I have been trying to cut it too, but there are many errors.

Exolent[jNr] 04-15-2011 16:25

Re: Hide and Block Money
 
Try this:
Code:
#include <amxmodx> #include <fakemeta> #define OFFSET_CSMONEY 115 public plugin_init() {     register_message(get_user_msgid("Money"), "MessageMoney");     register_message(get_user_msgid("HideWeapon"), "MessageHideWeapon"); } public MessageMoney(msgid, dest, id) {     set_pdata_int(id, OFFSET_CSMONEY, 0);     set_msg_arg_int(1, ARG_LONG, 0); } public MessageHideWeapon(msgid, dest, id) {     set_msg_arg_int(1, ARG_BYTE, get_msg_arg_int(1) | (1<<5)); }

neverminde 04-15-2011 16:54

Re: Hide and Block Money
 
Wow, amazingly ! thanks


All times are GMT -4. The time now is 19:57.

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