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

[CS:S/CS:GO] Shop Plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Cron
New Member
Join Date: Jan 2017
Plugin ID:
5477
Plugin Version:
Plugin Category:
General Purpose
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Simple? Shop Plugin
    Old 01-06-2017 , 09:35   [CS:S/CS:GO] Shop Plugin
    Reply With Quote #1

    Hello everyone!
    First of all I'm Japanese and I'm not good at English.

    Overview

    This plugin can use a simple shop.
    The only things you can use are the player skins and items that can be created individually.

    One example is "Random Gold Box".
    With this item you can earn random gold from 1 to 1000.

    Play Time : You can purchase items at Shop according to playing time.
    The price is set to the set price / 10.

    How to add items

    -----------------------------------------------------------------------------------------------

    In Shop_Plugin_v1.0.sp

    #define MAX_ITEM 20+1
    Increasing this value will increase the number of items that can be used.
    -----------------------------------------------------------------------------------------------

    In Item.sp

    CreateItem(Num, "Name", "Skin path", type, price, trade check);

    type:
    1 = Player Skin,
    2 = Normal Item

    trade check:
    true = can trade
    false = can't trade

    Code:
    
    public CreateItem(Num, String:ItemName[256], String:ItemModel[256], ItemNumber, ItemPrice, bool:itemtradeCheck)
    {
    	Item_Name[Num] = ItemName;
    	Item_Model[Num] = ItemModel;
    	Item_Number[Num] = ItemNumber;
    	Item_Price[Num] = ItemPrice;
    	Item_trade[Num] = itemtradeCheck;
    }
    
    -----------------------------------------------------------------------------------------------

    Installing

    cstrike\addons\sourcemod\scripting\
    Insert the All File.


    This plugin uses a database.

    Code:
    "ShopDB"
    {
    	"driver"		"mysql"
    	"host"		"localhost"
    	"database"	"ShopDB"
    	"user"		"root"
    	"pass"		""
    }
    Admin Commands

    sm_gold "Name" "Amount" - Give Gold
    ex) sm_gold Cron 1000 - give 1000 Gold

    sm_item "Name" "ItemNum" "Amount" - Give Item
    ex) sm_item Cron 1 10 - Give [Num1 Item]×10

    Client Commands

    sm_shop - Open Main Menu

    sm_trade "Name" "Amount" - trade Gold
    ex) sm_trade Cron 1000 - give 1000 Gold

    sm_trade2 "Name" "ItemNum" "Amount" - trade Item
    ex) sm_trade2 Cron 1 10 - give [Num1 Item]×10

    CS:S Only
    Nightvision Key(default N key) - Open Main Menu
    Attached Files
    File Type: zip Shop_Plugin_v1.0.zip (6.4 KB, 885 views)
    Cron 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 04:48.


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