Merge branch 'develop' of ssh://development.life-of-german.org:451/log-gtav/reallife-gamemode into develop
This commit is contained in:
@@ -31,8 +31,6 @@ const colors = [
|
||||
export default function customNametags() {
|
||||
|
||||
mp.nametags.enabled = false;
|
||||
|
||||
|
||||
|
||||
mp.events.add('render', (nametags) => {
|
||||
const graphics = mp.game.graphics;
|
||||
@@ -53,6 +51,7 @@ export default function customNametags() {
|
||||
y -= scale * (0.005 * (screenRes.y / 1080));
|
||||
|
||||
let colorId = game.players.at(player.remoteId).nametagColor;
|
||||
|
||||
let color = colors.find(c => c.id === colorId).color;
|
||||
|
||||
mp.game.graphics.drawText(player.name + " (" + player.remoteId + ")", [x, y],
|
||||
|
||||
@@ -72,7 +72,8 @@ class RagePlayer extends RageEntity implements IPlayer {
|
||||
}
|
||||
|
||||
get nametagColor(): number {
|
||||
var color = this.player.getVariable("nametagColor");
|
||||
var color = this.player.getVariable("nameTagColor");
|
||||
game.ui.sendChatMessage(`player = ${this.player.name} - color = ${color}`);
|
||||
if (!color)
|
||||
return 0;
|
||||
return color;
|
||||
|
||||
5562
ReallifeGamemode.Client/package-lock.json
generated
5562
ReallifeGamemode.Client/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -22,6 +22,5 @@
|
||||
"ProjectOpened": [
|
||||
"watch"
|
||||
]
|
||||
},
|
||||
"dependencies": {}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -55,7 +55,18 @@ namespace ReallifeGamemode.Server.Commands
|
||||
{
|
||||
message = Regex.Replace(message, "(~[a-zA-Z]~)|(!{(.*)})", "");
|
||||
|
||||
string broadcastMessage = "!{FF0000}** " + player.GetUser().GetFactionRank().RankName + " " + player.Name + ": " + message + " **";
|
||||
string rank = string.Empty;
|
||||
|
||||
if(f.Name == "Ballas" || f.Name == "Grove")
|
||||
{
|
||||
rank = player.GetUser().GetFactionRank().RankName;
|
||||
}
|
||||
else
|
||||
{
|
||||
rank = "[ADMIN]";
|
||||
}
|
||||
|
||||
string broadcastMessage = "!{FF0000}** " + rank + " " + player.Name + ": " + message + " **";
|
||||
using (var context = new DatabaseContext())
|
||||
{
|
||||
ChatService.BroadcastFaction(broadcastMessage, context.Factions.ToList().FindAll(c => c.GangOwned), true);
|
||||
@@ -188,12 +199,25 @@ namespace ReallifeGamemode.Server.Commands
|
||||
|
||||
message = Regex.Replace(message, "(~[a-zA-Z]~)|(!{(.*)})", "");
|
||||
|
||||
string broadcastMsg = "~y~[" + player.GetUser().Faction.Name + "] " + player.Name + ": " + message;
|
||||
string factionName = string.Empty;
|
||||
if(user.FactionLeader)
|
||||
{
|
||||
factionName = player.GetUser().Faction.Name;
|
||||
}
|
||||
else
|
||||
{
|
||||
factionName = "ADMIN";
|
||||
}
|
||||
|
||||
string broadcastMsg = "~y~[" + factionName + "] " + player.Name + ": " + message;
|
||||
|
||||
NAPI.Pools.GetAllPlayers().ForEach(p =>
|
||||
{
|
||||
User pUser = p.GetUser();
|
||||
if (pUser?.FactionLeader ?? false || pUser.IsAdmin(AdminLevel.ADMIN)) ChatService.SendMessage(p, broadcastMsg);
|
||||
if (pUser.FactionLeader || pUser.IsAdmin(AdminLevel.ADMIN))
|
||||
{
|
||||
ChatService.SendMessage(p, broadcastMsg);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -58,12 +58,9 @@ namespace ReallifeGamemode.Server.Services
|
||||
{
|
||||
User user = c.GetUser();
|
||||
Faction f = user?.Faction;
|
||||
if (f != null)
|
||||
if (f != null && factions.Find(fT => fT.Id == f.Id) != null)
|
||||
{
|
||||
if (factions.Find(fT => fT.Id == f.Id) != null)
|
||||
{
|
||||
ChatService.SendMessage(c, message);
|
||||
}
|
||||
ChatService.SendMessage(c, message);
|
||||
}
|
||||
else if (user.IsAdmin(AdminLevel.ADMIN) && toAdmins)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user