Money
#1
The plugin create in game money. Not economic model. Economic model You may create with the plugin Smile

Vesion 20160821

[UA] Якщо потрібно, можу створити опис на рідній мові.
[RU] Если необходимо - могу сделать описание на русском.

What can you do:
- Send money to other players.
- Sell items via signs (create shops).
- Bye items via signs.
- Use chests as store to keep items to sell
- Disable items to bye/sell by item ID
- Update player's balance

Plugin commands:
/money balance - show personal balance
/money pay <player name> <amount> - send money to player

Update balance:
/money set
/money set balance <player name> <amount> - set balance 100. (/money s b DrMasik 100)
/money set encBalance <player name> <amount> - enlarge the blanace 100. (/money s e DrMasik 100)
/money set decBalance <player name> <amount> - reduce the blanace 100. (/money s d DrMasik 100)

Chest commands:
/money mark - turn on chest mark (/money m)
/money mc - turn off chest mark action
/money list - list marked chests (/money l)
/money chest delete <id> - delete chest <id> (/money c d <id>)

Add permission:
money.set - Access to "/money set" command.

How to sell items:
- You must known item id
- Take a sign
-- In first row type '[buy]'
-- In second row type item ID
-- In third row type amount and price as '100:30'
-- In fourth row type your nick name. If nick name wrong - sign will be remove.
[Image: 123.png]

API function:
api_setBalance(<PlayerName>, <CurrenyCodeName>, <Sum>) - Set pplayer balans to <Sum>.
api_getBalance(<PlayerName>, <CurrenyName>) - Get player balance by currency name.

Simple function how to use
Code:
function commandGUIGetBalance()
 local status, value = cPluginManager:CallPlugin("Money", "api_getBalance", "DrMasik", "Credits")

 if status == true then
   console_log("TRUE")
   console_log(value)
 else
   console_log("FALSE")
   console_log("Returned error code: ".. value)
 end
end

function commandGUISetBalance()
 local status, value = cPluginManager:CallPlugin("Money", "api_setBalance", "DrMasik", "c", 17365)

 if status == true then
   console_log("TRUE")
   console_log(value)
 else
   console_log("FALSE")
   console_log("Returned error code: ".. value)
 end
end

Source
Download
Reply
Thanks given by: jan64 , Studiokikotv_yt


Messages In This Thread
Money - by DrMasik - 05-18-2016, 05:47 PM
RE: Money - by DrMasik - 05-18-2016, 05:48 PM
RE: Money - by PureTryOut - 05-18-2016, 07:03 PM
RE: Money - by DrMasik - 05-18-2016, 07:30 PM
RE: Money - by PureTryOut - 05-19-2016, 07:11 AM
RE: Money - by xoft - 05-19-2016, 05:34 PM
RE: Money - by DrMasik - 05-19-2016, 06:04 PM
RE: Money - by xoft - 05-19-2016, 10:03 PM
RE: Money - by DrMasik - 05-19-2016, 10:30 PM
RE: Money - by PureTryOut - 05-20-2016, 12:51 AM
RE: Money - by xoft - 05-20-2016, 05:29 AM
RE: Money - by PureTryOut - 05-20-2016, 06:48 AM
RE: Money - by DrMasik - 05-24-2016, 05:19 PM
RE: Money - by shauneagle - 07-11-2016, 12:59 AM
RE: Money - by DrMasik - 08-19-2016, 07:14 PM
RE: Money - by DrMasik - 08-19-2016, 08:55 PM
RE: Money - by DrMasik - 08-20-2016, 02:07 AM
RE: Money - by shauneagle - 08-20-2016, 02:53 AM
RE: Money - by DrMasik - 08-20-2016, 08:25 PM
RE: Money - by tonibm19 - 08-20-2016, 09:47 PM
RE: Money - by DrMasik - 08-20-2016, 09:58 PM
RE: Money - by DrMasik - 08-22-2016, 02:39 AM
RE: Money - by Boo - 09-01-2016, 04:27 AM
RE: Money - by DrMasik - 09-01-2016, 06:56 AM
RE: Money - by Boo - 09-01-2016, 03:55 PM



Users browsing this thread: 1 Guest(s)