Raised This Month: $51 Target: $400
 12% 

[Request] shop buy frag money


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Giass
Member
Join Date: Aug 2011
Location: {Israel}
Old 05-08-2017 , 08:18   [Request] shop buy frag money
Reply With Quote #1

Hello!
I want shop that you can buy things with frag money,
for example
after few kills i got approx 2000$
i can use it in the shop and buy awp (for example)

can anyone build me that?
__________________
All you need is carb
Giass is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 05-08-2017 , 08:59   Re: [Request] shop buy frag money
Reply With Quote #2

https://forums.alliedmods.net/showthread.php?t=284603
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
LordOfBlade
Member
Join Date: Feb 2015
Old 05-08-2017 , 09:21   Re: [Request] shop buy frag money
Reply With Quote #3

test

PHP Code:
#include <amxmodx>
#include <fun>
#include <hamsandwich>
#include <cstrike>

enum _:DATA_SHOP 
{
    
NAME_ITEMS[32],
    
PRICE_SHOP,
    
ITEM_CSW,
    
ITEM_CSNAME[20],
    
ITEM_CLIPS
}

new const 
New_Shop[][DATA_SHOP] =
{
    {
"AWP"2000CSW_AWP "weapon_awp" 30}
}

new 
g_coin[33]

public 
plugin_init() 
{
    
register_clcmd("say /shop""new_shop_menu"// on say
    
RegisterHam(Ham_Killed"player""fw_PlayerKilled_Post"1)
    
}
public 
client_putinserver(id)
{
    
g_coin[id] = 0
}
public 
new_shop_menu(id
{
    static 
itext[50]
    new 
menu
    menu 
menu_create("\rShop ""handler_shop")
    
    for(
0sizeof(New_Shop); i++) 
    {
        if(
g_coin[id] >= New_Shop[i][PRICE_SHOP])
        {
            
formatex(textcharsmax(text), "\w%s \y[ %d ]"New_Shop[i][NAME_ITEMS], New_Shop[i][PRICE_SHOP])
        } 
        else 
        {
            
formatex(textcharsmax(text), "\d%s \d[ %d ]"New_Shop[i][NAME_ITEMS], New_Shop[i][PRICE_SHOP])
        }
        
menu_additem(menutext__menu_makecallback("shop_callback"))
    }
    
menu_display(idmenu)
    
    return 
PLUGIN_HANDLED 
}
public 
shop_callback(idmenuitem
{
    if(
g_coin[id] >= New_Shop[item][PRICE_SHOP])
        return 
ITEM_ENABLED;
    
    return 
ITEM_DISABLED;
}
public 
handler_shop(idmenuitem
{
    if (!
is_user_alive(id))
        return 
PLUGIN_HANDLED 
    
    
if(item == MENU_EXIT)
    {
        
menu_destroy(menu);
        return 
PLUGIN_HANDLED;
    }
    
    
    
cs_set_user_money(idcs_get_user_money(id) - New_Shop[item][PRICE_SHOP]) 
    
give_item(id New_Shop[item][ITEM_CSNAME])
    
cs_set_user_bpammo(idNew_Shop[item][ITEM_CSW], New_Shop[item][ITEM_CLIPS])
    
client_print(idprint_chat"[Shop] You bought: %s."New_Shop[item][NAME_ITEMS])
    return 
PLUGIN_HANDLED;
}
public 
fw_PlayerKilled_Post(victimattackershouldgib)
{
    if (!
is_user_alive(attacker) || victim == attacker)
        return 
HAM_IGNORED;
    
    
g_coin[attacker] += 500
    
    
return HAM_IGNORED;    

LordOfBlade is offline
Giass
Member
Join Date: Aug 2011
Location: {Israel}
Old 05-08-2017 , 11:29   Re: [Request] shop buy frag money
Reply With Quote #4

Quote:
Originally Posted by OciXCrom View Post
too complicated
__________________
All you need is carb
Giass is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 05-08-2017 , 13:18   Re: [Request] shop buy frag money
Reply With Quote #5

So what? It works and you can configure it to your needs.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Natsheh
Veteran Member
Join Date: Sep 2012
Old 05-09-2017 , 06:46   Re: [Request] shop buy frag money
Reply With Quote #6

Quote:
Originally Posted by Giass View Post
too complicated

Maybe for you its complicated but its a realy nice shop system and easy to configure.

And you can ask the author for help , if you have something you dont understand.
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
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 08:16.


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