Raised This Month: $32 Target: $400
 8% 

[STOCKS] Buy Item


Post New Thread Reply   
 
Thread Tools Display Modes
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
DruGzOG
Veteran Member
Join Date: Nov 2007
Location: Unknown
Old 10-23-2022 , 09:17   Re: [STOCKS] Buy Item
Reply With Quote #2

What was the point of this?
__________________
DruGzOG is offline
Send a message via AIM to DruGzOG
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 23:20.


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