Garry's Mod

Garry's Mod

401 次評價
TylerB's moneyRequest E2 Functions (v1)
   
獎勵
加入最愛
已加入最愛
移除最愛
Content Type: Addon
Addon Type: Tool
Addon Tags: Build, Roleplay
檔案大小
發佈於
更新時間
3.804 KB
2014 年 5 月 12 日 上午 7:10
2018 年 2 月 24 日 下午 12:18
31 項更新註記 (檢視)

訂閱以下載
TylerB's moneyRequest E2 Functions (v1)

在 TylerB 的 2 個收藏中
boring.builders | BuildRP Content
15 個項目
boring.builders | Lawless Content
15 個項目
描述
With this addon, you can create unhackable stores using Expression 2!


moneyRequest(ply, amount, [title], [timeout]) - Asks a player for money, with an optional title and timeout.
(if the player cannot afford the request, the function will return 0!)
moneyGive(ply, amount) - Gives a player the specified amount of money.

moneyClk() - Returns 1 if the e2 was triggered by a successful request.
moneyClk(title) - Returns 1 if the title matches the request causing the e2 to run.
moneyClkTitle() - Returns the title of the successful request.
moneyClkAmount() - Returns the amount of the successful request.
moneyClkPlayer() - Returns the target of the successful request.

moneyNoClk() - Returns 1 if the e2 was triggered by a declined request.
moneyNoClk(title) - Returns 1 of the title matches the request causing the e2 to run.
moneyNoClkTitle() - Returns the title of the declined request.
moneyNoClkAmount() - Returns the amount of the declined request.
moneyNoClkPlayer() - Returns the target of the declined request.

moneyTimeout() - Returns 1 if the e2 was triggerd by a timed-out request.
moneyTimeout(title) - Returns 1 if the title matches the request causing the e2 to run.
moneyTimeoutTitle() - Returns the title of the timed-out request.
moneyTimeoutAmount() - Returns the amount of the timed-out request.
moneyTimeoutPlayer() - Returns the target of the timed-out request.

entity:money() - If target is a player, return their wallet, otherwise, the amount of money.
entity:moneyAmount() - Alias of entity:money().



-- COMMANDS --
rp_blockmoney_add STEAMID - Adds the user with the provided Steam ID to a list and prevents them from asking you for money.
rp_blockmoney_remove STEAMID - Removes the user from the aforementioned list.

sv_moneyrequest_max - The maximum amount of money you can request/give at a single time.
sv_moneyrequest_allowgive - Disable / Enable moneyGive().
-- /COMMANDS --



Have an error to report? Leave a comment below!

Goes well with my E2 Shipment Functions for DarkRP addon.

Facepunch thread[facepunch.com]
GitHub[github.com]
熱門討論 檢視全部(4)
2
2017 年 9 月 9 日 下午 6:33
moneyTimeout() not working
spy
2
2016 年 5 月 27 日 上午 12:47
Unable to use giveMoney()
faɪkʰ
0
2017 年 8 月 8 日 上午 11:53
Does it work?
TylerB
84 則留言
PaRaDiS3312 2020 年 9 月 29 日 上午 8:56 
Any way to increase the size of the request window so people can actually see the amount you're requesting?
Brumble 2020 年 6 月 16 日 上午 9:28 
I've literally tried everything I can at the moment, various different methods and when I press the button, it just starts the game rather than requests money first..
Brumble 2020 年 6 月 16 日 上午 9:15 
I'm trying to make it a player has to press E on a wire button and then it requests the money.

I've got Button:entity in my @inputs and I have @trigger at the bottom.

if(Button){
moneyRequest(Button, 10000, 30, "Play")
}

if(moneyClk()){Gamestart, Ready}

This is as far as I've got.

I just can't get it to work no matter how many times I try and use a function to "play" the game once you've pressed the start button and paid.
DangerMan 2020 年 1 月 5 日 下午 1:21 
СЛОЖНА СЛОЖНА БЛЯТЬ ЧТО ЭТА ЗА ХУЙНЯ
PROXIMITY 2019 年 6 月 21 日 下午 7:03 
Hey LittleBladed, you can check https://pastebin.com/bMT11CFw , which I posted for a user earlier in this thread.
LittleBladed 2019 年 4 月 15 日 上午 5:02 
Hey there!

Is there anyone here that can code in expression 2?
I would need someone to code me a small code that would allow me to do the following with e2 and the tylerb's moneyrequest addon.

!rq *amount* *player* would request the *amount* to the *player*

!gv *amount* *player* would give the *amount* to *player*

Thank you to anyone that would be willing to do this.
some weirdo 2018 年 12 月 16 日 上午 11:00 
I want to make a MobilePay replica using this. But I'm bad at LUA :/
some weirdo 2018 年 12 月 16 日 上午 11:00 
I wish I knew how to redesign this :(
PROXIMITY 2018 年 12 月 5 日 上午 6:10 
Hey Friend moat.gg, here's a simple 1 liner

@name GiveMoneyToAllPlayers

foreach (Key, Ply:entity = players()) { moneyGive(Ply,10) }
Swedish Submarine 2018 年 12 月 4 日 下午 4:01 
How would i do moneyGive(*all*, 500)) like how would i select everyone on the server