Merge branch 'develop' of ssh://development.life-of-german.org:451/log-gtav/reallife-gamemode into develop
This commit is contained in:
@@ -22,7 +22,6 @@ export default function ahelp(globalData: IGlobalData): void {
|
|||||||
ahelpBrowser = mp.browsers.new('package://assets/html/helpcommand/ahelp.html');
|
ahelpBrowser = mp.browsers.new('package://assets/html/helpcommand/ahelp.html');
|
||||||
mp.gui.chat.activate(false);
|
mp.gui.chat.activate(false);
|
||||||
mp.gui.cursor.show(true, true);
|
mp.gui.cursor.show(true, true);
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -37,7 +36,6 @@ export default function ahelp(globalData: IGlobalData): void {
|
|||||||
globalData.InInput = false;
|
globalData.InInput = false;
|
||||||
mp.gui.cursor.show(false, false);
|
mp.gui.cursor.show(false, false);
|
||||||
mp.gui.chat.activate(true);
|
mp.gui.chat.activate(true);
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
3
ReallifeGamemode.Client/dlcpacks/Fahrstuhl/dlc.rpf
Normal file
3
ReallifeGamemode.Client/dlcpacks/Fahrstuhl/dlc.rpf
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:6f1478ada7534b954caaec991bb2a3a24767b978de82533965e0c21c3d02831f
|
||||||
|
size 8491
|
||||||
@@ -234,12 +234,14 @@ import bankMenuHandle from './Interaction/bankmenu';
|
|||||||
import InputHelper from './inputhelper';
|
import InputHelper from './inputhelper';
|
||||||
bankMenuHandle(globalData);
|
bankMenuHandle(globalData);
|
||||||
|
|
||||||
import Introduction from './Gui/introduction';
|
|
||||||
Introduction(globalData);
|
|
||||||
|
|
||||||
import ahelp from './Gui/ahelp';
|
import ahelp from './Gui/ahelp';
|
||||||
ahelp(globalData);
|
ahelp(globalData);
|
||||||
|
|
||||||
|
import Introduction from './Gui/introduction';
|
||||||
|
Introduction(globalData);
|
||||||
|
|
||||||
|
|
||||||
import userhelp from './Gui/userhelp';
|
import userhelp from './Gui/userhelp';
|
||||||
userhelp(globalData);
|
userhelp(globalData);
|
||||||
|
|
||||||
|
|||||||
@@ -263,9 +263,9 @@
|
|||||||
self.attacker = null;
|
self.attacker = null;
|
||||||
//self.blip.setFlashes(false);
|
//self.blip.setFlashes(false);
|
||||||
mp.game.invoke(Natives.SET_BLIP_FLASHES, self.blip, false);
|
mp.game.invoke(Natives.SET_BLIP_FLASHES, self.blip, false);
|
||||||
self.blip.destroy();
|
//self.blip.destroy();
|
||||||
self.setColor(self.owner);
|
self.setColor(self.owner);
|
||||||
self.blip.setColour(self.color);
|
//self.blip.setColour(self.color);
|
||||||
mp.game.invoke(Natives.SET_BLIP_COLOUR, self.blip, self.color);
|
mp.game.invoke(Natives.SET_BLIP_COLOUR, self.blip, self.color);
|
||||||
self.setLeaderColShape();
|
self.setLeaderColShape();
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -81,6 +81,14 @@
|
|||||||
mp.game.invoke("0x4A3DC7ECCC321032", player, meelemodifier);
|
mp.game.invoke("0x4A3DC7ECCC321032", player, meelemodifier);
|
||||||
//mp.gui.chat.push("Modifier: " + modifier + "MeeleModifier: " + meelemodifier);
|
//mp.gui.chat.push("Modifier: " + modifier + "MeeleModifier: " + meelemodifier);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
mp.events.add("entityStreamIn", (entity) => {
|
||||||
|
if (entity.type === "player") {
|
||||||
|
entity.setSuffersCriticalHits(false);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
/*mp.events.add('playerWeaponShot', (targetPosition, targetEntity) => {
|
/*mp.events.add('playerWeaponShot', (targetPosition, targetEntity) => {
|
||||||
for (var x in this.weaponAmmo) {
|
for (var x in this.weaponAmmo) {
|
||||||
if (this.weaponAmmo[x].id != this.currentWeapon) {
|
if (this.weaponAmmo[x].id != this.currentWeapon) {
|
||||||
|
|||||||
24
ReallifeGamemode.Server/Business/AdminDealerBusiness.cs
Normal file
24
ReallifeGamemode.Server/Business/AdminDealerBusiness.cs
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
using GTANetworkAPI;
|
||||||
|
|
||||||
|
namespace ReallifeGamemode.Server.Business
|
||||||
|
{
|
||||||
|
internal class AdminDealerBusiness : CarDealerBusinessBase
|
||||||
|
{
|
||||||
|
public override int Id => 12;
|
||||||
|
|
||||||
|
public override string Name => "Admin Carshop";
|
||||||
|
|
||||||
|
public override Vector3 Position => new Vector3(1295.3, 264.76,-49.05);
|
||||||
|
|
||||||
|
public override Vector3 CarSpawnPositon => new Vector3(1266.38, 230.3, -48.67);
|
||||||
|
|
||||||
|
public override float CarSpawnHeading => 176.6f;
|
||||||
|
|
||||||
|
public override int? BlipSprite => 225;
|
||||||
|
|
||||||
|
|
||||||
|
public override void Load()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -222,7 +222,7 @@ namespace ReallifeGamemode.Server.Commands
|
|||||||
|
|
||||||
#region Support
|
#region Support
|
||||||
|
|
||||||
[Command("tog", "~m~Benutzung: ~s~/tog [Typ = ~g~ip~s~, ~g~deathlogs~s~, ~g~lc~s~", GreedyArg = true)]
|
[Command("tog", "~m~Benutzung: ~s~/tog [Typ = ~g~IP~s~, ~g~deathlogs~s~, ~g~LC~s~]", GreedyArg = true)]
|
||||||
public void CmdTog(Player player, string typ, string option1 = null, string option2 = null)
|
public void CmdTog(Player player, string typ, string option1 = null, string option2 = null)
|
||||||
{
|
{
|
||||||
if (!player.GetUser()?.IsAdmin(AdminLevel.SUPPORTER) ?? true)
|
if (!player.GetUser()?.IsAdmin(AdminLevel.SUPPORTER) ?? true)
|
||||||
|
|||||||
@@ -190,7 +190,7 @@ namespace ReallifeGamemode.Server.DrivingSchool
|
|||||||
veh.Position = sVeh.Position;
|
veh.Position = sVeh.Position;
|
||||||
veh.Rotation = new Vector3(0, 0, sVeh.Heading);
|
veh.Rotation = new Vector3(0, 0, sVeh.Heading);
|
||||||
|
|
||||||
user.Position = new Vector3(-813.17, -1354.5, 4.14);
|
user.Position = new Vector3(-814.39, -1336.76, 5.15);
|
||||||
}
|
}
|
||||||
|
|
||||||
[RemoteEvent("drivingSchoolEvent")]
|
[RemoteEvent("drivingSchoolEvent")]
|
||||||
@@ -304,7 +304,7 @@ namespace ReallifeGamemode.Server.DrivingSchool
|
|||||||
veh.Position = sVeh.Position;
|
veh.Position = sVeh.Position;
|
||||||
veh.Rotation = new Vector3(0, 0, sVeh.Heading);
|
veh.Rotation = new Vector3(0, 0, sVeh.Heading);
|
||||||
|
|
||||||
user.Position = new Vector3(-813.17, -1354.5, 4.14);
|
user.Position = new Vector3(-814.39, -1336.76, 5.15);
|
||||||
}
|
}
|
||||||
|
|
||||||
[RemoteEvent("bikeSchoolEvent")]
|
[RemoteEvent("bikeSchoolEvent")]
|
||||||
|
|||||||
@@ -546,13 +546,7 @@ namespace ReallifeGamemode.Server.Events
|
|||||||
player.TriggerEvent("renderTextOnScreen", "Steige nun in eines der Fahrzeuge und starte den Motor mit der Taste 'N'.");
|
player.TriggerEvent("renderTextOnScreen", "Steige nun in eines der Fahrzeuge und starte den Motor mit der Taste 'N'.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}else
|
} else if (nearestJobPoint.jobId == 3 && player.GetUser().JobId == 3)
|
||||||
{
|
|
||||||
player.SendNotification("~r~[Fehler] ~w~ Du hast diesen Job nicht angenommen.");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (nearestJobPoint.jobId == 3 && player.GetUser().JobId == 3)
|
|
||||||
{
|
{
|
||||||
if (nearestJobPoint.Skill < 300 && player.GetUser().PilotSkill >= 0)
|
if (nearestJobPoint.Skill < 300 && player.GetUser().PilotSkill >= 0)
|
||||||
{
|
{
|
||||||
@@ -569,12 +563,12 @@ namespace ReallifeGamemode.Server.Events
|
|||||||
player.TriggerEvent("renderTextOnScreen", "Steige nun in eines der Flugzeuge und starte den Motor mit der Taste 'N'.");
|
player.TriggerEvent("renderTextOnScreen", "Steige nun in eines der Flugzeuge und starte den Motor mit der Taste 'N'.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}else
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
player.SendNotification("~r~[Fehler] ~w~ Du hast diesen Job nicht angenommen.");
|
player.SendChatMessage("~y~[JOB] ~r~Dein Skilllevel ist noch zu niedrig.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nearestJobPoint.Skill >= 300 && player.GetUser().PilotSkill >= 300)
|
if (nearestJobPoint.Skill >= 300 && player.GetUser().PilotSkill >= 300)
|
||||||
{
|
{
|
||||||
if (job.GetUsersInJob().Contains(player))
|
if (job.GetUsersInJob().Contains(player))
|
||||||
@@ -596,7 +590,8 @@ namespace ReallifeGamemode.Server.Events
|
|||||||
player.SendChatMessage("~y~[JOB] ~r~Dein Skilllevel ist noch zu niedrig.");
|
player.SendChatMessage("~y~[JOB] ~r~Dein Skilllevel ist noch zu niedrig.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}else
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
player.SendNotification("~r~[Fehler] ~w~ Du hast diesen Job nicht angenommen.");
|
player.SendNotification("~r~[Fehler] ~w~ Du hast diesen Job nicht angenommen.");
|
||||||
return;
|
return;
|
||||||
@@ -616,7 +611,8 @@ namespace ReallifeGamemode.Server.Events
|
|||||||
public void KeyPressO(Player player)
|
public void KeyPressO(Player player)
|
||||||
{
|
{
|
||||||
if (!player.IsLoggedIn()) return;
|
if (!player.IsLoggedIn()) return;
|
||||||
List<Player> players = NAPI.Pools.GetAllPlayers();
|
List<Player> players = NAPI.Pools.GetAllPlayers().Where(p => p.IsLoggedIn() == true).ToList();
|
||||||
|
|
||||||
var listPlayers = players.Select(p => new
|
var listPlayers = players.Select(p => new
|
||||||
{
|
{
|
||||||
Id = p.Handle.Value,
|
Id = p.Handle.Value,
|
||||||
|
|||||||
@@ -63,6 +63,7 @@ namespace ReallifeGamemode.Server.Events
|
|||||||
player.SetData("duty", false);
|
player.SetData("duty", false);
|
||||||
player.SetData("Adminduty", false);
|
player.SetData("Adminduty", false);
|
||||||
player.TriggerEvent("SERVER:SET_HANDMONEY", user.Handmoney, 0);
|
player.TriggerEvent("SERVER:SET_HANDMONEY", user.Handmoney, 0);
|
||||||
|
player.TriggerEvent("headshotoff");
|
||||||
Gangwar.Gangwar.loadPlayer(player);
|
Gangwar.Gangwar.loadPlayer(player);
|
||||||
if (user.FactionLeader)
|
if (user.FactionLeader)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -289,8 +289,8 @@ namespace ReallifeGamemode.Server.Gangwar
|
|||||||
Turfs turf = dbContext.Turfs.Where(t => t.Id == getId()).FirstOrDefault();
|
Turfs turf = dbContext.Turfs.Where(t => t.Id == getId()).FirstOrDefault();
|
||||||
turf.Owner = this.Owner;
|
turf.Owner = this.Owner;
|
||||||
turf.FactionId = dbContext.Factions.Where(f => f.Name == this.Owner).FirstOrDefault().Id;
|
turf.FactionId = dbContext.Factions.Where(f => f.Name == this.Owner).FirstOrDefault().Id;
|
||||||
dbContext.SaveChanges();
|
|
||||||
}
|
}
|
||||||
|
dbContext.SaveChanges();
|
||||||
}
|
}
|
||||||
this.Attacker = null;
|
this.Attacker = null;
|
||||||
foreach (var c in playerInGangwar)
|
foreach (var c in playerInGangwar)
|
||||||
|
|||||||
@@ -220,18 +220,18 @@ namespace ReallifeGamemode.Server.Job
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
using (var dbContext = new DatabaseContext())
|
||||||
|
{
|
||||||
foreach (var data in muellmanData)
|
foreach (var data in muellmanData)
|
||||||
{
|
{
|
||||||
if (data.getDataFromClient(player) == null) continue;
|
if (data.getDataFromClient(player) == null) continue;
|
||||||
Player target = data.getPartnerClient(player);
|
Player target = data.getPartnerClient(player);
|
||||||
User user1 = player.GetUser();
|
User user1 = player.GetUser(dbContext);
|
||||||
User user2 = target.GetUser();
|
User user2 = target.GetUser(dbContext);
|
||||||
using (var dbContext = new DatabaseContext())
|
|
||||||
{
|
//user1 = player.GetUser(dbContext);
|
||||||
user1 = player.GetUser(dbContext);
|
//user2 = target.GetUser(dbContext);
|
||||||
user2 = target.GetUser(dbContext);
|
/*user1.trashcount += 1;
|
||||||
user1.trashcount += 1;
|
|
||||||
|
|
||||||
if (user1.trashcount == 20)
|
if (user1.trashcount == 20)
|
||||||
{
|
{
|
||||||
@@ -249,11 +249,12 @@ namespace ReallifeGamemode.Server.Job
|
|||||||
target.SendChatMessage("~y~Dies ist dein 20ter Müllsack.");
|
target.SendChatMessage("~y~Dies ist dein 20ter Müllsack.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dbContext.SaveChanges();
|
dbContext.SaveChanges();
|
||||||
}
|
|
||||||
player.AddAttachment("binbag", true);
|
player.AddAttachment("binbag", true);
|
||||||
if (target != null)
|
*/
|
||||||
if (player.GetUser().trashcount >= 20)
|
|
||||||
|
if (player.GetUser(dbContext).trashcount >= 20)
|
||||||
{
|
{
|
||||||
ChatService.SendMessage((Player)player, "~y~Job: ~s~Der Müllwagen ist voll. Fahre nun zurück zur Recyclinganlage!");
|
ChatService.SendMessage((Player)player, "~y~Job: ~s~Der Müllwagen ist voll. Fahre nun zurück zur Recyclinganlage!");
|
||||||
if (target != null)
|
if (target != null)
|
||||||
@@ -265,10 +266,8 @@ namespace ReallifeGamemode.Server.Job
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
using (var dbContext = new DatabaseContext())
|
//user1 = player.GetUser(dbContext);
|
||||||
{
|
//user2 = target.GetUser(dbContext);
|
||||||
user1 = player.GetUser(dbContext);
|
|
||||||
user2 = target.GetUser(dbContext);
|
|
||||||
user1.trashcount += 1;
|
user1.trashcount += 1;
|
||||||
player.SendNotification("Müllsack: " + user1.trashcount + " von 20.");
|
player.SendNotification("Müllsack: " + user1.trashcount + " von 20.");
|
||||||
if (target != null)
|
if (target != null)
|
||||||
@@ -278,10 +277,9 @@ namespace ReallifeGamemode.Server.Job
|
|||||||
}
|
}
|
||||||
dbContext.SaveChanges();
|
dbContext.SaveChanges();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
player.AddAttachment("binbag", true);
|
player.AddAttachment("binbag", true);
|
||||||
if (target != null)
|
|
||||||
if (player.GetUser().trashcount >= 20)
|
if (player.GetUser(dbContext).trashcount >= 20)
|
||||||
{
|
{
|
||||||
ChatService.SendMessage((Player)player, "~y~Job: ~s~Der Müllwagen ist voll. Fahre nun zurück zur Recyclinganlage!");
|
ChatService.SendMessage((Player)player, "~y~Job: ~s~Der Müllwagen ist voll. Fahre nun zurück zur Recyclinganlage!");
|
||||||
if (target != null)
|
if (target != null)
|
||||||
@@ -293,15 +291,20 @@ namespace ReallifeGamemode.Server.Job
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
//user1 = player.GetUser(dbContext);
|
||||||
|
//user2 = target.GetUser(dbContext);
|
||||||
|
|
||||||
if (target != null)
|
if (target != null)
|
||||||
{
|
{
|
||||||
player.GetUser().Wage += 10;
|
user1.Wage += 10;
|
||||||
target.GetUser().Wage += 10;
|
user2.Wage += 10;
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
player.GetUser().Wage += 20;
|
user1.Wage += 20;
|
||||||
|
}
|
||||||
|
dbContext.SaveChanges();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
@@ -321,25 +324,24 @@ namespace ReallifeGamemode.Server.Job
|
|||||||
if (target != null) ChatService.SendMessage((Player)target, $"~y~Job: ~s~Fahrzeug wurde entleert. Säcke: {target.GetUser().trashcount}");
|
if (target != null) ChatService.SendMessage((Player)target, $"~y~Job: ~s~Fahrzeug wurde entleert. Säcke: {target.GetUser().trashcount}");
|
||||||
ChatService.SendMessage((Player)player, $"~y~Job: ~s~Fahrzeug wurde entleert. Säcke: {player.GetUser().trashcount}");
|
ChatService.SendMessage((Player)player, $"~y~Job: ~s~Fahrzeug wurde entleert. Säcke: {player.GetUser().trashcount}");
|
||||||
//bonus pro sack
|
//bonus pro sack
|
||||||
|
using (var dbContext = new DatabaseContext())
|
||||||
|
{
|
||||||
|
User user1 = player.GetUser(dbContext);
|
||||||
|
User user2 = target.GetUser(dbContext);
|
||||||
|
|
||||||
if (target != null)
|
if (target != null)
|
||||||
{
|
{
|
||||||
player.GetUser().Wage += 100;
|
user1.Wage += 100;
|
||||||
target.GetUser().Wage += 100;
|
user2.Wage += 100;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
player.GetUser().Wage += 200;
|
user1.Wage += 200;
|
||||||
}
|
}
|
||||||
User user1 = player.GetUser();
|
|
||||||
User user2 = target.GetUser();
|
|
||||||
using (var dbContext = new DatabaseContext())
|
|
||||||
{
|
|
||||||
user1 = player.GetUser(dbContext);
|
|
||||||
user2 = target.GetUser(dbContext);
|
|
||||||
|
|
||||||
user1.trashcount -= user1.trashcount;
|
user1.trashcount -= user1.trashcount;
|
||||||
if (target != null)
|
if (target != null) user2.trashcount -= user2.trashcount;
|
||||||
user2.trashcount -= user2.trashcount;
|
|
||||||
dbContext.SaveChanges();
|
dbContext.SaveChanges();
|
||||||
}
|
}
|
||||||
Console.WriteLine($"[DATA DEBUG] vehicle: {data.vehicle.DisplayName} | Players: {data.getClientsFromData().Count} | Säcke: {data.getTrashCount()}");
|
Console.WriteLine($"[DATA DEBUG] vehicle: {data.vehicle.DisplayName} | Players: {data.getClientsFromData().Count} | Säcke: {data.getTrashCount()}");
|
||||||
|
|||||||
@@ -169,6 +169,9 @@ namespace ReallifeGamemode.Server
|
|||||||
{
|
{
|
||||||
user.Player.TriggerEvent("SERVER:SET_HANDMONEY", user.Handmoney);
|
user.Player.TriggerEvent("SERVER:SET_HANDMONEY", user.Handmoney);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//IPLS
|
||||||
|
NAPI.World.RequestIpl("vw_casino_garage");
|
||||||
}
|
}
|
||||||
|
|
||||||
[RemoteEvent("CLIENT:Event")]
|
[RemoteEvent("CLIENT:Event")]
|
||||||
|
|||||||
Reference in New Issue
Block a user