diff --git a/ReallifeGamemode.Client/util/freeze.ts b/ReallifeGamemode.Client/util/freeze.ts index 4d8f6b2f..b4f57d13 100644 --- a/ReallifeGamemode.Client/util/freeze.ts +++ b/ReallifeGamemode.Client/util/freeze.ts @@ -345,6 +345,15 @@ dimension ); } + /*let dynamicPed = mp.peds.new(mp.game.joaat('mp_m_freemode_01'), mp.players.at(0).position, { dynamic: true }); + dynamicPed.controller = mp.players.at(0); + + let staticPed = mp.peds.new(mp.game.joaat('player_zero'), mp.players.at(0).position, + { + dynamic: false, // still server-side but not sync'ed anymore + frozen: true, + invincible: true + });*/ if (model == 40) { ped = mp.peds.new( mp.game.joaat('cs_bankman'), diff --git a/ReallifeGamemode.Server/Commands/AdminCommands.cs b/ReallifeGamemode.Server/Commands/AdminCommands.cs index 21d5ef36..d5f2c0a4 100644 --- a/ReallifeGamemode.Server/Commands/AdminCommands.cs +++ b/ReallifeGamemode.Server/Commands/AdminCommands.cs @@ -851,8 +851,8 @@ namespace ReallifeGamemode.Server.Commands } } - [Command("addped", "~m~Benutzung: ~s~/addped [model] [dimension]")] - public void CmdAdminSetSkill(Player player, int model, int dimension = 0) + [Command("addpped", "~m~Benutzung: ~s~/addpped [model] [dimension]")] + public void CmdAdminAddPPed(Player player, int model, uint dimension = 0) { if (!player.GetUser()?.IsAdmin(AdminLevel.ADMIN) ?? true) { @@ -860,8 +860,19 @@ namespace ReallifeGamemode.Server.Commands return; } player.TriggerEvent("CLIENT:AddPed", model, player.Position.X, player.Position.Y, player.Position.Z, player.Heading, dimension); + //NAPI.Ped.CreatePed(PedHash.Bankman, new Vector3(player.Position.X, player.Position.Y, player.Position.Z), player.Heading, dimension); + } + [Command("addgped", "~m~Benutzung: ~s~/addgped [model] [dimension]")] + public void CmdAdminAddGPed(Player player, int model, uint dimension = 0) + { + if (!player.GetUser()?.IsAdmin(AdminLevel.ADMIN) ?? true) + { + ChatService.NotAuthorized(player); + return; + } + //player.TriggerEvent("CLIENT:AddPed", model, player.Position.X, player.Position.Y, player.Position.Z, player.Heading, dimension); + Ped Peter = NAPI.Ped.CreatePed(PedHash.Bankman, new Vector3(player.Position.X, player.Position.Y, player.Position.Z), player.Heading, dimension); } - [Command("setskill", "~m~Benutzung: ~s~/setskill [Playerid] [Bus/Pilot] [Menge]")] public void CmdAdminSetSkill(Player player, string name, string Skill, int SkillLevel) {