Add gate cmd
This commit is contained in:
@@ -101,3 +101,20 @@ function getClosestGate(position) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ===========================================================================
|
||||||
@@ -457,6 +457,3 @@ function gpsCommand(command, params, client) {
|
|||||||
|
|
||||||
blinkGenericGPSBlipForPlayer(client, getColourByType("businessBlue"), 10);
|
blinkGenericGPSBlipForPlayer(client, getColourByType("businessBlue"), 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user