Raised This Month: $63 Target: $400
 15% 

Teammates money display


Post New Thread Reply   
 
Thread Tools Display Modes
^SmileY
Veteran Member
Join Date: Jan 2010
Location: Brazil [<o>]
Old 05-22-2018 , 14:56   Re: Teammates money display
Reply With Quote #21

Quote:
Originally Posted by sekac View Post
I have read the requirements and I was just asking for a 1.8.2 version. Not specifically from you but from anyone here. It's not about me upgrading but a request.
Try it

Code:
#include <amxmodx>
#include <cstrike>

#pragma semicolon 1

new g_pMoney;
new g_pFreezeTime;

new bool:g_bDisplay;

public plugin_init()
{
    register_plugin("Team Money Display","0.0.3","SmileY");

    g_pMoney     = register_cvar("amx_display_money","1");
    g_pFreezeTime     = get_cvar_pointer("mp_freezetime");

    register_logevent("fnRoundStart",2,"1=Round_Start");
    register_logevent("fnRoundEnd",2,"1=Round_End");

    register_clcmd("buy","OnBuy");
}

public fnRoundstart()
{
    g_bDisplay = false;
}

public fnRoundEnd()
{
    g_bDisplay = get_pcvar_num(g_pMoney) ? true : false;
}

public OnBuy(id)
{
    if(g_bDisplay)
    {
        new szTeam[13];
        get_user_team(id,szTeam,charsmax(szTeam));

        new iPlayers[32],iNum,iPlayer;
        get_players(iPlayers,iNum,"aeh",szTeam);

        new szName[32],szHud[512];

        for(new i;i < iNum;i++)
        {
            iPlayer = iPlayers[i];

            get_user_name(iPlayer,szName,charsmax(szName));

            format
            (
                szHud,
                charsmax(szHud),
                "%s%s $ %d^n",
                szHud,
                szName,
                cs_get_user_money(iPlayer)
            );
        }

        new Float:fTime = get_pcvar_float(g_pFreezeTime);

        if(fTime < 2.0)
        {
            fTime = 2.0;
        }

        set_hudmessage(0,255,0,0.58,0.02,0,0.0,fTime,0.0,0.0,1);
        show_hudmessage(id,(szTeam[0] == 'C') ? "Counter-Terrorist:" : "Terrorists:");
    
        set_hudmessage(255,255,225,0.58,0.05,0,0.0,fTime,0.0,0.0,2);
        show_hudmessage(id,szHud);
    }
}
If i remember some flags from get_players(iPlayers,iNum,"aeh",szTeam);
is broken in versions below than 1.8.3 releases
__________________
Projects:

- See my Git Hub: https://github.com/SmileYzn
PHP Code:
set_pcvar_num(pCvar,get_pcvar_num(pCvar) ? 1); 

Last edited by ^SmileY; 05-22-2018 at 14:57.
^SmileY is offline
Send a message via MSN to ^SmileY Send a message via Skype™ to ^SmileY
sekac
Senior Member
Join Date: Nov 2016
Old 05-22-2018 , 15:03   Re: Teammates money display
Reply With Quote #22

It's not doing anything right now, or I might be doing something wrong.
sekac is offline
^SmileY
Veteran Member
Join Date: Jan 2010
Location: Brazil [<o>]
Old 05-22-2018 , 15:26   Re: Teammates money display
Reply With Quote #23

Quote:
Originally Posted by sekac View Post
It's not doing anything right now, or I might be doing something wrong.
Check if the server has the mp_freezetime set and if amx_display_money is active "1"
__________________
Projects:

- See my Git Hub: https://github.com/SmileYzn
PHP Code:
set_pcvar_num(pCvar,get_pcvar_num(pCvar) ? 1); 
^SmileY is offline
Send a message via MSN to ^SmileY Send a message via Skype™ to ^SmileY
sekac
Senior Member
Join Date: Nov 2016
Old 05-22-2018 , 15:42   Re: Teammates money display
Reply With Quote #24

Quote:
Originally Posted by ^SmileY View Post
Check if the server has the mp_freezetime set and if amx_display_money is active "1"
Yeah mp_freezetime 10 and amx_display_money 1. Anyways, I think i should upgrade finally...
sekac is offline
^SmileY
Veteran Member
Join Date: Jan 2010
Location: Brazil [<o>]
Old 05-22-2018 , 15:57   Re: Teammates money display
Reply With Quote #25

Quote:
Originally Posted by sekac View Post
Yeah mp_freezetime 10 and amx_display_money 1. Anyways, I think i should upgrade finally...
as i said, i do not have sure if get_players is working on these flags on 1.8.2 or below.
__________________
Projects:

- See my Git Hub: https://github.com/SmileYzn
PHP Code:
set_pcvar_num(pCvar,get_pcvar_num(pCvar) ? 1); 
^SmileY is offline
Send a message via MSN to ^SmileY Send a message via Skype™ to ^SmileY
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 05-22-2018 , 16:22   Re: Teammates money display
Reply With Quote #26

1.8.2 has nothing do to with non-steam. What you just wrote is stupid. If you're going to release a plugin either make it compatible for 1.8.2 or mention in the title that it requires 1.8.3 (which in this case it doesn't have to because it can easily be made with 1.8.2's functions). Most people use 1.8.2 which is the latest official release. 1.8.3 is NOT released yet and there's no point in making 1.8.3-only plugins just yet.
__________________

Last edited by OciXCrom; 05-22-2018 at 16:23.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 05-22-2018 , 16:34   Re: Teammates money display
Reply With Quote #27

Quote:
Originally Posted by ^SmileY View Post
"I wanted a 1.8.2 version of the plugin"

Cool bro, but the fact is not non steam anyway, upgrade server to 1.8.3 since it is not in dev branch anymore, but is in stable channel. Also do not have any excuse to not upgrade to 1.8.3 in these days no?.

Read first post before post what you want instead of requirements to use the plugin if you want.
or just re-code to make it work in 1.8.2 since is open source no?
It's still in development and 1.8.2 is THE LATEST STABLE RELEASE. Regular server owners should not be forced to update to a dev branch that can be
unstable if they are not willing to post bug reports.
__________________

Last edited by HamletEagle; 05-22-2018 at 16:35.
HamletEagle is offline
^SmileY
Veteran Member
Join Date: Jan 2010
Location: Brazil [<o>]
Old 05-22-2018 , 17:44   Re: Teammates money display
Reply With Quote #28

Quote:
Originally Posted by HamletEagle View Post
It's still in development and 1.8.2 is THE LATEST STABLE RELEASE. Regular server owners should not be forced to update to a dev branch that can be
unstable if they are not willing to post bug reports.
so why in snapshots page it saying: "1.8, stable branch" ??
anyway i already posted in first topic that requires last hg dev build anyway and i do not see any 'unstable' thing in current amxx build

@OciXCrom
So why a simple and small plugin that this is is not working on 1.8.2 or 1.8.3 even if i put to compile on it?

For sure that have something wrong with the server
__________________
Projects:

- See my Git Hub: https://github.com/SmileYzn
PHP Code:
set_pcvar_num(pCvar,get_pcvar_num(pCvar) ? 1); 

Last edited by ^SmileY; 05-22-2018 at 17:45.
^SmileY is offline
Send a message via MSN to ^SmileY Send a message via Skype™ to ^SmileY
Natsheh
Veteran Member
Join Date: Sep 2012
Location: Muslim and proud!
Old 05-22-2018 , 18:35   Re: Teammates money display
Reply With Quote #29

Quote:
Originally Posted by ^SmileY View Post
so why in snapshots page it saying: "1.8, stable branch" ??
anyway i already posted in first topic that requires last hg dev build anyway and i do not see any 'unstable' thing in current amxx build

@OciXCrom
So why a simple and small plugin that this is is not working on 1.8.2 or 1.8.3 even if i put to compile on it?

For sure that have something wrong with the server
From its name its still in dev how can you to prove its stable.


It wont work with 182 because CS_OnBuy forward is from amx v183dev and not in v182.
__________________
@Jailbreak MOD [Alot of features + API] 100% done !
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
tarsisd2
Veteran Member
Join Date: Feb 2016
Location: brazil
Old 05-22-2018 , 23:14   Re: Teammates money display
Reply With Quote #30

i'm using amx 1.8.3 5154 and it is stable enough, it's the most recommended version at the moment, i also have server with 1.8.2, but i'm only using to test stuff, since the rest i upgrade and can't regret.

but ppl can upgrade when they fell like it
tarsisd2 is offline
Reply


Thread Tools
Display Modes

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 14:01.


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