XaskeL

MTA CEvent

Feb 23rd, 2021
578
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. CEvent = setmetatable( { }, {
  2.     __index = function ( _, k )
  3.         return setmetatable( { m_sName = k,
  4.             Add = function ( self, bAllowRemoteTrigger, pRoot, pFunction )
  5.                 addEvent( self.m_sName, bAllowRemoteTrigger );
  6.                
  7.                 if ( pRoot and pFunction ) then
  8.                     addEventHandler ( self.m_sName, pRoot, pFunction );
  9.                 end
  10.             end }, { }
  11.         );
  12.     end;
  13. } );
RAW Paste Data