Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions VORP-Character/VORP-Character.sln
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,16 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.31903.59
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "vorpcharacter_cl", "vorpcharacter_cl\vorpcharacter_cl.csproj", "{51083C52-7FE7-422E-AED9-023D0903C6E6}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VORP.Character.Client", "vorpcharacter_cl\VORP.Character.Client.csproj", "{51083C52-7FE7-422E-AED9-023D0903C6E6}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "vorpcharacter_sv", "vorpcharacter_sv\vorpcharacter_sv.csproj", "{EAF3ACC4-8378-4923-ADD0-5959DC21DA03}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VORP.Character.Server", "vorpcharacter_sv\VORP.Character.Server.csproj", "{EAF3ACC4-8378-4923-ADD0-5959DC21DA03}"
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "VORP.Shared", "VORP.Shared\VORP.Shared.shproj", "{5FDA9865-AB7C-4D8E-8E29-D445FD6D6303}"
EndProject
Global
GlobalSection(SharedMSBuildProjectFiles) = preSolution
VORP.Shared\VORP.Shared.projitems*{5fda9865-ab7c-4d8e-8e29-d445fd6d6303}*SharedItemsImports = 13
EndGlobalSection
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Development|Any CPU = Development|Any CPU
Expand Down
102 changes: 102 additions & 0 deletions VORP-Character/VORP.Shared/Models/Position.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
using System.Runtime.Serialization;

namespace Vorp.Shared.Models
{
[DataContract]
public class Position
{
[DataMember(Name = "x")]
public float X { get; set; }

[DataMember(Name = "y")]
public float Y { get; set; }

[DataMember(Name = "z")]
public float Z { get; set; }

[DataMember(Name = "heading")]
public float H { get; set; }

public Position()
{
}

public Position(float x, float y, float z, float heading)
{
X = x;
Y = y;
Z = z;
H = heading;
}

public Position(float x, float y, float z)
{
X = x;
Y = y;
Z = z;
}

public Position Subtract(Position position)
{
X = X - position.X;
Y = Y - position.Y;
Z = Z - position.Z;
H = H - position.H;

return this;
}

public Position Add(Position position)
{
X = X + position.X;
Y = Y + position.Y;
Z = Z + position.Z;
H = H + position.H;

return this;
}

public Position Clone()
{
return new Position(X, Y, Z, H);
}

public Vector3 ToVector3()
{
return new Vector3(X, Y, Z);
}

public override string ToString()
{
return JsonConvert.SerializeObject(this);
}
}

public static class VectorExtensions
{
public static Position ToPosition(this Vector3 vector3, float heading = 0f)
{
return new Position(vector3.X, vector3.Y, vector3.Z, heading);
}
}

public class RotatablePosition
{
public float X { get; set; }
public float Y { get; set; }
public float Z { get; set; }
public float Yaw { get; set; }
public float Pitch { get; set; }
public float Roll { get; set; }

public RotatablePosition(float x, float y, float z, float yaw, float pitch, float roll)
{
X = x;
Y = y;
Z = z;
Yaw = yaw;
Pitch = pitch;
Roll = roll;
}
}
}
14 changes: 14 additions & 0 deletions VORP-Character/VORP.Shared/VORP.Shared.projitems
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<MSBuildAllProjects Condition="'$(MSBuildVersion)' == '' Or '$(MSBuildVersion)' &lt; '16.0'">$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
<HasSharedItems>true</HasSharedItems>
<SharedGUID>5fda9865-ab7c-4d8e-8e29-d445fd6d6303</SharedGUID>
</PropertyGroup>
<PropertyGroup Label="Configuration">
<Import_RootNamespace>VORP.Shared</Import_RootNamespace>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(MSBuildThisFileDirectory)Models\Position.cs" />
</ItemGroup>
</Project>
13 changes: 13 additions & 0 deletions VORP-Character/VORP.Shared/VORP.Shared.shproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Globals">
<ProjectGuid>5fda9865-ab7c-4d8e-8e29-d445fd6d6303</ProjectGuid>
<MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>
</PropertyGroup>
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.Common.Default.props" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.Common.props" />
<PropertyGroup />
<Import Project="VORP.Shared.projitems" Label="Shared" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.CSharp.targets" />
</Project>
Binary file not shown.
Binary file not shown.
8 changes: 5 additions & 3 deletions VORP-Character/build/vorp_character/fxmanifest.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ fx_version 'adamant'
rdr3_warning 'I acknowledge that this is a prerelease build of RedM, and I am aware my resources *will* become incompatible once RedM ships.'

client_scripts {
'vorpcharacter_cl.net.dll'
'*.Client.net.dll'
}

server_scripts {
'vorpcharacter_sv.net.dll'
'*.Server.net.dll'
}

files {
Expand All @@ -16,4 +16,6 @@ files {
'Newtonsoft.Json.dll',
}

debug_enabled 'false'
debug_enabled 'false'
vorp_core_csharp_new 'true'
vorp_database_resource 'ghmattimysql'
Binary file not shown.
2 changes: 1 addition & 1 deletion VORP-Character/vorpcharacter_cl/Cache.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using CitizenFX.Core.Native;

namespace VorpCharacter
namespace VORP.Character.Client
{
public class Cache
{
Expand Down
2 changes: 1 addition & 1 deletion VORP-Character/vorpcharacter_cl/Diagnostics/Logger.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using CitizenFX.Core.Native;
using System;

namespace VorpCharacter.Diagnostics
namespace VORP.Character.Client.Diagnostics
{
class Logger
{
Expand Down
2 changes: 1 addition & 1 deletion VORP-Character/vorpcharacter_cl/Enums/eAttributeCore.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace VorpCharacter.Enums
namespace VORP.Character.Client.Enums
{
public enum eAttributeCore : int
{
Expand Down
2 changes: 1 addition & 1 deletion VORP-Character/vorpcharacter_cl/Enums/eControl.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace VorpCharacter.Enums
namespace VORP.Character.Client.Enums
{
public enum eControl : uint
{
Expand Down
2 changes: 1 addition & 1 deletion VORP-Character/vorpcharacter_cl/Enums/eModel.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace VorpCharacter.Enums
namespace VORP.Character.Client.Enums
{
public enum eModel : uint
{
Expand Down
2 changes: 1 addition & 1 deletion VORP-Character/vorpcharacter_cl/Enums/ePedComponent.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace VorpCharacter.Enums
namespace VORP.Character.Client.Enums
{
public enum ePedComponent : uint
{
Expand Down
2 changes: 1 addition & 1 deletion VORP-Character/vorpcharacter_cl/Enums/ePedFaceFeature.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace VorpCharacter.Enums
namespace VORP.Character.Client.Enums
{
public enum ePedFaceFeature : uint
{
Expand Down
4 changes: 2 additions & 2 deletions VORP-Character/vorpcharacter_cl/Extensions/Common.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using CitizenFX.Core;
using VorpCharacter.Model;
using VORP.Character.Client.Model;

namespace VorpCharacter.Extensions
namespace VORP.Character.Client.Extensions
{
static class Common
{
Expand Down
8 changes: 4 additions & 4 deletions VORP-Character/vorpcharacter_cl/Menus/ClothesMenu.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
using CitizenFX.Core;
using MenuAPI;
using System.Collections.Generic;
using VorpCharacter.Extensions;
using VorpCharacter.Script;
using VorpCharacter.Utils;
using VORP.Character.Client.Extensions;
using VORP.Character.Client.Script;
using VORP.Character.Client.Utils;

namespace VorpCharacter.Menus
namespace VORP.Character.Client.Menus
{
class ClothesMenu
{
Expand Down
6 changes: 3 additions & 3 deletions VORP-Character/vorpcharacter_cl/Menus/FaceMenu.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
using CitizenFX.Core;
using MenuAPI;
using System.Collections.Generic;
using VorpCharacter.Extensions;
using VorpCharacter.Script;
using VORP.Character.Client.Extensions;
using VORP.Character.Client.Script;

namespace VorpCharacter.Menus
namespace VORP.Character.Client.Menus
{
class FaceMenu
{
Expand Down
8 changes: 4 additions & 4 deletions VORP-Character/vorpcharacter_cl/Menus/MainMenu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
using MenuAPI;
using System.Collections.Generic;
using System.Linq;
using VorpCharacter.Extensions;
using VorpCharacter.Script;
using VorpCharacter.Utils;
using VORP.Character.Client.Extensions;
using VORP.Character.Client.Script;
using VORP.Character.Client.Utils;

namespace VorpCharacter.Menus
namespace VORP.Character.Client.Menus
{
class MainMenu
{
Expand Down
8 changes: 4 additions & 4 deletions VORP-Character/vorpcharacter_cl/Menus/SkinMenu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
using MenuAPI;
using System.Collections.Generic;
using System.Linq;
using VorpCharacter.Extensions;
using VorpCharacter.Script;
using VorpCharacter.Utils;
using VORP.Character.Client.Extensions;
using VORP.Character.Client.Script;
using VORP.Character.Client.Utils;

namespace VorpCharacter.Menus
namespace VORP.Character.Client.Menus
{
/*
* Note:
Expand Down
2 changes: 1 addition & 1 deletion VORP-Character/vorpcharacter_cl/Model/Config.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Collections.Generic;
using System.Runtime.Serialization;

namespace VorpCharacter.Model
namespace VORP.Character.Client.Model
{
[DataContract]
public class Male
Expand Down
2 changes: 1 addition & 1 deletion VORP-Character/vorpcharacter_cl/Model/Position.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace VorpCharacter.Model
namespace VORP.Character.Client.Model
{
public class Position
{
Expand Down
2 changes: 1 addition & 1 deletion VORP-Character/vorpcharacter_cl/Model/VorpPlayer.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using CitizenFX.Core;
using static CitizenFX.Core.Native.API;

namespace VorpCharacter.Model
namespace VORP.Character.Client.Model
{
public static class VorpPlayer
{
Expand Down
6 changes: 3 additions & 3 deletions VORP-Character/vorpcharacter_cl/PluginManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using VorpCharacter.Diagnostics;
using VorpCharacter.Model;
using VORP.Character.Client.Diagnostics;
using VORP.Character.Client.Model;
using static CitizenFX.Core.Native.API;

namespace VorpCharacter
namespace VORP.Character.Client
{
public class PluginManager : BaseScript
{
Expand Down
10 changes: 5 additions & 5 deletions VORP-Character/vorpcharacter_cl/Script/CreateCharacter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
using System.Globalization;
using System.Linq;
using System.Threading.Tasks;
using VorpCharacter.Enums;
using VorpCharacter.Extensions;
using VorpCharacter.Model;
using VorpCharacter.Utils;
using VORP.Character.Client.Enums;
using VORP.Character.Client.Extensions;
using VORP.Character.Client.Model;
using VORP.Character.Client.Utils;
using static CitizenFX.Core.Native.API;

namespace VorpCharacter.Script
namespace VORP.Character.Client.Script
{
public class CreateCharacter : BaseScript
{
Expand Down
Loading