Raised This Month: $ Target: $400
 0% 

[STOCKS] Buy Item


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Plugin Info:     Modification:   ALL        Category:   Fun Stuff       
Berkio
New Member
Join Date: Dec 2021
Old 10-23-2022 , 04:23   [STOCKS] Buy Item
Reply With Quote #1

Hello Friend
To you today
I was made
Sharing from a stock


Buy Item STOCKS / ZP_ITEM + WEAPON_ITEM

PHP Code:
stock cs_buy_item(id, const itemid[], cost, const post[])
{
    new 
Need
    Need 
cost cs_get_user_money(id)
    
    if( 
cs_get_user_money(id) >= cost )
    {
        
equalpost"postedNative" )
            
client_cmd(iditemid)
            
        
equalpost"postedWeapon" )
            
give_item(iditemid)
            
        
client_print(idprint_chat"Successful purchase")
        
cs_set_user_money(idcs_get_user_money(id) - cost )
    }
    else
    {
        
client_print(idprint_chat"Failed purchase")
        
client_print(idprint_chat"You need %d$"Need)
    }

Usage
Code:
cs_buy_item(id, "weapon_ak47", 2500, "postedWeapon") // Cs 1.6 Weapon Buy
cs_buy_item(id, "give_weapon_vsk94", 3600, "postedNative") // Cs 1.6 Native Weapon Buy
Berkio 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 17:01.


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