1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-10 07:13:58 -05:00

implement dynamic command registration through game interface

This commit is contained in:
RaidMax
2023-06-03 22:46:15 -05:00
parent dfcf6e958c
commit cc67438b9a
5 changed files with 166 additions and 29 deletions

View File

@ -295,6 +295,11 @@ BuildEventRequest( responseExpected, eventType, eventSubtype, entOrId, data )
eventSubtype = "None";
}
if ( !IsDefined( entOrId ) )
{
entOrId = "-1";
}
if ( IsPlayer( entOrId ) )
{
entOrId = entOrId getEntityNumber();
@ -311,7 +316,7 @@ BuildEventRequest( responseExpected, eventType, eventSubtype, entOrId, data )
groupSeparator = GetSubStr( GetDvar( "GroupSeparatorChar" ), 0, 1 );
request = request + groupSeparator + eventType + groupSeparator + eventSubtype + groupSeparator + entOrId + groupSeparator + data;
eturn request;
return request;
}
MonitorBus()
@ -535,7 +540,14 @@ OnExecuteCommand( event )
if ( IsDefined( command ) )
{
response = executionContextEntity [[command]]( event, data );
if ( IsDefined( executionContextEntity ) )
{
response = executionContextEntity [[command]]( event, data );
}
else
{
[[command]]( event );
}
}
else
{