Raised This Month: $ Target: $400
 0% 

Get something of all players


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Alucard^
AMXX Moderator: Others
Join Date: Sep 2007
Location: Street
Old 09-01-2009 , 02:29   Get something of all players
Reply With Quote #1

Hi...

Well, i don't understand how to do this.. i think is a rly easy and small code but i don't catch how to do it o.O

I need to get for EXAMPLE... the money of ALL players but not separated... so i want to show all the money in a hud...

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

#define PLUGIN    "Get Money Test"
#define AUTHOR    "Alucard"
#define VERSION    "1.0"

new HudSync
new g_MaxPlayers

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
set_task(1.0"ShowMoney"0""0"b")
    
    
g_MaxPlayers get_maxplayers()
    
HudSync CreateHudSyncObj()
}

public 
ShowMoney()
{
    new 
moneyi
    
    
for(0<= g_MaxPlayersi++)
    {
        if(
is_user_alive(i) )
        
money cs_get_user_money(i)
    }
    
set_hudmessage(2552552550.010.1501.01.00.10.2, -1)
    
ShowSyncHudMsg(0HudSync"Money: %i"money)

This not work and i understand why is not working... is becouse the cs_get_user_money(i) doesn't get the total amount of all money.. just get the money for every index (i). Now i ask... how to get the total amount of money from all players.

Thx and sry if my english suck.
__________________
Approved Plugins - Steam Profile

Public non-terminated projects:
All Admins Menu, HLTV parameters, Subnick,
Second Password (cool style), InfoZone,
Binary C4 plant/defuse, and more...

Private projects:
NoSpec (+menu), NV Surf Management,
PM Adanved System, KZ longjump2, and more...

Last edited by Alucard^; 09-01-2009 at 09:47.
Alucard^ is offline
Send a message via Skype™ to Alucard^
 


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 15:09.


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