Raised This Month: $ Target: $400
 0% 

Money Spent


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 01-31-2017 , 20:01   Money Spent
Reply With Quote #1

Dudes, I'm trying to pick the money spent from a player.
Thats the code:

PHP Code:
new MoneySpent[33]

public 
plugin_init()
{
    
register_message(get_user_msgid("Money"), "Message_Money")
}
public 
Message_Money(iMsgIdiMsgDestid)
{
    new 
iMsgArgInt get_msg_arg_int(1)
    new 
PlayerMoneySpent = (DefaultMoneyStart iMsgArgInt)
    
    
MoneySpent[id] = PlayerMoneySpent
    
    
new userName[32]
    
get_user_name(iduserName31)
    
console_print(0,"Player Spenting: %s, Money Spent: %d",userNamePlayerMoneySpent)

But it returns the money adding up the equipment you own, not the money spent at the beginning of the round.

Output in the first round:

Code:
Player spenting: EFFx, Money spent: 7975 ( AWP+FULL AMMO, DEAGLE+FULL AMMO, VESTHELM AND ALL GRENADES
But when the round ends and start again, appear 7675 in the console, because I threw a HE Grenade. And if I don't threw any grenade and buy an AK in the round, it shows 14075.

What I want know is any other method to return the money spent at the beginning of the round.


And ahh, i'm reseting it with Ham_Spawn and it doesn't fix the issue.
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo

Last edited by EFFx; 01-31-2017 at 20:12.
EFFx is offline
 



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 20:41.


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