Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Client side
- addEventHandler ( "onClientElementDataChange", localPlayer,
- function ( data )
- if ( data == "testElemData" ) then
- outputChatBox ( "CLIENT SIDE: ELEMENT DATA WAS CHANGED" )
- end
- end
- )
- -- Server side
- addEventHandler ( "onElementDataChange", root,
- function ( data )
- if ( data == "testElemData" ) then
- outputChatBox ( "SERVER SIDE: ELEMENT DATA WAS CHANGED" )
- end
- end
- )
- addCommandHandler ( "setdata",
- function ( thePlayer )
- setElementData ( thePlayer, "testElemData", "HELLO WORLD" )
- end
- )
- addCommandHandler ( "removedata",
- function ( thePlayer )
- removeElementData ( thePlayer, "testElemData" )
- end
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement