Fix player position util
This commit is contained in:
@@ -73,7 +73,9 @@ function getServerGame() {
|
|||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
|
||||||
function getPlayerPosition(client) {
|
function getPlayerPosition(client) {
|
||||||
return client.player.position;
|
if(client.player != null) {
|
||||||
|
return client.player.position;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
@@ -94,7 +96,6 @@ function setPlayerHeading(client, heading) {
|
|||||||
return triggerNetworkEvent("ag.heading", client, heading);
|
return triggerNetworkEvent("ag.heading", client, heading);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
|
||||||
function getPlayerVehicle(client) {
|
function getPlayerVehicle(client) {
|
||||||
|
|||||||
Reference in New Issue
Block a user