daily pastebin goal
47%
SHARE
TWEET

Untitled

a guest Mar 12th, 2015 39 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- Client side
  2. addEventHandler ( "onClientElementDataChange", localPlayer,
  3.         function ( data )
  4.                 if ( data == "testElemData" ) then
  5.                         outputChatBox ( "CLIENT SIDE: ELEMENT DATA WAS CHANGED" )
  6.                 end
  7.         end
  8. )
  9.  
  10. -- Server side
  11. addEventHandler ( "onElementDataChange", root,
  12.         function ( data )
  13.                 if ( data == "testElemData" ) then
  14.                         outputChatBox ( "SERVER SIDE: ELEMENT DATA WAS CHANGED" )
  15.                 end
  16.         end
  17. )
  18.  
  19. addCommandHandler ( "setdata",
  20.         function ( thePlayer )
  21.                 setElementData ( thePlayer, "testElemData", "HELLO WORLD" )
  22.         end
  23. )
  24.  
  25. addCommandHandler ( "removedata",
  26.         function ( thePlayer )
  27.                 removeElementData ( thePlayer, "testElemData" )
  28.         end
  29. )
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top