Check if already entering/exiting property before trying

This commit is contained in:
Vortrex
2022-08-16 11:48:39 -05:00
parent c63ec5f4f6
commit 526764185c

View File

@@ -200,6 +200,12 @@ function enterExitPropertyCommand(command, params, client) {
let isEntrance = false;
let isBusiness = false;
// Make sure they aren't already trying to enter/exit a property
if (getPlayerData(client).pedState == AGRP_PEDSTATE_ENTERINGPROPERTY || getPlayerData(client).pedState == AGRP_PEDSTATE_EXITINGPROPERTY) {
messagePlayerError(client, getLocaleString(client, "UnableToDoThat"));
return false;
}
if (areServerElementsSupported()) {
if (!getPlayerData(client).currentPickup) {
return false;