Server side prop control

This commit is contained in:
Sardelka
2022-07-02 17:14:56 +08:00
parent 335ea2ca38
commit d8ac486984
22 changed files with 392 additions and 112 deletions

View File

@ -4,6 +4,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
using RageCoop.Core.Scripting;
using RageCoop.Core;
namespace RageCoop.Server.Scripting
{
@ -28,6 +29,13 @@ namespace RageCoop.Server.Scripting
{
c.SendCustomEvent(CustomEvents.SetAutoRespawn, toggle );
}
public void SendServerObjectsTo(List<ServerProp> objects,List<Client> clients=null)
{
foreach(var obj in objects)
{
API.SendCustomEvent(CustomEvents.ServerPropSync, new() { obj.ID, obj.Model ,obj.Position,obj.Rotation },clients);
}
}
void NativeResponse(CustomEventReceivedArgs e)
{
try