Shop-Core icon indicating copy to clipboard operation
Shop-Core copied to clipboard

Toggle off item before transfer - to call callback in item plugin

Open JakubKosmaty opened this issue 4 years ago • 2 comments

JakubKosmaty avatar May 06 '21 18:05 JakubKosmaty

Может стоит это делать здесь?

https://github.com/FD-Forks/Shop-Core/blob/39b082045f6d3735d7c548c16b3611a2ef7d97ce/addons/sourcemod/scripting/shop/player_manager.sp#L339

но вообще зачем это?

R1KO avatar May 07 '21 13:05 R1KO

This function has already been completed, when transferring an item, we remove this item from the player’s inventory from the player (the player who transfers), thereby causing an event chain, in which there is a callback to turn off the item from the player.

https://github.com/hlmod/Shop-Core/blob/39b082045f6d3735d7c548c16b3611a2ef7d97ce/addons/sourcemod/scripting/shop/player_manager.sp#L351 https://github.com/hlmod/Shop-Core/blob/39b082045f6d3735d7c548c16b3611a2ef7d97ce/addons/sourcemod/scripting/shop.sp#L1497-L1504 https://github.com/hlmod/Shop-Core/blob/39b082045f6d3735d7c548c16b3611a2ef7d97ce/addons/sourcemod/scripting/shop.sp#L1625-L1637

IL0co avatar May 30 '22 17:05 IL0co