rentProperty
Fires when a player rents a property. Runs on the server.
It fires for rentals from the property menu, the phone Marketplace app, and when a renter signs a rental contract. It runs after the rent length and "is this property for rent" checks, and before the money and society checks.
Payload
lua
- source:
numberServer id of the renter - player:
tableFramework player object of the renter - propertyId:
numberThe property id - rentAs:
string'user'for a personal rental,'society'when renting for the player's job - rentDays:
numberRent length in days, from 1 toConfig.MaxRentDays - autoRenew:
booleanWhether the rent renews by itself when it ends
Example
lua
Return value
false: Cancel the rental. The renter sees "You are not authorized to rent this property".- Anything else: The rental continues.