AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   get_user_money (https://forums.alliedmods.net/showthread.php?t=156091)

Groven 04-30-2011 20:30

get_user_money
 
1 Attachment(s)
Hello,

I'm using cashmod on my server and. I was wondering if anyone can make the money appear where they are real money on Counter-Strike in the right corner.

And it will update real time like when i'm stepping on a cashblock it will be like

+$60

and it updates same with kill.

Thanks!

matsi 04-30-2011 21:56

Re: get_user_money
 
Hook Money message and update hud there. Also you would have to update after you got money from the 'cashblock'.

If you don't know how, search. :wink:

yokomo 04-30-2011 22:01

Re: get_user_money
 
Maybe this can help you:
PHP Code:

#include <amxmodx>
#include <amxmisc>
#include <cstrike>

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

#define ADMIN_MONEY 80
#define USER_MONEY 40

public plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_event"DeathMsg""Event_DeathMsg""a" );
}

public 
Event_DeathMsg()
{
    new 
killer read_data(1);
    
    if (
is_user_admin(killer))
    {
        
cs_set_user_money(killercs_get_user_money(killer)+ADMIN_MONEY)
    }
    else 
cs_set_user_money(killercs_get_user_money(killer)+USER_MONEY)



Groven 05-01-2011 08:22

Re: get_user_money
 
Thakns man!

Gonna try :)

Edit: It wont work.

Hunter-Digital 05-01-2011 10:35

Re: get_user_money
 
Why don't you post this in cashmod's thread ?


All times are GMT -4. The time now is 04:24.

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