How can I make an entity registered as a darkRP entity
1 replies, posted
I want it so that when a player spawns an entity from a menu, it counts towards the max entity amount from the f4 menu.
For example if the max amount of "Basic Printer" is 3 and a player buys 2 from the F4 menu, and spawns 1 in from the menu they should no longer be able to buy or spawn any more.
I have tried multiple things such as:
https://wiki.darkrp.com/index.php/Functions/Player/Server/addCustomEntity
ent.Darkrpentity = DarkRPEntities[2]
Please, can someone give me some ideas please.
hook into Hooks/Server/playerBoughtCustomEntity
to track progress towards their limit
hook into Hooks/Shared/canBuyCustomEntity
and return false when you reach the limit
Sorry, you need to Log In to post a reply to this thread.