Add gate cmd
This commit is contained in:
@@ -100,4 +100,21 @@ function getClosestGate(position) {
|
||||
return closest;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function triggerGateCommand(command, params, client) {
|
||||
let closestGate = getClosestGate(getPlayerPosition(client));
|
||||
|
||||
if(!getGateData(closestGate)) {
|
||||
messagePlayerError(client, getLocaleString(client, "InvalidGate"));
|
||||
}
|
||||
|
||||
if(!canPlayerUseGate(client, closestGate)) {
|
||||
messagePlayerError(client, getLocaleString(client, "NoGateAccess"));
|
||||
return false;
|
||||
}
|
||||
|
||||
triggerGate(getGateData(closestGate).scriptName);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -456,7 +456,4 @@ function gpsCommand(command, params, client) {
|
||||
}
|
||||
|
||||
blinkGenericGPSBlipForPlayer(client, getColourByType("businessBlue"), 10);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user