RAGE Multiplayer 1.1.0-DP Update
/freeze was obselete and removed /unfreeze was obselete and removed /spectate was obselete and removed
This commit is contained in:
@@ -32,12 +32,12 @@ namespace ReallifeGamemode.Server.Gangwar
|
||||
}
|
||||
}
|
||||
|
||||
public static void loadClient(Client client)
|
||||
public static void loadPlayer(Player client)
|
||||
{
|
||||
client.TriggerEvent("GangAreas:Create", JsonConvert.SerializeObject(turfs.ToArray()));
|
||||
}
|
||||
|
||||
public static void loadTurfs_ToAllClients()
|
||||
public static void loadTurfs_ToAllPlayers()
|
||||
{
|
||||
NAPI.ClientEvent.TriggerClientEventForAll("GangAreas:Create", JsonConvert.SerializeObject(turfs.ToArray()));
|
||||
foreach(var l in NAPI.Pools.GetAllPlayers())
|
||||
@@ -50,13 +50,13 @@ namespace ReallifeGamemode.Server.Gangwar
|
||||
}
|
||||
}
|
||||
|
||||
public static void GangwarKill(Client killer, Client victim)
|
||||
public static void GangwarKill(Player killer, Player victim)
|
||||
{
|
||||
if (killer.HasData("GotInsideOfTurf") && victim.HasData("GotInsideOfTurf"))
|
||||
{
|
||||
foreach (var turf in getTurfs())
|
||||
{
|
||||
if (turf.getId() == victim.GetData("inGangWar"))
|
||||
if (turf.getId() == victim.GetData<int>("inGangWar"))
|
||||
{
|
||||
turf.setKill(victim.GetUser().Faction.Name);
|
||||
return;
|
||||
@@ -71,7 +71,7 @@ namespace ReallifeGamemode.Server.Gangwar
|
||||
}
|
||||
|
||||
[RemoteEvent("Gangarea:Enter")]
|
||||
public void RmtEvent_TurfEnter(Client client, string jsonId)
|
||||
public void RmtEvent_TurfEnter(Player client, string jsonId)
|
||||
{
|
||||
int id = JsonConvert.DeserializeObject<int>(jsonId);
|
||||
|
||||
@@ -86,7 +86,7 @@ namespace ReallifeGamemode.Server.Gangwar
|
||||
}
|
||||
|
||||
[RemoteEvent("Gangarea:Leave")]
|
||||
public void RmtEvent_TurfLeave(Client client, string jsonId)
|
||||
public void RmtEvent_TurfLeave(Player client, string jsonId)
|
||||
{
|
||||
int id = JsonConvert.DeserializeObject<int>(jsonId);
|
||||
|
||||
@@ -101,7 +101,7 @@ namespace ReallifeGamemode.Server.Gangwar
|
||||
}
|
||||
|
||||
[RemoteEvent("SERVER:SetTurf")]
|
||||
public void RmtEvent_SetTurf(Client client, string jsonX, string jsonY, string jsonRot, string jsonRange, string Name)
|
||||
public void RmtEvent_SetTurf(Player client, string jsonX, string jsonY, string jsonRot, string jsonRange, string Name)
|
||||
{
|
||||
float pX = JsonConvert.DeserializeObject<float>(jsonX);
|
||||
float pY = (float)JsonConvert.DeserializeObject<float>(jsonY);
|
||||
@@ -125,11 +125,11 @@ namespace ReallifeGamemode.Server.Gangwar
|
||||
dbContext.SaveChanges();
|
||||
}
|
||||
loadTurfs();
|
||||
loadTurfs_ToAllClients();
|
||||
loadTurfs_ToAllPlayers();
|
||||
}
|
||||
|
||||
[RemoteEvent("SERVER:DeleteTurf")]
|
||||
public void RmtEvent_DeleteTurf(Client client, string jsonId)
|
||||
public void RmtEvent_DeleteTurf(Player client, string jsonId)
|
||||
{
|
||||
int id = JsonConvert.DeserializeObject<int>(jsonId);
|
||||
if (id == -1)
|
||||
@@ -145,13 +145,13 @@ namespace ReallifeGamemode.Server.Gangwar
|
||||
dbContext.Turfs.Remove(dturf);
|
||||
dbContext.SaveChanges();
|
||||
loadTurfs();
|
||||
loadTurfs_ToAllClients();
|
||||
loadTurfs_ToAllPlayers();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[RemoteEvent("SERVER:Turf_SetNewLeaderPoint")]
|
||||
public void RmtEvent_SetNewLeaderPoint(Client client, string vector, string jsonId) {
|
||||
public void RmtEvent_SetNewLeaderPoint(Player client, string vector, string jsonId) {
|
||||
int id = JsonConvert.DeserializeObject<int>(jsonId);
|
||||
if (id == -1)
|
||||
{
|
||||
@@ -166,14 +166,14 @@ namespace ReallifeGamemode.Server.Gangwar
|
||||
dturf.Vector = vector;
|
||||
dbContext.SaveChanges();
|
||||
loadTurfs();
|
||||
loadTurfs_ToAllClients();
|
||||
loadTurfs_ToAllPlayers();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[RemoteEvent("SERVER:StartGangwar")]
|
||||
public void RmtEvent_StartGangwar(Client client)
|
||||
public void RmtEvent_StartGangwar(Player client)
|
||||
{
|
||||
if (!client.GetUser().FactionLeader)
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user