Add set pos/heading utils
This commit is contained in:
@@ -78,10 +78,23 @@ function getPlayerPosition(client) {
|
|||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
function setPlayerPosition(client, position) {
|
||||||
|
return triggerNetworkEvent("ag.position", client, position);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ---------------------------------------------------------------------------
|
||||||
|
|
||||||
function getPlayerHeading(client) {
|
function getPlayerHeading(client) {
|
||||||
return client.player.heading;
|
return client.player.heading;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
function setPlayerHeading(client, heading) {
|
||||||
|
return triggerNetworkEvent("ag.heading", client, heading);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
|
||||||
function getPlayerVehicle(client) {
|
function getPlayerVehicle(client) {
|
||||||
@@ -102,6 +115,18 @@ function getPlayerInterior(client) {
|
|||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
function setPlayerVirtualWorld(client, dimension) {
|
||||||
|
client.player.dimension = dimension;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
function setPlayerInterior(client, interior) {
|
||||||
|
triggerNetworkEvent("ag.interior", client, interior);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ---------------------------------------------------------------------------
|
||||||
|
|
||||||
function isPlayerInAnyVehicle(client) {
|
function isPlayerInAnyVehicle(client) {
|
||||||
return (client.player.vehicle != null);
|
return (client.player.vehicle != null);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user