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