Raised This Month: $ Target: $400
 0% 

How to take money?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 06-24-2009 , 10:46   Re: How to take money?
Reply With Quote #3

Here's a useful stock I just wrote up:

PHP Code:
stock cs_take_user_moneyidamount )
{
    new 
money cs_get_user_moneyid )
    if ( 
money amount )
        return 
0

    cs_set_user_money
idclampmoney amount016000 ) )

    return 
1

If the user had enough money, it will take it and return 1. If they don't, it won't do anything, and will return 0.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
 



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:28.


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