5 DayZGame dz_game = DayZGame.Cast(
GetGame() );
8 Print(
"SyncEvents -> RegisterEvents");
17 if ( ctx.
Read( event_data ) )
19 OnSyncEvent( event_data.param1, event_data.param2, target );
57 if ( (victim && victim.IsPlayer()) || (killer && killer.IsPlayer()) )
69 if ( killer && killer.IsPlayer() && victim.GetID() != killer.GetID() )
71 recipient = Man.Cast(killer);
73 else if ( victim && victim.IsPlayer() )
75 recipient = Man.Cast(victim);
105 SendSyncEvent(rpc_event_id, sync_event_type, data, guaranteed, recipient.GetIdentity());
void RPCSingleParam(Object target, int rpc_type, Param param, bool guaranteed, PlayerIdentity recipient=null)
see CGame.RPC
static void SyncEvent_OnRecievedPlayerList(SyncPlayerList player_list)
static ref ScriptInvoker SyncEvent_OnPlayerIgnitedFireplace
static ref ScriptInvoker SyncEvent_OnEntityKilled
The class that will be instanced (moddable)
Serialization general interface. Serializer API works with:
proto bool Read(void value_in)
ref SyncPlayerList m_ServerPlayerList
ref SyncEntityKillInfo m_EntityKill
static void SendPlayerIgnatedFireplace(Man player, EFireIgniteType ignite_type)
static void OnSyncEvent(ESyncEvent event_type, SyncData data, Object target)
static void SendEntityKilled(EntityAI victim, EntityAI killer, EntityAI source, bool is_headshot)
static void RegisterEvents()
static void Event_OnRPC(PlayerIdentity sender, Object target, int rpc_type, ParamsReadContext ctx)
static private void SendSyncEventEx(ERPCs rpc_event_id, ESyncEvent sync_event_type, SyncData data=null, bool guaranteed=true, Man recipient=null)
static private void SendSyncEvent(ERPCs rpc_event_id, ESyncEvent sync_event_type, SyncData data=null, bool guaranteed=true, PlayerIdentity player_target=null)
static void SendPlayerList()
proto native CGame GetGame()
proto void Print(void var)
Prints content of variable to console/log.