Add ItemShop, fix ClotheShop Payment, fix Vehicle Respawn, Add Vehicle Lock from outside
This commit is contained in:
@@ -268,6 +268,21 @@ namespace ReallifeGamemode.Server.Util
|
||||
return false;
|
||||
}
|
||||
|
||||
public static void SetVehicleRotation(Vehicle veh, VehicleSyncData data, Vector3 rot)
|
||||
{
|
||||
if (veh != null)
|
||||
{
|
||||
if (NAPI.Entity.DoesEntityExist(veh))
|
||||
{
|
||||
if (data != null)
|
||||
{
|
||||
data.Rotation = rot;
|
||||
NAPI.Data.SetEntitySharedData(veh, "VehicleSyncData", data);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Called from the client to sync dirt level
|
||||
[RemoteEvent("VehStream_SetDirtLevel")]
|
||||
public void VehStreamSetDirtLevel(Client player, Vehicle veh, float dirt)
|
||||
@@ -365,6 +380,11 @@ namespace ReallifeGamemode.Server.Util
|
||||
[ServerEvent(Event.PlayerExitVehicleAttempt)]
|
||||
public void VehStreamExitAttempt(Client player, Vehicle veh)
|
||||
{
|
||||
|
||||
if (player.HasData("isDead") && player.GetData("isDead"))
|
||||
return;
|
||||
|
||||
|
||||
VehicleSyncData data = GetVehicleSyncData(veh);
|
||||
if (data == default(VehicleSyncData))
|
||||
data = new VehicleSyncData();
|
||||
@@ -379,6 +399,9 @@ namespace ReallifeGamemode.Server.Util
|
||||
[ServerEvent(Event.PlayerExitVehicle)]
|
||||
public void VehStreamExit(Client player, Vehicle veh)
|
||||
{
|
||||
if (player.HasData("isDead") && player.GetData("isDead"))
|
||||
return;
|
||||
|
||||
VehicleSyncData data = GetVehicleSyncData(veh);
|
||||
if (data == default(VehicleSyncData))
|
||||
data = new VehicleSyncData();
|
||||
|
||||
Reference in New Issue
Block a user