Raised This Month: $ Target: $400
 0% 

Maximum amount of money


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 04-15-2009 , 07:38   Re: Money
Reply With Quote #1

Quote:
Originally Posted by Debesėlis View Post
How do you make the maximum allowed cash 16,000 because now it gives up to 18,000 and then subtracts to 16,000 in the next round.
PHP Code:
new amx_money_num_pointer

public plugin_init()
{
    
amx_money_num_pointer register_cvar("amx_money_num""5000")
}

give_money(id)
{
    new 
iMoneyToGive get_pcvar_num(amx_money_num_pointer)
    new 
iPlayerMoney cs_get_user_money(id)
    
iMoneyToGive min(16000 iPlayerMoneyiMoneyToGive)
    
iPlayerMoney += iMoneyToGive
    cs_set_user_money
(id,  iPlayerMoney)
    
client_print(idprint_chat"%L"LANG_PLAYER"MONEY"iMoneyToGive
Less details :
PHP Code:
give_money(id)
{
    new 
iPlayerMoney cs_get_user_money(id)
    new 
iMoneyToGive min(16000 iPlayerMoneyget_pcvar_num(amx_money_num_pointer))
    
cs_set_user_money(id,  iPlayerMoney iMoneyToGive)
    
client_print(idprint_chat"%L"LANG_PLAYER"MONEY"iMoneyToGive
__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 04-15-2009 at 08:50.
ConnorMcLeod is offline
Reply



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 02:21.


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