Repository navigation
User API
The User API is useful when you need to interact with users directly.
##Available Functions
UserHasCurrency();
UserGiveItem();
UserTakeItem();
UserGiveCurrency();
UserEquippedItem();
##UserHasCurrency();
UserHasCurrency(); is a function to test for if the user has at least the minimum amount of currency specified. This function takes three variables.
The first variable being an integer, which is used as the user to test against.
Second variable is also an integer, which is used to test a specific currency type. Entering 1 tests against primary currency, entering 2 tests against secondary currency. Any other input here will result in the API call returning false.
The third variable is the minimum amount of currency to test for. Needs to be a valid integer.
This function returns true if the user has more than or equal to the minimum currency required. Function will return false if user does not have the minimum currency, user does not exist, or attempting to test against a non-existent currency.
Current Chivalry Engine Versions:
V1 - 1.0.3b released March 21, 2025
V2 - 2.0.2 released Jun 13, 2020
V3- 3.0.0-alpha1 released Sept 29, 2019